mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 17:13:49 -07:00
Model driven indexer settings
This commit is contained in:
parent
e03ab2ebea
commit
9d5cb6f3e0
14 changed files with 576 additions and 17 deletions
38
UI/Settings/Indexers/ItemView.js
Normal file
38
UI/Settings/Indexers/ItemView.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
"use strict";
|
||||
|
||||
define([
|
||||
'app',
|
||||
'Settings/Indexers/Collection'
|
||||
|
||||
], function () {
|
||||
|
||||
NzbDrone.Settings.Indexers.ItemView = Backbone.Marionette.ItemView.extend({
|
||||
template: 'Settings/Indexers/ItemTemplate',
|
||||
initialize: function () {
|
||||
this.model.set('fields', [
|
||||
{ key: 'username', title: 'Username', helpText: 'HALP!', value: 'mark' },
|
||||
{ key: 'apiKey', title: 'API Key', helpText: 'HALP!', value: 'private' }
|
||||
]);
|
||||
|
||||
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
|
||||
},
|
||||
|
||||
saveSettings: function () {
|
||||
var test = 1;
|
||||
//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