From 2b672f6508a849b8023b0bc114ad15e9ddca5adc Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 24 Feb 2012 13:27:04 -0800 Subject: prefixing the local storage and using the new local-storage object. Signed-off-by: Valerio Virgillito --- js/io/system/coreioapi.js | 6 +++--- js/io/ui/cloudpopup.reel/cloudpopup.js | 4 ++-- js/panels/presets/content.reel/content.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index 2051da43..f428a229 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js @@ -28,9 +28,9 @@ exports.CoreIoApi = Montage.create(Component, { value: function () { //////////////////////////////////////////////////////////// //Checking for local storage of URL for IO - if (window.localStorage['ioRootUrl']) { + if (this.application.localStorage.getItem("ioRootUrl")) { //Getting URL from local storage - this.rootUrl = window.localStorage['ioRootUrl']; + this.rootUrl = this.application.localStorage.getItem("ioRootUrl"); //Checks for IO API to be active this.ioServiceDetected = this.cloudAvailable(); } else { @@ -156,7 +156,7 @@ exports.CoreIoApi = Montage.create(Component, { return this._rootUrl; }, set: function(value) { - this._rootUrl = window.localStorage["ioRootUrl"] = value; + this._rootUrl = this.application.localStorage.setItem("ioRootUrl", value); } }, //////////////////////////////////////////////////////////////////// diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js index d2e82662..a4656bb5 100755 --- a/js/io/ui/cloudpopup.reel/cloudpopup.js +++ b/js/io/ui/cloudpopup.reel/cloudpopup.js @@ -63,8 +63,8 @@ exports.CloudPopup = Montage.create(Component, { enumerable: false, value: function() { // - if (window.localStorage['ioRootUrl']) { - this.components.url.value = window.localStorage['ioRootUrl']; + if (this.application.localStorage.getItem("ioRootUrl")) { + this.components.url.value = this.application.localStorage.getItem("ioRootUrl"); } // this.testConnection(); diff --git a/js/panels/presets/content.reel/content.js b/js/panels/presets/content.reel/content.js index c43c593c..1ede7246 100644 --- a/js/panels/presets/content.reel/content.js +++ b/js/panels/presets/content.reel/content.js @@ -16,7 +16,7 @@ exports.content = Montage.create(Component, { }, templateDidLoad : { value: function() { - var storedTabIndex = window.localStorage.presetsTabIndex; + var storedTabIndex = this.application.localStorage.getItem("presetsTabIndex"); if(storedTabIndex) { this.activeTabIndex = storedTabIndex; } @@ -50,7 +50,7 @@ exports.content = Montage.create(Component, { }, set: function(tabObject) { this.contentPanel = tabObject.key; - window.localStorage.presetsTabIndex = this.tabs.indexOf(tabObject); + this.application.localStorage.setItem("presetsTabIndex", this.tabs.indexOf(tabObject)); this._tabToDeactivate = this._activeTab; this._activeTab = tabObject; -- cgit v1.2.3