From a9f81445afbc10b246ebbbcf99a0db11a9679021 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 20 Feb 2012 11:23:47 -0800 Subject: Styles controller - Check for element's window object before querying for matching css rules. --- js/controllers/styles-controller.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 44ca50e1..71e2c7f9 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js @@ -571,6 +571,10 @@ var stylesController = exports.StylesController = Montage.create(Component, { rules = [], win = element.ownerDocument.defaultView, self = this; + + if(!win) { + return null; + } if(!omitPseudos) { pseudos.concat(['link', 'visited', 'active', 'hover', 'focus', 'first-letter', -- cgit v1.2.3 From a62b6a5c231ab83e682b5e3831b38824788c0707 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 20 Feb 2012 15:08:49 -0800 Subject: Cloud URL localStorage Fix Fixed logic to remember and display the previously used URL for local cloud if not started on Ninja load. --- js/io/ui/cloudpopup.reel/cloudpopup.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js index a2283d46..d2e82662 100755 --- a/js/io/ui/cloudpopup.reel/cloudpopup.js +++ b/js/io/ui/cloudpopup.reel/cloudpopup.js @@ -62,6 +62,10 @@ exports.CloudPopup = Montage.create(Component, { draw: { enumerable: false, value: function() { + // + if (window.localStorage['ioRootUrl']) { + this.components.url.value = window.localStorage['ioRootUrl']; + } // this.testConnection(); if (this.application.ninja.coreIoApi.cloudAvailable()) { -- cgit v1.2.3 From c743b291e91b6de8440ecba0ddaf62546c1692f1 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 20 Feb 2012 15:46:23 -0800 Subject: Styles Controller -Fix invalid variable reference when looking for element's window object --- js/controllers/styles-controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 44ca50e1..7d5dc42b 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js @@ -674,8 +674,9 @@ var stylesController = exports.StylesController = Montage.create(Component, { } var matchingElements, i; + for(i = 0; i < specArr.length; i++) { - matchingElements = win.document.querySelectorAll(specArr[i].selector); + matchingElements = element.ownerDocument.querySelectorAll(specArr[i].selector); if(nj.toArray(matchingElements).indexOf(element) !== -1) { return specArr[i]; } -- cgit v1.2.3