File Browser

New: File Browser to navigate to folders when choosing paths
This commit is contained in:
Mark McDowall
2014-12-15 23:28:55 -08:00
parent a55a77cb5b
commit 85a9b74008
51 changed files with 955 additions and 228 deletions

View File

@@ -7,8 +7,8 @@ define(
'Mixins/AsModelBoundView',
'Mixins/AsValidatedView',
'Mixins/AsEditModalView',
'Mixins/AutoComplete',
'Mixins/TagInput'
'Mixins/TagInput',
'Mixins/FileBrowser'
], function (vent, Marionette, Profiles, AsModelBoundView, AsValidatedView, AsEditModalView) {
var view = Marionette.ItemView.extend({
@@ -28,6 +28,15 @@ define(
this.model.set('profiles', Profiles);
},
onRender: function () {
this.ui.path.fileBrowser();
this.ui.tags.tagInput({
model : this.model,
property : 'tags'
});
},
_onBeforeSave: function () {
var profileId = this.ui.profile.val();
this.model.set({ profileId: profileId});
@@ -38,14 +47,6 @@ define(
vent.trigger(vent.Commands.CloseModalCommand);
},
onRender: function () {
this.ui.path.autoComplete('/directories');
this.ui.tags.tagInput({
model : this.model,
property : 'tags'
});
},
_removeSeries: function () {
vent.trigger(vent.Commands.DeleteSeriesCommand, {series:this.model});
}