From 6bc07657c8ef58e6efddd383748ecf84d1c789ad Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 16 Feb 2012 15:58:26 -0800 Subject: Adding new RDGE library data --- js/mediators/io-mediator.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'js/mediators') 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, { // switch (file.mode) { case 'html': + //Copy webGL library if needed + if (file.webgl.length > 0) { + for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { + //if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Assets' || this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { + if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { + 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()); + } + } + } + // contents = this.parseNinjaTemplateToHtml(file); break; default: @@ -192,17 +202,6 @@ exports.IoMediator = Montage.create(Component, { // template.document.content.document.body.innerHTML = template.body; template.document.content.document.head.innerHTML = template.head; - // - if (template.webgl.length > 0) { - for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { - if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Assets' || this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { - 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()); - } - } - - //this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(path, libname); - //console.log(this.application.ninja.coreIoApi.ninjaLibrary.libs); - } //TODO: Remove temp fix for styles if (template.style) { template.document.content.document.head.getElementsByTagName('style')[0].innerHTML = this.getCssFromRules(template.style.cssRules); -- cgit v1.2.3 From d47c4c0f6053fb8390526f32c2ee08dee0bdec20 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 17 Feb 2012 15:22:23 -0800 Subject: Chrome Preview --- js/mediators/keyboard-mediator.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/mediators') 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, { if(this.application.ninja.toolsData) this.application.ninja.toolsData.selectedToolInstance.HandleEscape(evt); //menuViewManagerModule.MenuViewManager.closeMenu("mainMenuBar"); } + + // Check if cmd+a/ctrl+a for Select All + if((evt.keyCode == Keyboard.ENTER) && (evt.ctrlKey || evt.metaKey)) { + this.application.ninja.executeChromePreview(); + return; + } if(this.application.ninja.toolsData) this.application.ninja.toolsData.selectedToolInstance.HandleKeyPress(evt); -- cgit v1.2.3