aboutsummaryrefslogtreecommitdiff
path: root/js/io/system
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/system')
-rwxr-xr-xjs/io/system/coreioapi.js21
1 files changed, 14 insertions, 7 deletions
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, {
27 this.rootUrl = window.localStorage['ioRootUrl']; 27 this.rootUrl = window.localStorage['ioRootUrl'];
28 //Checks for IO API to be active 28 //Checks for IO API to be active
29 this.ioServiceDetected = this.cloudAvailable(); 29 this.ioServiceDetected = this.cloudAvailable();
30 //
31 console.log('Cloud Status: URL detected in localStorage as '+this.rootUrl);
32 } else { 30 } else {
33 // 31 //IO API to be inactive
34 this.ioServiceDetected = false; 32 this.ioServiceDetected = false;
35 console.log('Cloud Status: No URL detected in localStorage');
36 } 33 }
37 } 34 }
38 }, 35 },
@@ -41,9 +38,12 @@ exports.CoreIoApi = Montage.create(Component, {
41 cloudAvailable: { 38 cloudAvailable: {
42 enumerable: false, 39 enumerable: false,
43 value: function () { 40 value: function () {
41 var cloud = this.getCloudStatus();
44 // 42 //
45 if (this.rootUrl && this.getCloudStatus().status === 200) { 43 if (this.rootUrl && cloud.status === 200) {
46 //Active 44 //Active
45 this.cloudData.name = cloud.response['name'];
46 this.cloudData.root = cloud.response['server-root'];
47 return true; 47 return true;
48 } else { 48 } else {
49 //Inactive 49 //Inactive
@@ -62,6 +62,12 @@ exports.CoreIoApi = Montage.create(Component, {
62 }, 62 },
63 //////////////////////////////////////////////////////////////////// 63 ////////////////////////////////////////////////////////////////////
64 // 64 //
65 cloudData: {
66 enumerable: false,
67 value: {name: null, root: ''}
68 },
69 ////////////////////////////////////////////////////////////////////
70 //
65 _cloudDialogComponents: { 71 _cloudDialogComponents: {
66 enumerable: false, 72 enumerable: false,
67 value: {blackout: null, popup: null, dialog: null} 73 value: {blackout: null, popup: null, dialog: null}
@@ -223,8 +229,8 @@ exports.CoreIoApi = Montage.create(Component, {
223 if((urlOut.length > 1) && (urlOut.charAt(urlOut.length - 1) === "/")){ 229 if((urlOut.length > 1) && (urlOut.charAt(urlOut.length - 1) === "/")){
224 urlOut = urlOut.substring(0, (urlOut.length - 1)); 230 urlOut = urlOut.substring(0, (urlOut.length - 1));
225 } 231 }
226 232 //
227 return serviceURL + urlOut; 233 return String(serviceURL+urlOut);
228 } 234 }
229 }, 235 },
230 //////////////////////////////////////////////////////////////////// 236 ////////////////////////////////////////////////////////////////////
@@ -1009,6 +1015,7 @@ exports.CoreIoApi = Montage.create(Component, {
1009 // 1015 //
1010 if (xhr.readyState === 4) { 1016 if (xhr.readyState === 4) {
1011 retValue.status = xhr.status; 1017 retValue.status = xhr.status;
1018 eval('retValue.response = '+xhr.response);
1012 retValue.success = true; 1019 retValue.success = true;
1013 } 1020 }
1014 } 1021 }