Added autocomplete to edit series path field.

pull/24/head
kay.one 11 years ago
parent 45c7a99439
commit 94807ac00b

@ -2,7 +2,7 @@
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Edit: {{title}}</h3> <h3>Edit: {{title}}</h3>
</div> </div>
<div class="modal-body"> <div class="modal-body edit-series-modal">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="control-group"> <div class="control-group">
@ -52,7 +52,7 @@
<select class="x-quality-profile" id="inputQualityProfile" name="qualityProfileId"> <select class="x-quality-profile" id="inputQualityProfile" name="qualityProfileId">
{{#each qualityProfiles.models}} {{#each qualityProfiles.models}}
<option value="{{id}}">{{attributes.name}}</option> <option value="{{id}}">{{attributes.name}}</option>
{{/each}} {{/each}}
</select> </select>
<span class="help-inline"> <span class="help-inline">
@ -65,7 +65,7 @@
<label class="control-label" for="inputPath">Path</label> <label class="control-label" for="inputPath">Path</label>
<div class="controls"> <div class="controls">
<input type="text" id="inputPath" placeholder="Path" name="path"> <input type="text" id="inputPath" class="x-path" placeholder="Path" name="path">
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="Where should NzbDrone store episodes for this series?"/> <i class="icon-question-sign" title="Where should NzbDrone store episodes for this series?"/>
</span> </span>

@ -1,19 +1,20 @@
'use strict'; 'use strict';
define( define(
[ [
'App', 'App',
'marionette', 'marionette',
'Series/Delete/DeleteSeriesView', 'Series/Delete/DeleteSeriesView',
'Quality/QualityProfileCollection', 'Quality/QualityProfileCollection',
'Mixins/AsModelBoundView' 'Mixins/AsModelBoundView',
'Mixins/AutoComplete'
], function (App, Marionette, DeleteSeriesView, QualityProfiles, AsModelBoundView) { ], function (App, Marionette, DeleteSeriesView, QualityProfiles, AsModelBoundView) {
var view = Marionette.ItemView.extend({ var view = Marionette.ItemView.extend({
template: 'Series/Edit/EditSeriesTemplate', template: 'Series/Edit/EditSeriesTemplate',
ui: { ui: {
progressbar : '.progress .bar', qualityProfile: '.x-quality-profile',
qualityProfile : '.x-quality-profile' path : '.x-path'
}, },
events: { events: {
@ -39,10 +40,17 @@ define(
App.modalRegion.closeModal(); App.modalRegion.closeModal();
}, },
onRender: function () {
this.ui.path.autoComplete('/directories');
},
removeSeries: function () { removeSeries: function () {
var view = new DeleteSeriesView({ model: this.model }); var view = new DeleteSeriesView({ model: this.model });
App.modalRegion.show(view); App.modalRegion.show(view);
} }
}); });
return AsModelBoundView.apply(view); return AsModelBoundView.apply(view);
}); });

@ -2,6 +2,10 @@
@import "../Shared/Styles/clickable.less"; @import "../Shared/Styles/clickable.less";
@import "../Content/prefixer"; @import "../Content/prefixer";
.edit-series-modal {
overflow : visible;
}
.series-item { .series-item {
padding-bottom : 30px; padding-bottom : 30px;
@ -165,16 +169,16 @@
} }
.search-buttons { .search-buttons {
width: 400px; width : 400px;
margin-left: auto; margin-left : auto;
margin-right: auto; margin-right : auto;
} }
} }
.season-grid { .season-grid {
.toggle-cell { .toggle-cell {
width : 12px; width : 12px;
text-align: center; text-align : center;
} }
.toggle-cell { .toggle-cell {
@ -185,8 +189,8 @@
} }
.season-actions, .series-actions { .season-actions, .series-actions {
font-size : 24px; font-size : 24px;
text-transform: none; text-transform : none;
i { i {
.clickable; .clickable;

Loading…
Cancel
Save