diff options
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-workflow-controller.js')
-rwxr-xr-x | js/io/ui/new-file-dialog/new-file-workflow-controller.js | 25 |
1 files changed, 12 insertions, 13 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 901b61c7..279a74b4 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 | |||
@@ -27,6 +27,16 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre | |||
27 | value: null | 27 | value: null |
28 | }, | 28 | }, |
29 | 29 | ||
30 | newFileOptionsNav:{ | ||
31 | enumerable:true, | ||
32 | value: null | ||
33 | }, | ||
34 | |||
35 | saveAsDialog:{ | ||
36 | enumerable:true, | ||
37 | value: null | ||
38 | }, | ||
39 | |||
30 | showNewFileDialog:{ | 40 | showNewFileDialog:{ |
31 | writable:false, | 41 | writable:false, |
32 | enumerable:true, | 42 | enumerable:true, |
@@ -49,7 +59,7 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre | |||
49 | this.model.defaultProjectType = lastSelectedProjectType; | 59 | this.model.defaultProjectType = lastSelectedProjectType; |
50 | } | 60 | } |
51 | 61 | ||
52 | var newFileOptionsNav = newFileOptionsNavigatorModule.NewFileOptionsNavigator.create(); | 62 | var newFileOptionsNav = this.newFileOptionsNav = newFileOptionsNavigatorModule.NewFileOptionsNavigator.create(); |
53 | newFileOptionsNav.newFileModel = this.model; | 63 | newFileOptionsNav.newFileModel = this.model; |
54 | 64 | ||
55 | var popup = Popup.create(); | 65 | var popup = Popup.create(); |
@@ -70,21 +80,10 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre | |||
70 | var fileName = data.fileName || "filename.txt"; | 80 | var fileName = data.fileName || "filename.txt"; |
71 | var folderUri = data.folderUri || "/Documents"; | 81 | var folderUri = data.folderUri || "/Documents"; |
72 | 82 | ||
73 | //render modal dialog | 83 | var saveAsDialog = this.saveAsDialog = saveAsModule.SaveAsDialog.create(); |
74 | var saveAsDialogContainer = document.createElement("div"); | ||
75 | saveAsDialogContainer.id = "saveAsDialog"; | ||
76 | |||
77 | //elements needs to be on DOM to be drawn | ||
78 | document.getElementById('modalContainer').appendChild(saveAsDialogContainer); | ||
79 | |||
80 | var saveAsDialog = saveAsModule.SaveAsDialog.create(); | ||
81 | saveAsDialog.fileName = fileName; | 84 | saveAsDialog.fileName = fileName; |
82 | saveAsDialog.folderUri = folderUri; | 85 | saveAsDialog.folderUri = folderUri; |
83 | saveAsDialog.callback = data.callback; | 86 | saveAsDialog.callback = data.callback; |
84 | saveAsDialog.element = saveAsDialogContainer; | ||
85 | |||
86 | //remove after rendering and add in modal dialog | ||
87 | document.getElementById('modalContainer').removeChild(saveAsDialogContainer); | ||
88 | 87 | ||
89 | var popup = Popup.create(); | 88 | var popup = Popup.create(); |
90 | popup.content = saveAsDialog; | 89 | popup.content = saveAsDialog; |