diff options
Diffstat (limited to 'module/web/static/js/models/ConfigHolder.js')
-rw-r--r-- | module/web/static/js/models/ConfigHolder.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/module/web/static/js/models/ConfigHolder.js b/module/web/static/js/models/ConfigHolder.js index abd1b9f0a..37af9d70e 100644 --- a/module/web/static/js/models/ConfigHolder.js +++ b/module/web/static/js/models/ConfigHolder.js @@ -25,7 +25,19 @@ define(['jquery', 'backbone', 'underscore', 'app', './ConfigItem'], }, save: function(options) { - // TODO + var config = this.toJSON(); + var items = []; + // Convert changed items to json + _.each(config.items, function(item) { + if (item.isChanged()) { + items.push(item.prepareSave()); + } + }); + config.items = items; + + options = App.apiRequest('saveConfig', {config: config}, options); + + return $.ajax(options); }, parse: function(resp) { |