mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
stuff we did :D
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
;
|
||||
|
Reference in New Issue
Block a user