aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog/new-file-workflow-controller.js
diff options
context:
space:
mode:
authorJonathan Duran2012-02-27 11:22:51 -0800
committerJonathan Duran2012-02-27 11:22:51 -0800
commitab10898c78f2bd5d765d9c915848ed8c8e08c5a3 (patch)
treeb1ebb87e9c101c558108e1cec043d64a03cc50a1 /js/io/ui/new-file-dialog/new-file-workflow-controller.js
parentfb8aacbadba8dffb9619eb16e4626c197dc9264d (diff)
parentda60be29baab67440535b6b2b71fe7de989dfed0 (diff)
downloadninja-ab10898c78f2bd5d765d9c915848ed8c8e08c5a3.tar.gz
Merge branch 'refs/heads/integration-candidate' into Timeline
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