diff options
Diffstat (limited to 'js/data')
-rwxr-xr-x | js/data/menu-data.js | 2 | ||||
-rwxr-xr-x | js/data/settings.js | 71 | ||||
-rwxr-xr-x | js/data/tools-data.js | 8 |
3 files changed, 5 insertions, 76 deletions
diff --git a/js/data/menu-data.js b/js/data/menu-data.js index 7c3ca5d4..52710b3a 100755 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js | |||
@@ -44,7 +44,7 @@ exports.MenuData = Montage.create( Montage, { | |||
44 | "displayText" : "Save As", | 44 | "displayText" : "Save As", |
45 | "hasSubMenu" : false, | 45 | "hasSubMenu" : false, |
46 | "enabled": true, | 46 | "enabled": true, |
47 | "action":"saveAs" | 47 | "action":"executeSaveAs" |
48 | }, | 48 | }, |
49 | { | 49 | { |
50 | "displayText" : "Save All", | 50 | "displayText" : "Save All", |
diff --git a/js/data/settings.js b/js/data/settings.js deleted file mode 100755 index ffea2075..00000000 --- a/js/data/settings.js +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
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 | Component = require("montage/ui/component").Component, | ||
9 | LocalStorage = require("js/controllers/local-storage-controller").LocalStorage; | ||
10 | |||
11 | exports.Settings = Montage.create( Component, { | ||
12 | |||
13 | version: { | ||
14 | value: "11.1213" | ||
15 | }, | ||
16 | |||
17 | _settings: { | ||
18 | value: null | ||
19 | }, | ||
20 | |||
21 | settings: { | ||
22 | get: function() { return this._settings; }, | ||
23 | set: function(value) { this._settings = value; } | ||
24 | }, | ||
25 | |||
26 | getSetting: { | ||
27 | value: function(objName, fieldName, namespace) { | ||
28 | try { | ||
29 | objName = objName.replace(/-/gi, "_").replace(/\//gi, "zzSlash"); | ||
30 | return this.settings[objName][fieldName]; | ||
31 | } catch(e) { | ||
32 | return null; | ||
33 | } | ||
34 | } | ||
35 | }, | ||
36 | |||
37 | setSetting: { | ||
38 | value: function(objName, fieldName, value, namespace) { | ||
39 | try { | ||
40 | objName = objName.replace(/-/gi, "_").replace(/\//gi, "zzSlash"); | ||
41 | |||
42 | if(this.settings === null) { | ||
43 | this.settings = {}; | ||
44 | } | ||
45 | |||
46 | if (this.settings[objName] == null) { | ||
47 | this.settings[objName] = {}; | ||
48 | } | ||
49 | |||
50 | this.settings[objName][fieldName] = value; | ||
51 | |||
52 | LocalStorage.setItem("settings", this.settings); | ||
53 | } catch(e) { | ||
54 | return null; | ||
55 | } | ||
56 | } | ||
57 | }, | ||
58 | |||
59 | deserializedFromSerialization: { | ||
60 | value: function() { | ||
61 | |||
62 | if (LocalStorage.getItem("version") != this.version) { | ||
63 | this.settings = {} | ||
64 | LocalStorage.setItem("version",this.version); | ||
65 | } else { | ||
66 | this.settings = LocalStorage.getItem("settings"); | ||
67 | } | ||
68 | |||
69 | } | ||
70 | } | ||
71 | }); \ No newline at end of file | ||
diff --git a/js/data/tools-data.js b/js/data/tools-data.js index cf48757d..faf3336f 100755 --- a/js/data/tools-data.js +++ b/js/data/tools-data.js | |||
@@ -37,7 +37,7 @@ exports.ToolsData = Montage.create(Montage, { | |||
37 | "properties": "rotate3DProperties", | 37 | "properties": "rotate3DProperties", |
38 | "spriteSheet": true, | 38 | "spriteSheet": true, |
39 | "action": "Rotate3DTool", | 39 | "action": "Rotate3DTool", |
40 | "toolTip": "3D Rotate Object Tool (W)", | 40 | "toolTip": "3D Object Rotate Tool (W)", |
41 | "cursor": "auto", | 41 | "cursor": "auto", |
42 | "lastInGroup": false, | 42 | "lastInGroup": false, |
43 | "container": false, | 43 | "container": false, |
@@ -48,7 +48,7 @@ exports.ToolsData = Montage.create(Montage, { | |||
48 | "properties": "translate3DProperties", | 48 | "properties": "translate3DProperties", |
49 | "spriteSheet": true, | 49 | "spriteSheet": true, |
50 | "action": "Translate3DTool", | 50 | "action": "Translate3DTool", |
51 | "toolTip": "3D Translate Object Tool (G)", | 51 | "toolTip": "3D Object Translate Tool (G)", |
52 | "cursor": "auto", | 52 | "cursor": "auto", |
53 | "lastInGroup": true, | 53 | "lastInGroup": true, |
54 | "container": false, | 54 | "container": false, |
@@ -141,7 +141,7 @@ exports.ToolsData = Montage.create(Montage, { | |||
141 | "spriteSheet": true, | 141 | "spriteSheet": true, |
142 | "action": "BrushTool", | 142 | "action": "BrushTool", |
143 | "toolTip": "Brush Tool", | 143 | "toolTip": "Brush Tool", |
144 | "cursor": "url('images/tools/brush_down.png'), default", | 144 | "cursor": "url('images/tools/brush_down.png') 9 17, default", |
145 | "lastInGroup": false, | 145 | "lastInGroup": false, |
146 | "container": false, | 146 | "container": false, |
147 | "selected": false | 147 | "selected": false |
@@ -195,7 +195,7 @@ exports.ToolsData = Montage.create(Montage, { | |||
195 | "properties": "rotateStageProperties", | 195 | "properties": "rotateStageProperties", |
196 | "spriteSheet": true, | 196 | "spriteSheet": true, |
197 | "action": "RotateStageTool3D", | 197 | "action": "RotateStageTool3D", |
198 | "toolTip": "3D Rotate Stage Tool", | 198 | "toolTip": "3D Stage Rotate Tool (M)", |
199 | "cursor": "auto", | 199 | "cursor": "auto", |
200 | "lastInGroup": false, | 200 | "lastInGroup": false, |
201 | "container": false, | 201 | "container": false, |