diff options
author | Jose Antonio Marquez Russo | 2012-02-20 15:49:59 -0800 |
---|---|---|
committer | Jose Antonio Marquez Russo | 2012-02-20 15:49:59 -0800 |
commit | 205474042553704dd19b78ac0f909eb2acded2cd (patch) | |
tree | cfa3878216dd054812c5d1c5ffa966300a9a5a2b | |
parent | 6787b29cfaa723c5c181baeb05160cfd4aadfe0f (diff) | |
parent | 98390588819b4871882fed2e0c9c627ec2d4a4af (diff) | |
download | ninja-205474042553704dd19b78ac0f909eb2acded2cd.tar.gz |
Merge pull request #11 from ericguzman/StylesControllerUpdates
Styles controller updates
-rwxr-xr-x | js/controllers/styles-controller.js | 7 | ||||
-rwxr-xr-x | js/io/ui/cloudpopup.reel/cloudpopup.js | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 44ca50e1..885d710f 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -571,6 +571,10 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
571 | rules = [], | 571 | rules = [], |
572 | win = element.ownerDocument.defaultView, | 572 | win = element.ownerDocument.defaultView, |
573 | self = this; | 573 | self = this; |
574 | |||
575 | if(!win) { | ||
576 | return null; | ||
577 | } | ||
574 | 578 | ||
575 | if(!omitPseudos) { | 579 | if(!omitPseudos) { |
576 | pseudos.concat(['link', 'visited', 'active', 'hover', 'focus', 'first-letter', | 580 | pseudos.concat(['link', 'visited', 'active', 'hover', 'focus', 'first-letter', |
@@ -674,8 +678,9 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
674 | } | 678 | } |
675 | 679 | ||
676 | var matchingElements, i; | 680 | var matchingElements, i; |
681 | |||
677 | for(i = 0; i < specArr.length; i++) { | 682 | for(i = 0; i < specArr.length; i++) { |
678 | matchingElements = win.document.querySelectorAll(specArr[i].selector); | 683 | matchingElements = element.ownerDocument.querySelectorAll(specArr[i].selector); |
679 | if(nj.toArray(matchingElements).indexOf(element) !== -1) { | 684 | if(nj.toArray(matchingElements).indexOf(element) !== -1) { |
680 | return specArr[i]; | 685 | return specArr[i]; |
681 | } | 686 | } |
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 | |||
@@ -63,6 +63,10 @@ exports.CloudPopup = Montage.create(Component, { | |||
63 | enumerable: false, | 63 | enumerable: false, |
64 | value: function() { | 64 | value: function() { |
65 | // | 65 | // |
66 | if (window.localStorage['ioRootUrl']) { | ||
67 | this.components.url.value = window.localStorage['ioRootUrl']; | ||
68 | } | ||
69 | // | ||
66 | this.testConnection(); | 70 | this.testConnection(); |
67 | if (this.application.ninja.coreIoApi.cloudAvailable()) { | 71 | if (this.application.ninja.coreIoApi.cloudAvailable()) { |
68 | this.closeDialog(); | 72 | this.closeDialog(); |