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 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'js/io') 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(); -- cgit v1.2.3