aboutsummaryrefslogtreecommitdiff
path: root/js/io/workflow/newFileDialog/new-file-workflow-model.js
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/io/workflow/newFileDialog/new-file-workflow-model.js
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/io/workflow/newFileDialog/new-file-workflow-model.js')
-rw-r--r--js/io/workflow/newFileDialog/new-file-workflow-model.js121
1 files changed, 121 insertions, 0 deletions
diff --git a/js/io/workflow/newFileDialog/new-file-workflow-model.js b/js/io/workflow/newFileDialog/new-file-workflow-model.js
new file mode 100644
index 00000000..49c9804d
--- /dev/null
+++ b/js/io/workflow/newFileDialog/new-file-workflow-model.js
@@ -0,0 +1,121 @@
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
7
8//a singleton
9
10exports.NewFileWorkflowModel = Object.create(Object.prototype, {
11 prepareContents: {
12 value: function(id){
13 var contents = [];
14 if(!!this.projectTypeData[id].children && (this.projectTypeData[id].children.length > 0)){
15 this.projectTypeData[id].children.forEach(function(elem){
16 if(!!this.projectTypeData[elem]){
17 contents.push(this.projectTypeData[elem]);
18 }
19 }, this);
20 }
21
22 return contents;
23 }
24 },
25 projectTypeData:{
26 writable:false,
27 enumerable:false,
28 value:{//dummy data for testing
29 "projectTypes":{
30 "name":"Project Type",
31 "type":"directory",
32 "uri":"projectTypes",
33 "children":["newFile", "newProject", "fromTemplate"]
34 },
35 "newProject":{
36 "type":"directory",
37 "name":"New Project",
38 "uri":"newProject",
39 "children":["animation", "bannerAd", "montageComponent", "androidApp"]
40 },
41 "newFile":{
42 "name":"Blank Template",
43 "uri":"newFile",
44 "type":"directory",
45 "children":["htmlTemplate", "javascriptTemplate", "cssTemplate"]
46 },
47 "fromTemplate":{
48 "name":"From Template",
49 "uri":"fromTemplate",
50 "type":"directory",
51 "children":["xoomApp", "website", "iosApp"]
52 },
53 "bannerAd":{
54 "name":"Banner Ad",
55 "uri":"bannerAd",
56 "type":"file",
57 "children":["176x208", "176x220", "208x320", "230x240", "208x320", "230x240", "208x320", "230x240"]
58 },
59 "animation":{
60 "name":"Animation",
61 "uri":"animation",
62 "type":"file",
63 "children":["176x208", "176x220", "208x320", "230x240"]
64 },
65 "montageComponent":{
66 "name":"Montage Component",
67 "uri":"montageComponent",
68 "type":"file",
69 "children":["176x208", "176x208", "176x220", "208x320", "230x240","176x208", "176x220", "208x320", "230x240"]
70 },
71 "androidApp":{
72 "name":"Android App",
73 "uri":"androidApp",
74 "type":"file",
75 "children":["176x208", "176x220"]
76 },
77 "xoomApp":{
78 "name":"Xoom Application",
79 "uri":"xoomApp",
80 "type":"file",
81 "children":["176x208", "176x208", "176x220", "208x320", "176x220", "208x320", "230x240"]
82 },
83 "iosApp":{
84 "name":"iOS Application",
85 "uri":"iosApp",
86 "type":"file",
87 "children":["176x208"]
88 },
89 "176x208":{
90 "name":"176 x 208",
91 "uri":"176x208",
92 "type":"file"
93 },
94 "176x220":{
95 "name":"176 x 220",
96 "uri":"176x220",
97 "type":"file"
98 },
99 "208x320":{
100 "name":"208 x 320",
101 "uri":"208x320",
102 "type":"file"
103 },
104 "htmlTemplate":{
105 "name":"HTML",
106 "uri":"htmlTemplate",
107 "type":"file"
108 },
109 "cssTemplate":{
110 "name":"CSS",
111 "uri":"cssTemplate",
112 "type":"file"
113 },
114 "javascriptTemplate":{
115 "name":"Javascript",
116 "uri":"javascriptTemplate",
117 "type":"file"
118 }
119 }
120 }
121});