From ff7292bbc11499faa50d6be76305e55f27d5049c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 11 Jul 2013 08:16:19 -0700 Subject: [PATCH] General settings now with save --- UI/Settings/General/GeneralSettingsModel.js | 22 ++++++--------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/UI/Settings/General/GeneralSettingsModel.js b/UI/Settings/General/GeneralSettingsModel.js index 00b03f68b..f8854135e 100644 --- a/UI/Settings/General/GeneralSettingsModel.js +++ b/UI/Settings/General/GeneralSettingsModel.js @@ -1,23 +1,13 @@ 'use strict'; define( [ - 'backbone', - 'Mixins/AsChangeTrackingModel' - ], function (Backbone, AsChangeTrackingModel) { - var model = Backbone.Model.extend({ + 'Settings/SettingsModelBase' + ], function (SettingsModelBase) { + return SettingsModelBase.extend({ - url: window.ApiRoot + '/settings/host', + url : window.ApiRoot + '/settings/host', + successMessage: 'General settings saved', + errorMessage : 'Failed to save general settings' - initialize: function () { - this.on('change', function () { - this.isSaved = false; - }, this); - - this.on('sync', function () { - this.isSaved = true; - }, this); - } }); - - return AsChangeTrackingModel.call(model); });