diff options
Diffstat (limited to 'js/io')
-rwxr-xr-x | js/io/system/coreioapi.js | 21 | ||||
-rwxr-xr-x | js/io/ui/cloudpopup.reel/cloudpopup.js | 2 | ||||
-rw-r--r-- | js/io/ui/cloudpopup.reel/css/cloudpopup.css | 2 | ||||
-rwxr-xr-x | js/io/ui/cloudpopup.reel/css/cloudpopup.scss | 2 |
4 files changed, 17 insertions, 10 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 | } |
diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js index f81dc93c..d256f226 100755 --- a/js/io/ui/cloudpopup.reel/cloudpopup.js +++ b/js/io/ui/cloudpopup.reel/cloudpopup.js | |||
@@ -75,7 +75,7 @@ exports.CloudPopup = Montage.create(Component, { | |||
75 | // | 75 | // |
76 | if (this.application.ninja.coreIoApi.cloudAvailable()) { | 76 | if (this.application.ninja.coreIoApi.cloudAvailable()) { |
77 | this.components.status.style.color = '#77FF00'; | 77 | this.components.status.style.color = '#77FF00'; |
78 | this.components.status.innerHTML = 'Connected'; | 78 | this.components.status.innerHTML = 'Connected to '+this.application.ninja.coreIoApi.cloudData.name; |
79 | } else { | 79 | } else { |
80 | this.components.status.style.color = '#FF3A3A'; | 80 | this.components.status.style.color = '#FF3A3A'; |
81 | this.components.status.innerHTML = 'Disconnected'; | 81 | this.components.status.innerHTML = 'Disconnected'; |
diff --git a/js/io/ui/cloudpopup.reel/css/cloudpopup.css b/js/io/ui/cloudpopup.reel/css/cloudpopup.css index 81e0742f..b42263b9 100644 --- a/js/io/ui/cloudpopup.reel/css/cloudpopup.css +++ b/js/io/ui/cloudpopup.reel/css/cloudpopup.css | |||
@@ -116,5 +116,5 @@ | |||
116 | width: 80px; | 116 | width: 80px; |
117 | text-align: center; | 117 | text-align: center; |
118 | float: right; | 118 | float: right; |
119 | margin: 4px 0px 0px 8px; | 119 | margin: 8px 0px 0px 8px; |
120 | } | 120 | } |
diff --git a/js/io/ui/cloudpopup.reel/css/cloudpopup.scss b/js/io/ui/cloudpopup.reel/css/cloudpopup.scss index ec03eb01..1ae5579b 100755 --- a/js/io/ui/cloudpopup.reel/css/cloudpopup.scss +++ b/js/io/ui/cloudpopup.reel/css/cloudpopup.scss | |||
@@ -121,5 +121,5 @@ $grey_light: #494949; | |||
121 | width: 80px; | 121 | width: 80px; |
122 | text-align: center; | 122 | text-align: center; |
123 | float: right; | 123 | float: right; |
124 | margin: 4px 0px 0px 8px; | 124 | margin: 8px 0px 0px 8px; |
125 | } \ No newline at end of file | 125 | } \ No newline at end of file |