From d4a110bf2c7a949c627966ed01db7a4d32d62757 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 24 Feb 2012 10:04:19 -0800 Subject: Adding back Ink Bottle tool in the tool bar so QE can test ink bottle functionality without having to wait for the new icon and location of the tool. Signed-off-by: Nivesh Rajbhandari --- js/mediators/keyboard-mediator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/mediators') diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index a4bf9baa..5b044f8a 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js @@ -165,14 +165,14 @@ exports.KeyboardMediator = Montage.create(Component, { // Hand tool if(evt.keyCode === Keyboard.H ) { evt.preventDefault(); - this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[13]}); + this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[14]}); return; } // Zoom tool if(evt.keyCode === Keyboard.Z ) { evt.preventDefault(); - this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[14]}); + this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[15]}); return; } -- cgit v1.2.3 From 9a87513929290b6f84a090b4b4cca8fab0f2ab81 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 24 Feb 2012 14:51:29 -0800 Subject: Added import/export of RDGE data This is only the IO aspect, the data getter seems broken for 2D canvas and does not allow for save, and nothing works for setting the data on load. However, the IO aspect of saving and opening the data are not incorporated. --- js/mediators/io-mediator.js | 47 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) (limited to 'js/mediators') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index c4f3b361..e5eb1fc6 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -195,11 +195,10 @@ exports.IoMediator = Montage.create(Component, { } }, //////////////////////////////////////////////////////////////////// - //TODO: Expand to allow more templates + //TODO: Expand to allow more templates, clean up variables parseNinjaTemplateToHtml: { enumerable: false, value: function (template) { - //TODO: Clean up variables //Injecting head and body into old document template.document.content.document.body.innerHTML = template.body; template.document.content.document.head.innerHTML = template.head; @@ -210,7 +209,7 @@ exports.IoMediator = Montage.create(Component, { //Looping through link tags and removing file recreated elements for (var j in styletags) { if (styletags[j].getAttribute) { - if(styletags[j].getAttribute('ninjauri') !== null) { + if(styletags[j].getAttribute('ninjauri') !== null) {//TODO: Use querySelectorAll try { //Checking head first template.document.content.document.head.removeChild(styletags[j]); @@ -228,7 +227,7 @@ exports.IoMediator = Montage.create(Component, { } //TODO: Add logic to only enble tags we disabled for (var l in linktags) { - if (linktags[l].getAttribute && linktags[l].getAttribute('disabled')) { + if (linktags[l].getAttribute && linktags[l].getAttribute('disabled')) {//TODO: Use querySelectorAll linktags[l].removeAttribute('disabled'); } } @@ -259,7 +258,7 @@ exports.IoMediator = Montage.create(Component, { for(var i in template.css) { if (template.css[i].ownerNode) { if (template.css[i].ownerNode.getAttribute) { - if (template.css[i].ownerNode.getAttribute('ninjauri') === null) { + if (template.css[i].ownerNode.getAttribute('ninjauri') === null) {//TODO: Use querySelectorAll //Inseting data from rules array into