summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/models/ConfigItem.js
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-08-16 19:59:25 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-08-16 19:59:43 +0200
commit4e9319f2f932a3baf7a8c9c0548eafe8647238f2 (patch)
tree16d66a41c96ab31ea4fb008c7cbb5b92527db885 /pyload/web/app/scripts/models/ConfigItem.js
parentAdapted SimplydebridCom (diff)
downloadpyload-4e9319f2f932a3baf7a8c9c0548eafe8647238f2.tar.xz
settings for individual accounts
Diffstat (limited to 'pyload/web/app/scripts/models/ConfigItem.js')
-rw-r--r--pyload/web/app/scripts/models/ConfigItem.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/pyload/web/app/scripts/models/ConfigItem.js b/pyload/web/app/scripts/models/ConfigItem.js
index ecb44cbbc..8c75f45f6 100644
--- a/pyload/web/app/scripts/models/ConfigItem.js
+++ b/pyload/web/app/scripts/models/ConfigItem.js
@@ -4,6 +4,8 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes'],
return Backbone.Model.extend({
+ idAttribute: 'name',
+
defaults: {
name: '',
label: '',
@@ -29,11 +31,12 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes'],
if (this.get('inputView'))
this.set('value', this.get('inputView').getVal());
- var data = this.toJSON();
- delete data.inputView;
- delete data.description;
-
- return data;
+ // These values are enough to be handled correctly
+ return {
+ name: this.get('name'),
+ value: this.get('value'),
+ '@class': this.get('@class')
+ };
}
});
}); \ No newline at end of file