diff options
author | Pierre Frisch | 2011-12-22 07:25:50 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-01-27 11:18:17 -0800 |
commit | b89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch) | |
tree | 0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/io/workflow | |
parent | 2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff) | |
download | ninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz |
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/io/workflow')
12 files changed, 880 insertions, 0 deletions
diff --git a/js/io/workflow/new-project-manager.js b/js/io/workflow/new-project-manager.js new file mode 100644 index 00000000..814d6d0e --- /dev/null +++ b/js/io/workflow/new-project-manager.js | |||
@@ -0,0 +1,136 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No 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 | |||
7 | var Montage = require("montage/core/core").Montage; | ||
8 | var modalDialogModule = require("js/components/ui/modalDialog/modal-dialog-manager"); | ||
9 | var newProjectChoicesModule = require("js/io/workflow/newProjectNavigator"); | ||
10 | |||
11 | var newProjectManager = exports.NewProjectManager = Montage.create(Montage, { | ||
12 | |||
13 | /** | ||
14 | * will be used for any expensive init operation like loading a setting.xml | ||
15 | */ | ||
16 | init:{ | ||
17 | writable:false, | ||
18 | enumerable:true, | ||
19 | value: function(){} | ||
20 | }, | ||
21 | |||
22 | /*** | ||
23 | * for list mode every entry has an icon | ||
24 | * this object should be build at runtime with the data returned from io api | ||
25 | * this will be bound to the iconList Repetition | ||
26 | */ | ||
27 | resource_data_listMode:{ | ||
28 | writable: true, | ||
29 | enumerable:false, | ||
30 | value:{ | ||
31 | "root":{ | ||
32 | "name":"Project Type", | ||
33 | "uri":null, | ||
34 | "fileType":null,//for file type filter | ||
35 | "hasChilden":true, | ||
36 | "children":["newProject", "newFile", "newTemplate"], | ||
37 | "hasIcon": false, | ||
38 | "iconUrl":null | ||
39 | }, | ||
40 | "newProject":{ | ||
41 | "name":"New Project", | ||
42 | "uri":null, | ||
43 | "fileType":null, | ||
44 | "hasChilden":true, | ||
45 | "children":["animation", "bannerAd", "montageComponent", "androidApp"], | ||
46 | "hasIcon": false, | ||
47 | "iconUrl":null | ||
48 | }, | ||
49 | "newFile":{ | ||
50 | "name":"New File", | ||
51 | "uri":null, | ||
52 | "fileType":null, | ||
53 | "hasChilden":true, | ||
54 | "children":["html", "javascript", "css"], | ||
55 | "hasIcon": false, | ||
56 | "iconUrl":null | ||
57 | }, | ||
58 | "newTemplate":{ | ||
59 | "name":"New Template", | ||
60 | "uri":null, | ||
61 | "fileType":null, | ||
62 | "hasChilden":true, | ||
63 | "children":["xoomApp", "website", "iosApp"], | ||
64 | "hasIcon": false, | ||
65 | "iconUrl":null | ||
66 | }, | ||
67 | "bannerAd":{ | ||
68 | "name":"Banner Ad", | ||
69 | "uri":null, | ||
70 | "fileType":null, | ||
71 | "hasChilden":true, | ||
72 | "children":["176x208", "176x220", "208x320", "230x240"], | ||
73 | "hasIcon": false, | ||
74 | "iconUrl":null | ||
75 | }, | ||
76 | "176x208":{ | ||
77 | "name":"176x208", | ||
78 | "uri":null, | ||
79 | "fileType":null, | ||
80 | "hasChilden":false, | ||
81 | "hasIcon": false, | ||
82 | "iconUrl":null | ||
83 | }, | ||
84 | "176x220":{ | ||
85 | "name":"176x220", | ||
86 | "uri":null, | ||
87 | "fileType":null, | ||
88 | "hasChilden":false, | ||
89 | "hasIcon": false, | ||
90 | "iconUrl":null | ||
91 | }, | ||
92 | "208x320":{ | ||
93 | "name":"208x320", | ||
94 | "uri":null, | ||
95 | "fileType":null, | ||
96 | "hasChilden":false, | ||
97 | "hasIcon": false, | ||
98 | "iconUrl":null | ||
99 | } | ||
100 | } | ||
101 | |||
102 | }, | ||
103 | |||
104 | /*** | ||
105 | * | ||
106 | * Load project type selection component and populate a new modal dialog instance | ||
107 | */ | ||
108 | showNewProjectDialog:{ | ||
109 | writable:false, | ||
110 | enumerable:true, | ||
111 | value: function(){ | ||
112 | var newProjectContent = document.createElement("div"); | ||
113 | newProjectContent.id = "newProject"; | ||
114 | |||
115 | //temporary width/height setting | ||
116 | newProjectContent.style.width = newProjectContent.style.height= "500px";// remove this hard code width/height | ||
117 | newProjectContent.style.color = "#fff"; | ||
118 | |||
119 | //hack (elements needs to be on DOM to be drawn) | ||
120 | document.getElementById('modalContainer').appendChild(newProjectContent); | ||
121 | |||
122 | var newProjectChoices = newProjectChoicesModule.NewProjectNavigator.create(); | ||
123 | newProjectChoices.element = newProjectContent; | ||
124 | newProjectChoices.needsDraw = true; | ||
125 | |||
126 | //hack - remove after rendering and add in modal dialog | ||
127 | document.getElementById('modalContainer').removeChild(newProjectContent); | ||
128 | |||
129 | modalDialogModule.ModalDialogMananger.init(document.getElementById('blockScreen'), document.getElementById('modalContainer')); | ||
130 | modalDialogModule.ModalDialogMananger.showModalDialog(null, "#2c2c2c", newProjectContent);//add content as input | ||
131 | |||
132 | } | ||
133 | } | ||
134 | |||
135 | |||
136 | }); \ No newline at end of file | ||
diff --git a/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.css b/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.css new file mode 100644 index 00000000..1e857874 --- /dev/null +++ b/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.css | |||
@@ -0,0 +1,50 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No 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 | |||
7 | .newfileLocation .newFileName{ | ||
8 | width:70%; | ||
9 | margin-left:5px; | ||
10 | } | ||
11 | |||
12 | .newfileLocation .newFileDirectory{ | ||
13 | width:70%; | ||
14 | margin-left:5px; | ||
15 | } | ||
16 | |||
17 | .newfileLocation .templateSelection{ | ||
18 | float:left; | ||
19 | width:20%; | ||
20 | height:90%; | ||
21 | padding-right: 10px; | ||
22 | } | ||
23 | |||
24 | .newfileLocation .templateSelection .template{ | ||
25 | width:80%; | ||
26 | height:60%; | ||
27 | background-color: #e1e1e1; | ||
28 | border:1px solid #000000; | ||
29 | box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8); | ||
30 | } | ||
31 | |||
32 | .newfileLocation .locationSelection{ | ||
33 | float:left; | ||
34 | width:75%; | ||
35 | } | ||
36 | |||
37 | .newfileLocation .locationSelection div{ | ||
38 | padding-bottom: 5px; | ||
39 | } | ||
40 | |||
41 | .newfileLocation .locationSelection span{ | ||
42 | padding-right: 5px; | ||
43 | white-space: nowrap; | ||
44 | } | ||
45 | |||
46 | .newfileLocation .findDirectory{ | ||
47 | width: 17px; | ||
48 | height:17px; | ||
49 | vertical-align: bottom; | ||
50 | } \ No newline at end of file | ||
diff --git a/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.html b/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.html new file mode 100644 index 00000000..1be4e485 --- /dev/null +++ b/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.html | |||
@@ -0,0 +1,41 @@ | |||
1 | <!DOCTYPE HTML> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
5 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
6 | </copyright> --> | ||
7 | <html> | ||
8 | <head> | ||
9 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
10 | <link rel="stylesheet" type="text/css" href="new-file-location.css"> | ||
11 |