mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
stuff we did :D
This commit is contained in:
parent
32701d5e84
commit
4cd75cd8aa
29 changed files with 648 additions and 479 deletions
|
@ -1,9 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
define([
|
||||
'app', 'Settings/SettingsModel'
|
||||
|
||||
], function () {
|
||||
define(['app', 'Settings/Naming/NamingModel'], function () {
|
||||
|
||||
NzbDrone.Settings.Naming.NamingView = Backbone.Marionette.ItemView.extend({
|
||||
template : 'Settings/Naming/NamingTemplate',
|
||||
|
@ -14,11 +10,32 @@ define([
|
|||
},
|
||||
|
||||
initialize: function () {
|
||||
//Listen to save event
|
||||
this.model = new NzbDrone.Settings.Naming.NamingModel();
|
||||
this.model.fetch();
|
||||
|
||||
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this.ui.tooltip.tooltip({ placement: 'right' });
|
||||
},
|
||||
|
||||
saveSettings: function () {
|
||||
this.model.save(undefined, this.syncNotification("Naming Settings Saved", "Couldn't Save Naming Settings"));
|
||||
},
|
||||
|
||||
|
||||
syncNotification: function (success, error) {
|
||||
return {
|
||||
success: function () {
|
||||
window.alert(success);
|
||||
},
|
||||
|
||||
error: function () {
|
||||
window.alert(error);
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue