aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindex.html40
-rwxr-xr-xjs/components/combobox.reel/combobox.js91
-rw-r--r--js/components/controllers/tree-controller.js185
-rwxr-xr-xjs/components/popup-manager.reel/popup-manager.js2
-rwxr-xr-xjs/components/tools-properties/fill-properties.reel/fill-properties.html11
-rwxr-xr-xjs/components/tools-properties/fill-properties.reel/fill-properties.js6
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html12
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js6
-rwxr-xr-xjs/components/tools-properties/line-properties.reel/line-properties.js14
-rwxr-xr-xjs/components/tools-properties/oval-properties.reel/oval-properties.js14
-rwxr-xr-xjs/components/tools-properties/rect-properties.reel/rect-properties.js14
-rwxr-xr-xjs/components/tools-properties/shape-properties.reel/shape-properties.css6
-rwxr-xr-xjs/components/tools-properties/shape-properties.reel/shape-properties.html35
-rwxr-xr-xjs/components/tools-properties/shape-properties.reel/shape-properties.js36
-rwxr-xr-xjs/components/tools-properties/tag-properties.reel/tag-properties.html6
-rw-r--r--js/components/treeview/branch.reel/branch.css22
-rw-r--r--js/components/treeview/branch.reel/branch.html147
-rw-r--r--js/components/treeview/branch.reel/branch.js48
-rw-r--r--js/components/treeview/leaf.reel/leaf.css10
-rw-r--r--js/components/treeview/leaf.reel/leaf.html43
-rw-r--r--js/components/treeview/leaf.reel/leaf.js44
-rw-r--r--js/components/treeview/ninja-branch.reel/ninja-branch.css40
-rw-r--r--js/components/treeview/ninja-branch.reel/ninja-branch.html150
-rw-r--r--js/components/treeview/ninja-branch.reel/ninja-branch.js131
-rw-r--r--js/components/treeview/ninja-leaf.reel/ninja-leaf.css28
-rw-r--r--js/components/treeview/ninja-leaf.reel/ninja-leaf.html43
-rw-r--r--js/components/treeview/ninja-leaf.reel/ninja-leaf.js41
-rw-r--r--js/components/treeview/tree-node.js103
-rw-r--r--js/components/treeview/treeview.reel/treeview.css5
-rw-r--r--js/components/treeview/treeview.reel/treeview.html55
-rw-r--r--js/components/treeview/treeview.reel/treeview.js129
-rwxr-xr-xjs/controllers/color-controller.js100
-rwxr-xr-xjs/controllers/elements/element-controller.js89
-rwxr-xr-xjs/controllers/elements/shapes-controller.js132
-rwxr-xr-xjs/controllers/styles-controller.js232
-rw-r--r--js/controllers/tree-controller.js185
-rwxr-xr-xjs/data/pi/pi-data.js76
-rwxr-xr-xjs/data/tools-data.js6
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js47
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js15
-rwxr-xr-xjs/helper-classes/RDGE/GLCircle.js79
-rwxr-xr-xjs/helper-classes/RDGE/GLGeomObj.js51
-rwxr-xr-xjs/helper-classes/RDGE/GLLine.js27
-rwxr-xr-xjs/helper-classes/RDGE/GLRectangle.js65
-rwxr-xr-xjs/helper-classes/RDGE/GLWorld.js2
-rwxr-xr-xjs/helper-classes/RDGE/MaterialsLibrary.js2
-rw-r--r--js/io/system/chromeapi.js408
-rwxr-xr-xjs/io/system/coreioapi.js48
-rw-r--r--js/io/system/ninjalibrary.js287
-rw-r--r--js/io/system/ninjalibrary.json6
-rwxr-xr-xjs/mediators/drag-drop-mediator.js11
-rwxr-xr-xjs/mediators/element-mediator.js40
-rwxr-xr-xjs/mediators/keyboard-mediator.js6
-rwxr-xr-xjs/models/color-model.js43
-rwxr-xr-xjs/models/element-model.js8
-rwxr-xr-xjs/models/shape-model.js5
-rwxr-xr-xjs/panels/Color/colortoolbar.reel/colortoolbar.js68
-rwxr-xr-xjs/panels/properties/content.reel/content.js142
-rwxr-xr-xjs/panels/properties/sections/custom.reel/custom.js14
-rwxr-xr-xjs/preloader/Preloader.js1
-rwxr-xr-xjs/stage/layout.js19
-rwxr-xr-xjs/tools/FillTool.js20
-rwxr-xr-xjs/tools/LineTool.js13
-rwxr-xr-xjs/tools/OvalTool.js23
-rwxr-xr-xjs/tools/RectTool.js23
-rwxr-xr-xjs/tools/ShapeTool.js1
-rwxr-xr-xjs/tools/TagTool.js12
-rw-r--r--manifest.json25
-rw-r--r--ninja_icon.pngbin0 -> 8742 bytes
-rw-r--r--ninja_icon_128.pngbin0 -> 8742 bytes
-rw-r--r--node_modules/descriptor.json1
-rwxr-xr-xnode_modules/montage/core/event/binding.js4
-rwxr-xr-xnode_modules/montage/core/event/event-manager.js4
-rwxr-xr-xnode_modules/montage/core/promise.js11
-rwxr-xr-xnode_modules/montage/ui/component.js48
-rw-r--r--node_modules/montage/ui/composer/composer.js14
-rw-r--r--node_modules/montage/ui/composer/swipe-composer.js24
-rwxr-xr-xnode_modules/montage/ui/slot.reel/slot.js5
-rwxr-xr-xscss/config.rb (renamed from _scss/config.rb)0
-rwxr-xr-xscss/imports/codemirror/_codemirror.scss (renamed from _scss/imports/codemirror/_codemirror.scss)0
-rwxr-xr-xscss/imports/codemirror/_css.scss (renamed from _scss/imports/codemirror/_css.scss)0
-rwxr-xr-xscss/imports/codemirror/_javascript.scss (renamed from _scss/imports/codemirror/_javascript.scss)0
-rwxr-xr-xscss/imports/scss/_Base.scss (renamed from _scss/imports/scss/_Base.scss)0
-rwxr-xr-xscss/imports/scss/_Components.scss (renamed from _scss/imports/scss/_Components.scss)0
-rwxr-xr-xscss/imports/scss/_MainWindow.scss (renamed from _scss/imports/scss/_MainWindow.scss)0
-rwxr-xr-xscss/imports/scss/_MenuUI.scss (renamed from _scss/imports/scss/_MenuUI.scss)0
-rwxr-xr-xscss/imports/scss/_PanelUI.scss (renamed from _scss/imports/scss/_PanelUI.scss)0
-rwxr-xr-xscss/imports/scss/_ScrollBars.scss (renamed from _scss/imports/scss/_ScrollBars.scss)0
-rw-r--r--scss/imports/scss/_Stage.scss194
-rwxr-xr-xscss/imports/scss/_Tools.scss (renamed from _scss/imports/scss/_Tools.scss)0
-rwxr-xr-xscss/imports/scss/_ToolsSample.scss (renamed from _scss/imports/scss/_ToolsSample.scss)0
-rwxr-xr-xscss/imports/scss/_UserContent.scss (renamed from _scss/imports/scss/_UserContent.scss)0
-rwxr-xr-xscss/imports/scss/_mixins.scss (renamed from _scss/imports/scss/_mixins.scss)0
-rwxr-xr-xscss/imports/scss/_toolbar.scss (renamed from _scss/imports/scss/_toolbar.scss)0
-rwxr-xr-xscss/imports/themes/_test.scss (renamed from _scss/imports/themes/_test.scss)0
-rwxr-xr-xscss/imports/themes/default/_colors.scss (renamed from _scss/imports/themes/default/_colors.scss)0
-rwxr-xr-xscss/imports/themes/default/_fonts.scss (renamed from _scss/imports/themes/default/_fonts.scss)0
-rwxr-xr-xscss/imports/themes/default/_mixins.scss (renamed from _scss/imports/themes/default/_mixins.scss)0
-rwxr-xr-xscss/ninja.scss (renamed from _scss/ninja.scss)1
-rw-r--r--versions.json8
100 files changed, 3297 insertions, 865 deletions
diff --git a/index.html b/index.html
index 2fbf524a..de1d0b2e 100755
--- a/index.html
+++ b/index.html
@@ -125,21 +125,35 @@
125 if(navigator.userAgent.toLowerCase().indexOf("chrome") === -1) { 125 if(navigator.userAgent.toLowerCase().indexOf("chrome") === -1) {
126 window.location = "./redirect.html"; 126 window.location = "./redirect.html";
127 } 127 }
128 // Load the version json 128 window.ninjaVersion = {};
129 var req = new XMLHttpRequest(); 129 window.ninjaVersion.ninja = {};
130 req.open("GET", "versions.json"); 130 if (window.chrome.app.isInstalled) {
131 req.onreadystatechange = (function(req) { 131 // Ninja is running as an installed app, started via the app launcher.
132 return function(event) { 132 var info = chrome.app.getDetails();
133 if (req.readyState === 4) { 133 if(info) {
134 if (req.status === 200) { 134 window.ninjaVersion.ninja.version = info.version;
135 window.ninjaVersion = JSON.parse(req.responseText); 135 }
136 } else { 136 } else {
137 console.log("Ninja version file could not be loaded"); 137 // Ninja is running via a bookmark/link as a hosted web application.
138 // Load the version json
139 var req = new XMLHttpRequest();
140 req.open("GET", "manifest.json");
141 req.onreadystatechange = (function(req) {
142 return function(event) {
143 if (req.readyState === 4) {
144 if (req.status === 200) {
145 var manifestInfo = JSON.parse(req.responseText);
146 if(manifestInfo) {
147 window.ninjaVersion.ninja.version = manifestInfo.version;
148 }
149 } else {
150 console.log("Ninja version file could not be loaded");
151 }
138 } 152 }
139 } 153 }
140 } 154 })(req);
141 })(req); 155 req.send();
142 req.send(); 156 }
143 // 157 //
144 var star = document.getElementById('star'); 158 var star = document.getElementById('star');
145 // 159 //
diff --git a/js/components/combobox.reel/combobox.js b/js/components/combobox.reel/combobox.js
index a68a7d6b..bc433f52 100755
--- a/js/components/combobox.reel/combobox.js
+++ b/js/components/combobox.reel/combobox.js
@@ -15,7 +15,7 @@ exports.Combobox = Montage.create(Component, {
15 }, 15 },
16 16
17 _wasSetByCode: { 17 _wasSetByCode: {
18 enumerable: false, 18 enumerable: true,
19 value: true 19 value: true
20 }, 20 },
21 21
@@ -27,6 +27,14 @@ exports.Combobox = Montage.create(Component, {
27 value: null 27 value: null
28 }, 28 },
29 29
30 dataField: {
31 value: null
32