From 372604713c2f7ac5c0b0ef475cf4043ba3194fec Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 31 Jan 2012 23:34:44 -0800 Subject: Cloud API Popup Fixes Minor layout fixes, adjusted functionality slightly, need to check into adjusting the file and directory URL constructs for API changes. --- js/io/system/coreioapi.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'js/io/system/coreioapi.js') diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index 6b803f22..74b066ac 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js @@ -27,12 +27,9 @@ exports.CoreIoApi = Montage.create(Component, { this.rootUrl = window.localStorage['ioRootUrl']; //Checks for IO API to be active this.ioServiceDetected = this.cloudAvailable(); - // - console.log('Cloud Status: URL detected in localStorage as '+this.rootUrl); } else { - // + //IO API to be inactive this.ioServiceDetected = false; - console.log('Cloud Status: No URL detected in localStorage'); } } }, @@ -41,9 +38,12 @@ exports.CoreIoApi = Montage.create(Component, { cloudAvailable: { enumerable: false, value: function () { + var cloud = this.getCloudStatus(); // - if (this.rootUrl && this.getCloudStatus().status === 200) { + if (this.rootUrl && cloud.status === 200) { //Active + this.cloudData.name = cloud.response['name']; + this.cloudData.root = cloud.response['server-root']; return true; } else { //Inactive @@ -62,6 +62,12 @@ exports.CoreIoApi = Montage.create(Component, { }, //////////////////////////////////////////////////////////////////// // + cloudData: { + enumerable: false, + value: {name: null, root: ''} + }, + //////////////////////////////////////////////////////////////////// + // _cloudDialogComponents: { enumerable: false, value: {blackout: null, popup: null, dialog: null} @@ -223,8 +229,8 @@ exports.CoreIoApi = Montage.create(Component, { if((urlOut.length > 1) && (urlOut.charAt(urlOut.length - 1) === "/")){ urlOut = urlOut.substring(0, (urlOut.length - 1)); } - - return serviceURL + urlOut; + // + return String(serviceURL+urlOut); } }, //////////////////////////////////////////////////////////////////// @@ -1009,6 +1015,7 @@ exports.CoreIoApi = Montage.create(Component, { // if (xhr.readyState === 4) { retValue.status = xhr.status; + eval('retValue.response = '+xhr.response); retValue.success = true; } } -- cgit v1.2.3