diff options
author | Valerio Virgillito | 2012-03-28 11:56:54 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-03-28 11:56:54 -0700 |
commit | 3fd2cdb59027b3f973b9165db9db4fdd22026941 (patch) | |
tree | 88c96e3f87729a873af7fc88379f4935e83306ed /js/data | |
parent | a25e50a429dfa87522ed7616dcae7b472f3c785c (diff) | |
parent | 3571253acb831860d4bc12466b663655bdac652e (diff) | |
download | ninja-3fd2cdb59027b3f973b9165db9db4fdd22026941.tar.gz |
Merge pull request #131 from ananyasen/integration-candidate
Pull request IKNINJA-1302, IKNINJA-1367, IKNINJA-1361, IKNINJA-1364, IKNINJA-1302, IKNINJA-1266
Diffstat (limited to 'js/data')
-rwxr-xr-x | js/data/menu-data.js | 912 |
1 files changed, 526 insertions, 386 deletions
diff --git a/js/data/menu-data.js b/js/data/menu-data.js index 40512f5d..12007f4a 100755 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js | |||
@@ -4,414 +4,554 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage; | 7 | var Montage = require("montage/core/core").Montage; |
8 | 8 | ||
9 | exports.MenuData = Montage.create( Montage, { | 9 | exports.MenuData = Montage.create( Montage, { |
10 | topLevelMenu: { | 10 | topLevelMenu: { |
11 | value: [ | 11 | value: [ |
12 | { | 12 | { |
13 | "header": "File", | 13 | "header": "File", |
14 | "entries": [ | 14 | "entries": [ |
15 | { | 15 | { |
16 | "displayText" : "New Project", | 16 | "displayText" : "New Project", |
17 | "hasSubMenu" : false, | 17 | "hasSubMenu" : false, |
18 | "enabled": false, | 18 | "enabled": false, |
19 | "action": "executeNewProject" | 19 | "action": "executeNewProject" |
20 | }, | 20 | }, |
21 | { | 21 | { |
22 | "displayText" : "New File", | 22 | "displayText" : "New File", |
23 | "hasSubMenu" : false, | 23 | "hasSubMenu" : false, |
24 | "enabled": true, | 24 | "enabled": true, |
25 | "action": "executeNewFile" | 25 | "action": "executeNewFile" |
26 | }, | 26 | }, |
27 | { | 27 | { |
28 | "displayText" : "Open File", | 28 | "displayText" : "Open File", |
29 | "hasSubMenu" : false, | 29 | "hasSubMenu" : false, |
30 | "enabled": true, | 30 | "enabled": true, |
31 | "action": "executeFileOpen" | 31 | "action": "executeFileOpen" |
32 | }, | 32 | }, |
33 | { | 33 | { |
34 | "displayText" : "Close File", | 34 | "displayText" : "Close File", |
35 | "hasSubMenu" : false, | 35 | "hasSubMenu" : false, |
36 | "enabled": true, | 36 | "enabled": { |
37 | "action": "executeFileClose" | 37 | "value": false, |
38 | }, | 38 | "boundObj": "documentController", |
39 | { | 39 | "boundProperty": "activeDocument", |
40 | "displayText" : "", | 40 | "oneway": true, |
41 | "separator": true | 41 | "boundValueMutator": function(activeDocument){ |
42 | }, | 42 | if(activeDocument !== null){return true;} |
43 | { | 43 | else{return false;} |
44 | "displayText" : "Save", | 44 | } |
45 | "hasSubMenu" : false, | 45 | }, |
46 | "enabled": true, | 46 | "action": "executeFileClose" |
47 | "action": "executeSave" | 47 | }, |
48 | }, | 48 | { |
49 | { | 49 | "displayText" : "Close All", |
50 | "displayText" : "Save As", | 50 | "hasSubMenu" : false, |
51 | "hasSubMenu" : false, | 51 | "enabled": { |
52 | "enabled": true, | 52 | "value": false, |
53 | "action":"executeSaveAs" | 53 | "boundObj": "documentController", |
54 | }, | 54 | "boundProperty": "activeDocument", |
55 | { | 55 | "oneway": true, |
56 | "displayText" : "Save All", | 56 | "boundValueMutator": function(activeDocument){ |
57 | "hasSubMenu" : false, | 57 | if(activeDocument !== null){return true;} |
58 | "enabled": true, | 58 | else{return false;} |
59 | "action": "executeSaveAll" | 59 | } |
60 | }, | 60 | }, |
61 | { | 61 | "action": "executeFileCloseAll" |
62 | "displayText" : "", | 62 | }, |
63 | "separator": true | 63 | { |
64 | }, | 64 | "displayText" : "", |
65 | { | 65 | "separator": true |
66 | "displayText" : "Open Project", | 66 | }, |
67 | "hasSubMenu" : false, | 67 | { |
68 | "enabled": false | 68 | "displayText" : "Save", |
69 | }, | 69 | "hasSubMenu" : false, |
70 | { | 70 | "enabled": { |
71 | "displayText" : "Open Recent", | 71 | "value": false, |
72 | "hasSubMenu" : false, | 72 | "boundObj": "documentController", |
73 | "enabled": false | 73 | "boundProperty": "canSave", |
74 | }, | 74 | "oneway": true |
75 | { | 75 | }, |
76 | "displayText" : "Close Project", | 76 | "action": "executeSave" |
77 | "hasSubMenu" : false, | 77 | }, |
78 | "enabled": false | 78 | { |
79 | } | 79 | "displayText" : "Save As", |
80 | ] | 80 | "hasSubMenu" : false, |
81 | }, | 81 | "enabled": { |
82 | { | 82 | "value": false, |
83 | "header": "Edit", | 83 | "boundObj": "documentController", |
84 | "entries": [ | 84 | "boundProperty": "activeDocument", |
85 | { | 85 | "oneway": true, |
86 | "displayText" : "Undo", | 86 | "boundValueMutator": function(activeDocument){ |
87 | "hasSubMenu" : false, | 87 | if(activeDocument !== null){return true;} |
88 | "enabled": { | 88 | else{return false;} |
89 | "value": false, | 89 | } |
90 | "boundObj": "undocontroller", | 90 | }, |
91 | "boundProperty": "canUndo" | 91 | "action":"executeSaveAs" |
92 | }, | 92 | }, |
93 | "action": "executeUndo" | 93 | { |
94 | }, | 94 | "displayText" : "Save All", |
95 | { | 95 | "hasSubMenu" : false, |
96 | "displayText" : "Redo", | 96 | "enabled": { |
97 | "hasSubMenu" : false, | 97 | "value": false, |
98 | "enabled": { | 98 | "boundObj": "documentController", |
99 | "value": false, | 99 | "boundProperty": "canSaveAll", |
100 | "boundObj": "undocontroller", | 100 | "oneway": true, |
101 | "boundProperty": "canRedo" | 101 | "boundValueMutator": function(canSaveAll){ |
102 | }, | 102 | if(canSaveAll === true){return true;} |
103 | "action": "executeRedo" | 103 | else{return false;} |
104 | }, | 104 | } |
105 | { | 105 | }, |
106 | "displayText" : "Cut", | 106 | "action": "executeSaveAll" |
107 | "hasSubMenu" : false, | 107 | }, |
108 | "enabled": true | 108 | { |
109 | }, | 109 | "displayText" : "", |
110 | { | 110 | "separator": true |
111 | "displayText" : "Copy", | 111 | }, |
112 | "hasSubMenu" : false, | 112 | { |
113 | "enabled": true | 113 | "displayText" : "Open Project", |
114 | }, | 114 | "hasSubMenu" : false, |
115 | { | 115 | "enabled": false |
116 | "displayText" : "Paste", | 116 | }, |
117 | "hasSubMenu" : false, | 117 | { |
118 | "enabled": true | 118 | "displayText" : "Open Recent", |
119 | } | 119 | "hasSubMenu" : false, |
120 | ] | 120 | "enabled": false |
121 | }, | 121 | }, |
122 | { | 122 | { |
123 | "header": "View", | 123 | "displayText" : "Close Project", |
124 | "entries": [ | 124 | "hasSubMenu" : false, |
125 | { | 125 | "enabled": false |
126 | "displayText" : "Zoom In", | ||
127 | "hasSubMenu" : false, | ||
128 | "enabled": true | ||
129 | }, | ||
130 | { | ||
131 | "displayText" : "Zoom Out", | ||
132 | "hasSubMenu" : false, | ||
133 | "enabled": true | ||
134 | }, | ||
135 | { | ||
136 | "displayText" : "", | ||
137 | "separator": true | ||
138 | }, | ||
139 | { | ||
140 | "displayText" : "Live Preview", | ||
141 | "hasSubMenu" : false, | ||
142 | "enabled": true, | ||
143 | "checked": { | ||
144 | "value": false, | ||
145 | "boundProperty": "livePreview" | ||
146 | } | 126 | } |
147 | }, | 127 | ] |
148 | { | 128 | }, |
149 | "displayText" : "Chrome Preview", | 129 | { |
150 | "hasSubMenu" : false, | 130 | "header": "Edit", |
151 | "enabled": true, | 131 | "entries": [ |
152 | "checked": { | 132 | { |
153 | "value": false, | 133 | "displayText" : "Undo", |
154 | "boundProperty": "chromePreview" | 134 | "hasSubMenu" : false, |
135 | "enabled": { | ||
136 | "value": false, | ||
137 | "boundObj": "undocontroller", | ||
138 | "boundProperty": "canUndo", | ||
139 | "oneway": true | ||
140 | }, | ||
141 | "action": "executeUndo" | ||
142 | }, | ||
143 | { | ||
144 | "displayText" : "Redo", | ||
145 | "hasSubMenu" : false, | ||
146 | "enabled": { | ||
147 |