indexer settings is dynamically generated

This commit is contained in:
kay.one 2013-05-02 22:31:51 -07:00
commit 7696fb54dc
7 changed files with 1562 additions and 10 deletions

View file

@ -97,6 +97,7 @@
<script src="/JsLibraries/backbone.mutators.js"></script>
<script src="/JsLibraries/backbone.marionette.js"></script>
<script src="/JsLibraries/backbone.pageable.js"></script>
<script src="/JsLibraries/lunr.js"></script>
<script src="/JsLibraries/backbone.backgrid.js"></script>
<script src="/JsLibraries/backbone.backgrid.paginator.js"></script>
<script src="/JsLibraries/backbone.backgrid.filter.js"></script>

1557
UI/JsLibraries/lunr.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,6 @@ define([
'Missing/Collection',
'Series/Index/Table/AirDateCell',
'Series/Index/Table/SeriesStatusCell',
'Shared/Toolbar/ToolbarView',
'Shared/Toolbar/ToolbarLayout'
],
function () {

View file

@ -6,7 +6,6 @@ define([
'Series/Index/EmptyView',
'Series/Index/Table/AirDateCell',
'Series/Index/Table/SeriesStatusCell',
'Shared/Toolbar/ToolbarView',
'Shared/Toolbar/ToolbarLayout',
'Config'
],

View file

@ -25,7 +25,7 @@
{{#each fields}}
<div class="control-group">
<label class="control-label">{{title}}</label>
<label class="control-label">{{label}}</label>
<div class="controls">
<input type="text" name="fields.{{@index}}.value"/>
@ -35,4 +35,4 @@
</div>
</div>
{{/each}}
</fieldset>
</fieldset>

View file

@ -7,13 +7,8 @@ define([
], function () {
NzbDrone.Settings.Indexers.ItemView = Backbone.Marionette.ItemView.extend({
template: 'Settings/Indexers/ItemTemplate',
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);
},