Enter on add root folder will add folder

Renamed Root Folder js files
This commit is contained in:
Mark McDowall 2014-02-08 11:54:14 -08:00
parent 0247aebb25
commit dff6726114
10 changed files with 23 additions and 14 deletions

View File

@ -4,11 +4,11 @@ define(
'vent',
'AppLayout',
'marionette',
'AddSeries/RootFolders/Layout',
'AddSeries/RootFolders/RootFolderLayout',
'AddSeries/Existing/AddExistingSeriesCollectionView',
'AddSeries/AddSeriesView',
'Quality/QualityProfileCollection',
'AddSeries/RootFolders/Collection',
'AddSeries/RootFolders/RootFolderCollection',
'Series/SeriesCollection'
], function (vent,
AppLayout,

View File

@ -2,7 +2,7 @@
define(
[
'backbone',
'AddSeries/RootFolders/Model',
'AddSeries/RootFolders/RootFolderModel',
'Mixins/backbone.signalr.mixin'
], function (Backbone, RootFolderModel) {

View File

@ -3,7 +3,7 @@
define(
[
'marionette',
'AddSeries/RootFolders/ItemView'
'AddSeries/RootFolders/RootFolderItemView'
], function (Marionette, RootFolderItemView) {

View File

@ -7,7 +7,7 @@ define(
return Marionette.ItemView.extend({
template: 'AddSeries/RootFolders/ItemViewTemplate',
template: 'AddSeries/RootFolders/RootFolderItemViewTemplate',
tagName : 'tr',
initialize: function () {

View File

@ -3,16 +3,16 @@
define(
[
'marionette',
'AddSeries/RootFolders/CollectionView',
'AddSeries/RootFolders/Collection',
'AddSeries/RootFolders/Model',
'AddSeries/RootFolders/RootFolderCollectionView',
'AddSeries/RootFolders/RootFolderCollection',
'AddSeries/RootFolders/RootFolderModel',
'Shared/LoadingView',
'Mixins/AsValidatedView',
'Mixins/AutoComplete'
], function (Marionette, RootFolderCollectionView, RootFolderCollection, RootFolderModel, LoadingView, AsValidatedView) {
var layout = Marionette.Layout.extend({
template: 'AddSeries/RootFolders/LayoutTemplate',
template: 'AddSeries/RootFolders/RootFolderLayoutTemplate',
ui: {
pathInput: '.x-path input'
@ -23,7 +23,8 @@ define(
},
events: {
'click .x-add': '_addFolder'
'click .x-add': '_addFolder',
'keydown .x-path input': '_keydown'
},
initialize: function () {
@ -65,6 +66,14 @@ define(
_showCurrentDirs: function () {
this.currentDirs.show(this.rootfolderListView);
},
_keydown: function (e) {
if (e.keyCode !== 13) {
return;
}
this._addFolder();
}
});

View File

@ -6,8 +6,8 @@ define(
'underscore',
'marionette',
'Quality/QualityProfileCollection',
'AddSeries/RootFolders/Collection',
'AddSeries/RootFolders/Layout',
'AddSeries/RootFolders/RootFolderCollection',
'AddSeries/RootFolders/RootFolderLayout',
'Series/SeriesCollection',
'Config',
'Shared/Messenger',

View File

@ -7,9 +7,9 @@ define(
'vent',
'Series/SeriesCollection',
'Quality/QualityProfileCollection',
'AddSeries/RootFolders/Collection',
'AddSeries/RootFolders/RootFolderCollection',
'Shared/Toolbar/ToolbarLayout',
'AddSeries/RootFolders/Layout',
'AddSeries/RootFolders/RootFolderLayout',
'Config'
], function (_,
Marionette,