mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-25 17:17:02 +00:00
769331d45d
single quotes
36 lines
960 B
JavaScript
36 lines
960 B
JavaScript
'use strict';
|
|
define(['app',
|
|
'backbone.deepmodel',
|
|
'Mixins/AsChangeTrackingModel',
|
|
'Shared/Messenger'], function (App, DeepModel, AsChangeTrackingModel, Messenger) {
|
|
var model = DeepModel.DeepModel.extend({
|
|
|
|
initialize: function () {
|
|
|
|
// App.vent.on(App.Commands.SaveSettings, this.saveSettings, this);
|
|
this.listenTo(App.vent, App.Commands.SaveSettings, this.saveSettings);
|
|
},
|
|
|
|
saveSettings: function () {
|
|
|
|
if (!this.isSaved) {
|
|
|
|
var savePromise = this.save();
|
|
|
|
Messenger.monitor(
|
|
{
|
|
promise : savePromise,
|
|
successMessage: this.successMessage,
|
|
errorMessage : this.errorMessage
|
|
});
|
|
|
|
return savePromise;
|
|
}
|
|
|
|
return undefined;
|
|
}
|
|
|
|
});
|
|
|
|
return AsChangeTrackingModel.call(model);
|
|
});
|