aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/ninja.css2
-rw-r--r--index.html40
-rw-r--r--js/components/treeview/ninja-branch.reel/ninja-branch.css11
-rw-r--r--js/components/treeview/ninja-leaf.reel/ninja-leaf.css2
-rw-r--r--js/components/treeview/treeview.reel/treeview.html2
-rw-r--r--manifest.json25
-rw-r--r--ninja_icon_128.pngbin0 -> 8742 bytes
-rw-r--r--scss/imports/scss/_PanelUI.scss2
-rw-r--r--versions.json8
9 files changed, 63 insertions, 29 deletions
diff --git a/css/ninja.css b/css/ninja.css
index 8ce60a10..ba434f42 100644
--- a/css/ninja.css
+++ b/css/ninja.css
@@ -408,7 +408,7 @@ span.pp-span-all:focus { -webkit-box-shadow: none; background-color: #b4b4b4; bo
408 408
409#pp-container-list li, #pp-container-list span.span-space { background-repeat: no-repeat; } 409#pp-container-list li, #pp-container-list span.span-space { background-repeat: no-repeat; }
410 410
411#pp-container-list li.directory.open > span.pp-span-all > span.pp-col-files > span.span-space { background-image: url("../images/panels/project-panel/icon-file-folderopen.png"); background-position: 100% 0px; } 411#pp-container-list li.directory.open > span.pp-span-all > span.pp-col-files > span.span-space, .branch-label { background-image: url("../images/panels/project-panel/icon-file-folderopen.png"); background-position: 100% 0px; }
412 412
413#pp-container-list li.directory.closed > span.pp-span-all > span.pp-col-files > span.span-space { background-image: url("../images/panels/project-panel/icon-file-folderclosed.png"); background-position: 100% 0px; } 413#pp-container-list li.directory.closed > span.pp-span-all > span.pp-col-files > span.span-space { background-image: url("../images/panels/project-panel/icon-file-folderclosed.png"); background-position: 100% 0px; }
414 414
diff --git a/index.html b/index.html
index f3018823..53bd6605 100644
--- a/index.html
+++ b/index.html
@@ -172,21 +172,35 @@
172 if(navigator.userAgent.toLowerCase().indexOf("chrome") === -1) { 172 if(navigator.userAgent.toLowerCase().indexOf("chrome") === -1) {
173 window.location = "./redirect.html"; 173 window.location = "./redirect.html";
174 } 174 }
175 // Load the version json 175 window.ninjaVersion = {};
176 var req = new XMLHttpRequest(); 176 window.ninjaVersion.ninja = {};
177 req.open("GET", "versions.json"); 177 if (window.chrome.app.isInstalled) {
178 req.onreadystatechange = (function(req) { 178 // Ninja is running as an installed app, started via the app launcher.
179 return function(event) { 179 var info = chrome.app.getDetails();
180 if (req.readyState === 4) { 180 if(info) {
181 if (req.status === 200) { 181 window.ninjaVersion.ninja.version = info.version;
182 window.ninjaVersion = JSON.parse(req.responseText); 182 }
183 } else { 183 } else {
184 console.log("Ninja version file could not be loaded"); 184 // Ninja is running via a bookmark/link as a hosted web application.
185 // Load the version json
186 var req = new XMLHttpRequest();
187 req.open("GET", "manifest.json");
188 req.onreadystatechange = (function(req) {
189 return function(event) {
190 if (req.readyState === 4) {
191 if (req.status === 200) {
192 var manifestInfo = JSON.parse(req.responseText);
193 if(manifestInfo) {
194 window.ninjaVersion.ninja.version = manifestInfo.version;
195 }
196 } else {
197 console.log("Ninja version file could not be loaded");
198 }
185 } 199 }
186 } 200 }
187 } 201 })(req);
188 })(req); 202 req.send();
189 req.send(); 203 }
190 // 204 //
191 var star = document.getElementById('star'); 205 var star = document.getElementById('star');
192 // 206 //
diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.css b/js/components/treeview/ninja-branch.reel/ninja-branch.css
index 6a458cc7..d8c212e8 100644
--- a/js/components/treeview/ninja-branch.reel/ninja-branch.css
+++ b/js/components/treeview/ninja-branch.reel/ninja-branch.css
@@ -18,14 +18,15 @@
18 width: 100%; 18 width: 100%;
19} 19}
20.treeRoot .branch .branch-label { 20.treeRoot .branch .branch-label {
21 border-bottom: 1px solid #505050;
22 cursor: pointer;
23 padding: 3px 0 4px;
24 background-repeat: no-repeat; 21 background-repeat: no-repeat;
25 background-position: 3px 2px; 22 background-position: 3px 2px;
26 box-shadow: 0 0 0 0 rgba(0,0,0,0); 23 border-bottom: 1px solid #505050;
27 font-weight: bold;
28 box-shadow: 0 3px 4px -4px rgba(0,0,0,0.2); 24 box-shadow: 0 3px 4px -4px rgba(0,0,0,0.2);
25 color: #FFF;
26 cursor: pointer;
27 font-weight: bold;
28 padding: 3px 0 4px;
29 text-shadow: 1px 1px 0 #000;
29} 30}
30 31
31/* First Level */ 32/* First Level */
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
index b2f427b5..085b11e0 100644
--- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
+++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
@@ -19,6 +19,8 @@
19/* Second level */ 19/* Second level */
20.branch .branch .leaf-label { 20.branch .branch .leaf-label {
21 background-position: 25px center; 21 background-position: 25px center;
22 box-shadow: 0 3px 4px -4px rgba(0,0,0,0.2);
23 color: #FFF;
22 padding-left: 45px; 24 padding-left: 45px;
23} 25}
24/* Third level */ 26/* Third level */
diff --git a/js/components/treeview/treeview.reel/treeview.html b/js/components/treeview/treeview.reel/treeview.html
index d70b016c..4f9e6a72 100644
--- a/js/components/treeview/treeview.reel/treeview.html
+++ b/js/components/treeview/treeview.reel/treeview.html
@@ -26,7 +26,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
26 "name" : "Branch" 26 "name" : "Branch"
27 }, 27 },
28 "defaultLeaf" : { 28 "defaultLeaf" : {
29 "module" : "js/components/treeview/presets-leaf.reel", 29 "module" : "js/components/treeview/leaf.reel",
30 "name" : "Leaf" 30 "name" : "Leaf"
31 }, 31 },
32 "scrollview": { 32 "scrollview": {
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 00000000..12047172
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,25 @@
1{
2 "name": "Motorola Ninja",
3 "description": "Motorola Ninja HTML5 Authoring Tool Pre-Alpha",
4 "version": "0.5.0.0",
5 "app": {
6 "launch": {
7 "local_path": "index.html"
8 }
9 },
10 "icons": {
11 "128": "ninja_icon_128.png"
12 },
13 "permissions": [
14 "unlimitedStorage",
15 "notifications"
16 ],
17 "requirements": {
18 "3D": {
19 "features": ["css3d", "webgl"]
20 }
21 },
22 "minimum_chrome_version": "16.0.0.0",
23 "offline_enabled": true,
24 "update_url": "http://tetsubo.org/go/ninjaupdate"
25} \ No newline at end of file
diff --git a/ninja_icon_128.png b/ninja_icon_128.png
new file mode 100644
index 00000000..6f609f4a
--- /dev/null
+++ b/ninja_icon_128.png
Binary files differ
diff --git a/scss/imports/scss/_PanelUI.scss b/scss/imports/scss/_PanelUI.scss
index 21ada556..ccac99ca 100644
--- a/scss/imports/scss/_PanelUI.scss
+++ b/scss/imports/scss/_PanelUI.scss
@@ -563,7 +563,7 @@ span.pp-span-all:focus {
563#pp-container-list span.span-space { 563#pp-container-list span.span-space {
564 background-repeat: no-repeat; 564 background-repeat: no-repeat;
565} 565}
566#pp-container-list li.directory.open > span.pp-span-all > span.pp-col-files > span.span-space { 566#pp-container-list li.directory.open > span.pp-span-all > span.pp-col-files > span.span-space, .branch-label {
567 background-image:url("../images/panels/project-panel/icon-file-folderopen.png"); 567 background-image:url("../images/panels/project-panel/icon-file-folderopen.png");
568 background-position: 100% 0px; 568 background-position: 100% 0px;
569} 569}
diff --git a/versions.json b/versions.json
deleted file mode 100644
index 017e22ce..00000000
--- a/versions.json
+++ /dev/null
@@ -1,8 +0,0 @@
1{
2 "ninja": {
3 "version": "0.5.5"
4 },
5 "montage": {
6 "version": "0.6.0"
7 }
8} \ No newline at end of file