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

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