From 4e9319f2f932a3baf7a8c9c0548eafe8647238f2 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 16 Aug 2013 19:59:25 +0200 Subject: settings for individual accounts --- pyload/web/app/scripts/models/ConfigItem.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'pyload/web/app/scripts/models/ConfigItem.js') 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 -- cgit v1.2.3