aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
Diffstat (limited to 'js/mediators')
-rw-r--r--js/mediators/io-mediator.js21
-rwxr-xr-xjs/mediators/keyboard-mediator.js6
2 files changed, 16 insertions, 11 deletions
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js
index e9958ec3..56869839 100644
--- a/js/mediators/io-mediator.js
+++ b/js/mediators/io-mediator.js
@@ -143,6 +143,16 @@ exports.IoMediator = Montage.create(Component, {
143 // 143 //
144 switch (file.mode) { 144 switch (file.mode) {
145 case 'html': 145 case 'html':
146 //Copy webGL library if needed
147 if (file.webgl.length > 0) {
148 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) {
149 //if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Assets' || this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') {
150 if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') {
151 this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(file.document.root, (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase());
152 }
153 }
154 }
155 //
146 contents = this.parseNinjaTemplateToHtml(file); 156 contents = this.parseNinjaTemplateToHtml(file);
147 break; 157 break;
148 default: 158 default:
@@ -192,17 +202,6 @@ exports.IoMediator = Montage.create(Component, {
192 // 202 //
193 template.document.content.document.body.innerHTML = template.body; 203 template.document.content.document.body.innerHTML = template.body;
194 template.document.content.document.head.innerHTML = template.head; 204 template.document.content.document.head.innerHTML = template.head;
195 //
196 if (template.webgl.length > 0) {
197 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) {
198 if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Assets' || this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') {
199 this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase());
200 }
201 }
202
203 //this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(path, libname);
204 //console.log(this.application.ninja.coreIoApi.ninjaLibrary.libs);
205 }
206 //TODO: Remove temp fix for styles 205 //TODO: Remove temp fix for styles
207 if (template.style) { 206 if (template.style) {
208 template.document.content.document.head.getElementsByTagName('style')[0].innerHTML = this.getCssFromRules(template.style.cssRules); 207 template.document.content.document.head.getElementsByTagName('style')[0].innerHTML = this.getCssFromRules(template.style.cssRules);
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js
index a1fdead3..e8a11ad8 100755
--- a/js/mediators/keyboard-mediator.js
+++ b/js/mediators/keyboard-mediator.js
@@ -201,6 +201,12 @@ exports.KeyboardMediator = Montage.create(Component, {
201 if(this.application.ninja.toolsData) this.application.ninja.toolsData.selectedToolInstance.HandleEscape(evt); 201 if(this.application.ninja.toolsData) this.application.ninja.toolsData.selectedToolInstance.HandleEscape(evt);
202 //menuViewManagerModule.MenuViewManager.closeMenu("mainMenuBar"); 202 //menuViewManagerModule.MenuViewManager.closeMenu("mainMenuBar");
203 } 203 }
204
205 // Check if cmd+a/ctrl+a for Select All
206 if((evt.keyCode == Keyboard.ENTER) && (evt.ctrlKey || evt.metaKey)) {
207 this.application.ninja.executeChromePreview();
208 return;
209 }
204 210
205 if(this.application.ninja.toolsData) this.application.ninja.toolsData.selectedToolInstance.HandleKeyPress(evt); 211 if(this.application.ninja.toolsData) this.application.ninja.toolsData.selectedToolInstance.HandleKeyPress(evt);
206 212