diff options
| author | 2013-08-21 17:56:08 +0200 | |
|---|---|---|
| committer | 2013-08-21 17:56:08 +0200 | |
| commit | f76bebf2d8c29aa3b44907f3470d2a4d85cf40ed (patch) | |
| tree | 476c70cbc60c172b664d99e151217880af850279 /pyload/web/app/scripts | |
| parent | correctly unset http referer (diff) | |
| download | pyload-f76bebf2d8c29aa3b44907f3470d2a4d85cf40ed.tar.xz | |
fixed time in account
Diffstat (limited to 'pyload/web/app/scripts')
| -rw-r--r-- | pyload/web/app/scripts/models/Account.js | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/pyload/web/app/scripts/models/Account.js b/pyload/web/app/scripts/models/Account.js index 94893f3e2..dc453ef3c 100644 --- a/pyload/web/app/scripts/models/Account.js +++ b/pyload/web/app/scripts/models/Account.js @@ -3,8 +3,6 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt      return Backbone.Model.extend({ -        // TODO -        // generated, not submitted          idAttribute: 'loginname',          defaults: { @@ -36,6 +34,10 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt                  return new ConfigItem(item);              }); +            // JS uses time based on ms +            if (resp.validuntil > 0) +                resp.validuntil *= 1000; +              return resp;          }, @@ -58,7 +60,7 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt          save: function() {              // use changed config items only              var data = this.toJSON(); -            data.config = _.map(_.filter(data.config, function(c){ +            data.config = _.map(_.filter(data.config, function(c) {                  return c.isChanged();              }), function(c) {                  return c.prepareSave();  | 
