summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-08-21 17:56:08 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-08-21 17:56:08 +0200
commitf76bebf2d8c29aa3b44907f3470d2a4d85cf40ed (patch)
tree476c70cbc60c172b664d99e151217880af850279
parentcorrectly unset http referer (diff)
downloadpyload-f76bebf2d8c29aa3b44907f3470d2a4d85cf40ed.tar.xz
fixed time in account
-rw-r--r--pyload/web/app/scripts/models/Account.js8
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();