aboutsummaryrefslogtreecommitdiff
path: root/js/io/workflow/newFileDialog/new-file-workflow-controller.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-15 20:37:48 -0800
committerJose Antonio Marquez2012-02-15 20:37:48 -0800
commit89b5e793ea88ef235b54b6e1d1c379698d3e612b (patch)
tree4d29118f35df77ca6b423119a4ff61694a442cbf /js/io/workflow/newFileDialog/new-file-workflow-controller.js
parent9d2c2a80483415d7560b00cda5519153db23e241 (diff)
parentd366c0bd1af6471511217ed574083e15059519b5 (diff)
downloadninja-89b5e793ea88ef235b54b6e1d1c379698d3e612b.tar.gz
Merge branch 'refs/heads/NinjaInternal' into Color
Diffstat (limited to 'js/io/workflow/newFileDialog/new-file-workflow-controller.js')
-rw-r--r--js/io/workflow/newFileDialog/new-file-workflow-controller.js59
1 files changed, 0 insertions, 59 deletions
diff --git a/js/io/workflow/newFileDialog/new-file-workflow-controller.js b/js/io/workflow/newFileDialog/new-file-workflow-controller.js
deleted file mode 100644
index 5cc68bf9..00000000
--- a/js/io/workflow/newFileDialog/new-file-workflow-controller.js
+++ /dev/null
@@ -1,59 +0,0 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7var Montage = require("montage/core/core").Montage,
8 Popup = require("montage/ui/popup/popup.reel").Popup,
9 newFileOptionsNavigatorModule = require("js/io/workflow/newFileDialog/new-file-options-navigator.reel"),
10 newFileWorkflowModelModule = require("js/io/workflow/newFileDialog/new-file-workflow-model");
11
12//singleton
13exports.NewFileWorkflowController = Montage.create(require("montage/ui/component").Component, {
14 /**
15 * Register a listener for showPicker event
16 */
17 deserializedFromTemplate:{
18 writable:false,
19 enumerable:true,
20 value:function(){
21 var that = this;
22 this.eventManager.addEventListener("executeNewFile", function(evt){
23 that.showNewFileDialog();
24 }, false);
25 }
26 },
27
28 showNewFileDialog:{
29 writable:false,
30 enumerable:true,
31 value:function(){
32 var aModel = null;
33 //render modal dialog
34 var newFileNavContent = document.createElement("div");
35 newFileNavContent.id = "newFileDialog";
36 newFileNavContent.style.width = "650px";
37 newFileNavContent.style.height = "350px";
38 newFileNavContent.style.color = "#fff";
39
40 //elements needs to be on DOM to be drawn
41 document.getElementById('modalContainer').appendChild(newFileNavContent);
42
43 var newFileOptionsNav = newFileOptionsNavigatorModule.NewFileOptionsNavigator.create();
44 newFileOptionsNav.newFileModel = newFileWorkflowModelModule.NewFileWorkflowModel;
45 newFileOptionsNav.element = newFileNavContent;
46
47 //hack - remove after rendering and add in modal dialog
48 document.getElementById('modalContainer').removeChild(newFileNavContent);
49
50 var popup = Popup.create();
51 popup.content = newFileOptionsNav;
52 popup.modal = true;
53 popup.show();
54
55 newFileOptionsNav.popup = popup;//handle to be used for hiding the popup
56
57 }
58 }
59}); \ No newline at end of file