Indexer settings overhaul, reviewed settings tooltips

This commit is contained in:
Mark McDowall 2013-07-04 21:52:20 -07:00
commit 5baf2e09c4
24 changed files with 132 additions and 55 deletions

View file

@ -1,11 +1,15 @@
<div class="row">
<div class="span12">
<button class="btn btn-success x-add">Add Newznab</button>
</div>
</div>
<fieldset>
<legend>Indexers</legend>
<div class="row">
<div class="span12">
<ul id="x-indexers" class="indexer-list"></ul>
<div class="row">
<div class="span12">
<button class="btn btn-success x-add">Add Newznab</button>
</div>
</div>
</div>
<div class="row">
<div class="span12">
<ul id="x-indexers" class="indexer-list"></ul>
</div>
</div>
</fieldset>

View file

@ -0,0 +1,28 @@
"use strict";
define(
[
'marionette',
'Settings/Indexers/CollectionView',
'Settings/Indexers/Options/View'
], function (Marionette, CollectionView, OptionsView) {
return Marionette.Layout.extend({
template: 'Settings/Indexers/LayoutTemplate',
regions: {
indexersRegion : '#indexers-collection',
indexerOptions : '#indexer-options'
},
initialize: function (options) {
this.settings = options.settings;
this.indexersCollection = options.indexersCollection;
},
onShow: function () {
this.indexersRegion.show(new CollectionView({ collection: this.indexersCollection }));
this.indexerOptions.show(new OptionsView({ model: this.settings }));
}
});
});

View file

@ -0,0 +1,5 @@
<div id="indexers-collection"></div>
<div class="form-horizontal">
<div id="indexer-options"></div>
</div>

View file

@ -0,0 +1,13 @@
'use strict';
define(
[
'marionette',
'Mixins/AsModelBoundView'
], function (Marionette, AsModelBoundView) {
var view = Marionette.ItemView.extend({
template: 'Settings/Indexers/Options/ViewTemplate'
});
return AsModelBoundView.call(view);
});

View file

@ -0,0 +1,39 @@
<fieldset>
<legend>Options</legend>
<div class="control-group">
<label class="control-label">Retention</label>
<div class="controls">
<input type="text" name="retention"/>
</div>
</div>
<div class="control-group">
<label class="control-label">RSS Sync Interval</label>
<div class="controls">
<label class="checkbox toggle well">
<input type="checkbox" name="rssSyncInterval"/>
<p>
<span>Yes</span>
<span>No</span>
</p>
<div class="btn btn-primary slide-button"/>
</label>
</div>
</div>
<div class="control-group">
<label class="control-label">Release Restrictions</label>
<div class="controls">
<textarea rows="3" name="releaseRestrictions" class="release-restrictions"></textarea>
<span class="help-inline">
<i class="icon-question-sign" title="Blacklist NZBs based on these words (case-insensitive)"/>
</span>
<span class="text-area-help">Newline-delimited set of rules</span>
</div>
</div>
</fieldset>