From eb8223a286e3703a0b7995f5472aaec8dcffd7f8 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 22 Feb 2012 11:35:35 -0800 Subject: Color chips expect a color object, not a css value. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/stage-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/controllers') diff --git a/js/controllers/elements/stage-controller.js b/js/controllers/elements/stage-controller.js index a8546662..f9adcda2 100755 --- a/js/controllers/elements/stage-controller.js +++ b/js/controllers/elements/stage-controller.js @@ -76,9 +76,9 @@ exports.StageController = Montage.create(ElementController, { value: function(el, p) { switch(p) { case "background" : - return el.elementModel.stageBackground.style.getProperty(p); + return this.application.ninja.colorController.getColorObjFromCss(el.elementModel.stageBackground.style.getProperty(p)); case "border": - return el.elementModel.stageView.style.getProperty(p); + return this.application.ninja.colorController.getColorObjFromCss(el.elementModel.stageView.style.getProperty(p)); case "height": return el.elementModel.stageDimension.style.getProperty(p); case "width": -- cgit v1.2.3 From dae612ccef06a18eb7cccc2fd9d0db13ec4ef5f9 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 22 Feb 2012 11:49:47 -0800 Subject: Do not use color object for stage's border since we don't allow users to modify the stage's border; we only need the border-width. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/stage-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/controllers') diff --git a/js/controllers/elements/stage-controller.js b/js/controllers/elements/stage-controller.js index f9adcda2..abad3736 100755 --- a/js/controllers/elements/stage-controller.js +++ b/js/controllers/elements/stage-controller.js @@ -78,7 +78,7 @@ exports.StageController = Montage.create(ElementController, { case "background" : return this.application.ninja.colorController.getColorObjFromCss(el.elementModel.stageBackground.style.getProperty(p)); case "border": - return this.application.ninja.colorController.getColorObjFromCss(el.elementModel.stageView.style.getProperty(p)); + return el.elementModel.stageView.style.getProperty(p); case "height": return el.elementModel.stageDimension.style.getProperty(p); case "width": -- cgit v1.2.3 From 79da052891a3d8cfb70489edb71619f27bfe3939 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Wed, 22 Feb 2012 13:45:28 -0800 Subject: Fix for bug that keeps Ninja from launching over HTTP. We need to wrap any extension specific code in an if (window.chrome.app.isInstalled) check. --- js/controllers/document-controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/controllers') diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 7491ef9f..fa611de4 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js @@ -85,7 +85,9 @@ var DocumentController = exports.DocumentController = Montage.create(Component, handleAppLoaded: { value: function() { //Adding an intercept to resources loaded to ensure user assets load from cloud simulator - chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: [""]}, ["blocking"]); + if (window.chrome.app.isInstalled) { + chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: [""]}, ["blocking"]); + } } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 41b69af7c0be3dd5fe4f772668862696af8b917a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 23 Feb 2012 15:07:28 -0800 Subject: Fixing app mode check. Signed-off-by: Valerio Virgillito --- js/controllers/document-controller.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'js/controllers') diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index fa611de4..1c9d9d59 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js @@ -84,8 +84,13 @@ var DocumentController = exports.DocumentController = Montage.create(Component, // handleAppLoaded: { value: function() { - //Adding an intercept to resources loaded to ensure user assets load from cloud simulator - if (window.chrome.app.isInstalled) { + //Checking for app to be loaded through extension + var check; + if (chrome && chrome.app) { + check = chrome.app.getDetails(); + } + if (check !== null) { + //Adding an intercept to resources loaded to ensure user assets load from cloud simulator chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: [""]}, ["blocking"]); } } -- cgit v1.2.3