Added path autocomplete to download client settings

pull/2/head
Mark McDowall 12 years ago
parent 76b8b006fa
commit 15bbeb9270

@ -1,6 +1,6 @@
'use strict;' 'use strict;'
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Shared/AutoComplete'], function (app,rootFolders) { define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Mixins/AutoComplete'], function (app,rootFolders) {
NzbDrone.AddSeries.RootFolderItemView = Backbone.Marionette.ItemView.extend({ NzbDrone.AddSeries.RootFolderItemView = Backbone.Marionette.ItemView.extend({

@ -15,11 +15,10 @@
</span> </span>
</div> </div>
</div> </div>
<!--Todo: This should auto-complete-->
<div class="control-group"> <div class="control-group">
<label class="control-label">Unsorted TV Directory</label> <label class="control-label">Unsorted TV Directory</label>
<div class="controls"> <div class="controls">
<input type="text" placeholder="C:\Unsorted TV" name="downloadClientDropDirectory" /> <input type="text" placeholder="C:\Unsorted TV" name="downloadClientDropDirectory" class="x-path" />
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="The directory where your download client downloads TV shows to."></i> <i class="icon-question-sign" title="The directory where your download client downloads TV shows to."></i>
</span> </span>
@ -159,11 +158,10 @@
<fieldset> <fieldset>
<legend>Blackhole</legend> <legend>Blackhole</legend>
<!--Todo: This should auto-complete-->
<div class="control-group"> <div class="control-group">
<label class="control-label">Blackhole Directory</label> <label class="control-label">Blackhole Directory</label>
<div class="controls"> <div class="controls">
<input type="text" name="blackholeDirectory" /> <input type="text" name="blackholeDirectory" class="x-path" />
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="The directory where your download client will pickup .nzb files"></i> <i class="icon-question-sign" title="The directory where your download client will pickup .nzb files"></i>
</span> </span>
@ -173,11 +171,10 @@
<fieldset> <fieldset>
<legend>Pneumatic</legend> <legend>Pneumatic</legend>
<!--Todo: This should auto-complete-->
<div class="control-group"> <div class="control-group">
<label class="control-label">Nzb Directory</label> <label class="control-label">Nzb Directory</label>
<div class="controls"> <div class="controls">
<input type="text" name="pneumaticDirectory" /> <input type="text" name="pneumaticDirectory" class="x-path" />
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="Directory to save NZBs for Pneumatic<br/>must be accessible from XBMC"></i> <i class="icon-question-sign" title="Directory to save NZBs for Pneumatic<br/>must be accessible from XBMC"></i>
</span> </span>

@ -11,13 +11,15 @@ define([
ui: { ui: {
switch: '.switch', switch: '.switch',
tooltip: '[class^="help-inline"] i' tooltip: '[class^="help-inline"] i',
pathInput: '.x-path'
}, },
onRender: function () { onRender: function () {
NzbDrone.ModelBinder.bind(this.model, this.el); NzbDrone.ModelBinder.bind(this.model, this.el);
this.ui.switch.bootstrapSwitch(); this.ui.switch.bootstrapSwitch();
this.ui.tooltip.tooltip({ placement: 'right', html: true }); this.ui.tooltip.tooltip({ placement: 'right', html: true });
this.ui.pathInput.autoComplete('/directories');
} }
}); });
}); });

Loading…
Cancel
Save