diff options
author | Valerio Virgillito | 2012-02-21 21:11:54 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-21 21:11:54 -0800 |
commit | f86577d5083aeed2de7a932fe4147e9002e91554 (patch) | |
tree | 0f05977b69a692e2aab964e5dc0f316f24b25aeb /js | |
parent | 2f24dafec79583547fe663d5a387d8ef15aae3bf (diff) | |
download | ninja-f86577d5083aeed2de7a932fe4147e9002e91554.tar.gz |
cleanup - Removing temporary div to render the popups
We don't need to render the popup before opening them. Removing that hack.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-x | js/io/ui/file-picker/file-picker-controller.js | 14 | ||||
-rwxr-xr-x | js/io/ui/new-file-dialog/new-file-workflow-controller.js | 12 |
2 files changed, 0 insertions, 26 deletions
diff --git a/js/io/ui/file-picker/file-picker-controller.js b/js/io/ui/file-picker/file-picker-controller.js index 129bebad..5e4d0be8 100755 --- a/js/io/ui/file-picker/file-picker-controller.js +++ b/js/io/ui/file-picker/file-picker-controller.js | |||
@@ -33,7 +33,6 @@ var FilePickerController = exports.FilePickerController = Montage.create(require | |||
33 | }, | 33 | }, |
34 | 34 | ||
35 | filePickerPopupType:{ | 35 | filePickerPopupType:{ |
36 | writable: true, | ||
37 | enumerable: false, | 36 | enumerable: false, |
38 | value: "filePicker" | 37 | value: "filePicker" |
39 | }, | 38 | }, |
@@ -152,15 +151,6 @@ var FilePickerController = exports.FilePickerController = Montage.create(require | |||
152 | writable:false, | 151 | writable:false, |
153 | enumerable:true, | 152 | enumerable:true, |
154 | value:function(callback, aModel){ | 153 | value:function(callback, aModel){ |
155 | //render modal dialog | ||
156 | var pickerNavContent = document.createElement("div"); | ||
157 | pickerNavContent.id = "filePicker"; | ||
158 | |||
159 | pickerNavContent.style.color = "#fff"; | ||
160 | |||
161 | //hack (elements needs to be on DOM to be drawn) | ||
162 | document.getElementById('modalContainer').appendChild(pickerNavContent); | ||
163 | |||
164 | var pickerNavChoices = Montage.create(pickerNavigatorReel); | 154 | var pickerNavChoices = Montage.create(pickerNavigatorReel); |
165 | var initUri = aModel.currentRoot; | 155 | var initUri = aModel.currentRoot; |
166 | 156 | ||
@@ -171,10 +161,6 @@ var FilePickerController = exports.FilePickerController = Montage.create(require | |||
171 | 161 | ||
172 | pickerNavChoices.mainContentData = this.prepareContentList(initUri, aModel); | 162 | pickerNavChoices.mainContentData = this.prepareContentList(initUri, aModel); |
173 | pickerNavChoices.pickerModel = aModel; | 163 | pickerNavChoices.pickerModel = aModel; |
174 | pickerNavChoices.element = pickerNavContent; | ||
175 | |||
176 | //hack - remove after rendering and add in modal dialog | ||
177 | document.getElementById('modalContainer').removeChild(pickerNavContent); | ||
178 | 164 | ||
179 | var popup = Popup.create(); | 165 | var popup = Popup.create(); |
180 | popup.content = pickerNavChoices; | 166 | popup.content = pickerNavChoices; |
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..c2be687a 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 | |||
@@ -29,7 +29,6 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre | |||
29 | }, | 29 | }, |
30 | 30 | ||
31 | model:{ | 31 | model:{ |
32 | writable: true, | ||
33 | enumerable:true, | 32 | enumerable:true, |
34 | value: null | 33 | value: null |
35 | }, | 34 | }, |
@@ -56,19 +55,8 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre | |||
56 | this.model.defaultProjectType = lastSelectedProjectType; | 55 | this.model.defaultProjectType = lastSelectedProjectType; |
57 | } | 56 | } |
58 | 57 | ||
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(); | 58 | var newFileOptionsNav = newFileOptionsNavigatorModule.NewFileOptionsNavigator.create(); |
67 | newFileOptionsNav.newFileModel = this.model; | 59 | 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 | 60 | ||
73 | var popup = Popup.create(); | 61 | var popup = Popup.create(); |
74 | popup.content = newFileOptionsNav; | 62 | popup.content = newFileOptionsNav; |