1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 17:47:08 +00:00

Added autocomplete to edit series path field.

This commit is contained in:
kay.one 2013-07-13 23:05:51 -07:00
parent 45c7a99439
commit 94807ac00b
3 changed files with 26 additions and 14 deletions

View file

@ -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>

View file

@ -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);
}); });

View file

@ -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;