aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog/new-file-workflow-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-workflow-controller.js')
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-workflow-controller.js19
1 files changed, 0 insertions, 19 deletions
diff --git a/js/io/ui/new-file-dialog/new-file-workflow-controller.js b/js/io/ui/new-file-dialog/new-file-workflow-controller.js
index 7b7f4572..901b61c7 100755
--- a/js/io/ui/new-file-dialog/new-file-workflow-controller.js
+++ b/js/io/ui/new-file-dialog/new-file-workflow-controller.js
@@ -19,17 +19,10 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre
19 writable:false, 19 writable:false,
20 enumerable:true, 20 enumerable:true,
21 value:function(){ 21 value:function(){
22 var that = this;
23
24 this.eventManager.addEventListener("saveAs", function(evt){
25 var data = evt._event.data || {};//data will contain the current file name, directory location and callback
26 that.showSaveAsDialog(data);
27 }, false);
28 } 22 }
29 }, 23 },
30 24
31 model:{ 25 model:{
32 writable: true,
33 enumerable:true, 26 enumerable:true,
34 value: null 27 value: null
35 }, 28 },
@@ -56,19 +49,8 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre
56 this.model.defaultProjectType = lastSelectedProjectType; 49 this.model.defaultProjectType = lastSelectedProjectType;
57 } 50 }
58 51
59 //render modal dialog
60 var newFileNavContent = document.createElement("div");
61 newFileNavContent.id = "newFileDialog";
62
63 //elements needs to be on DOM to be drawn
64 document.getElementById('modalContainer').appendChild(newFileNavContent);
65
66 var newFileOptionsNav = newFileOptionsNavigatorModule.NewFileOptionsNavigator.create(); 52 var newFileOptionsNav = newFileOptionsNavigatorModule.NewFileOptionsNavigator.create();
67 newFileOptionsNav.newFileModel = this.model; 53 newFileOptionsNav.newFileModel = this.model;
68 newFileOptionsNav.element = newFileNavContent;
69
70 //remove after rendering and add in modal dialog
71 document.getElementById('modalContainer').removeChild(newFileNavContent);
72 54
73 var popup = Popup.create(); 55 var popup = Popup.create();
74 popup.content = newFileOptionsNav; 56 popup.content = newFileOptionsNav;
@@ -99,7 +81,6 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre
99 saveAsDialog.fileName = fileName; 81 saveAsDialog.fileName = fileName;
100 saveAsDialog.folderUri = folderUri; 82 saveAsDialog.folderUri = folderUri;
101 saveAsDialog.callback = data.callback; 83 saveAsDialog.callback = data.callback;
102 saveAsDialog.callbackScope = data.callbackScope;
103 saveAsDialog.element = saveAsDialogContainer; 84 saveAsDialog.element = saveAsDialogContainer;
104 85
105 //remove after rendering and add in modal dialog 86 //remove after rendering and add in modal dialog