aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/cloudpopup.reel/cloudpopup.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui/cloudpopup.reel/cloudpopup.js')
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.js26
1 files changed, 23 insertions, 3 deletions
diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js
index 7f494dcf..1344661b 100755
--- a/js/io/ui/cloudpopup.reel/cloudpopup.js
+++ b/js/io/ui/cloudpopup.reel/cloudpopup.js
@@ -17,10 +17,15 @@ exports.CloudPopup = Montage.create(Component, {
17 value: true 17 value: true
18 }, 18 },
19 //////////////////////////////////////////////////////////////////// 19 ////////////////////////////////////////////////////////////////////
20 //
21 _os: {
22 value: null
23 },
24 ////////////////////////////////////////////////////////////////////
20 // 25 //
21 components: { 26 components: {
22 enumerable: false, 27 enumerable: false,
23 value: {test_btn: null, ok_btn: null, cancel_btn: null, status: null, url: null} 28 value: {test_btn: null, ok_btn: null, cancel_btn: null, download_btn: null, status: null, url: null}
24 }, 29 },
25 //////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////
26 // 31 //
@@ -33,6 +38,7 @@ exports.CloudPopup = Montage.create(Component, {
33 this.components.cancel_btn = this.element.getElementsByClassName('btn_cancel nj-skinned')[0]; 38 this.components.cancel_btn = this.element.getElementsByClassName('btn_cancel nj-skinned')[0];
34 this.components.status = this.element.getElementsByClassName('status')[0]; 39 this.components.status = this.element.getElementsByClassName('status')[0];
35 this.components.url = this.element.getElementsByClassName('cloud_url')[0]; 40 this.components.url = this.element.getElementsByClassName('cloud_url')[0];
41 this.components.download_btn = this.element.getElementsByClassName('btn_download nj-skinned')[0];
36 } 42 }
37 }, 43 },
38 //////////////////////////////////////////////////////////////////// 44 ////////////////////////////////////////////////////////////////////
@@ -41,7 +47,11 @@ exports.CloudPopup = Montage.create(Component, {
41 enumerable: false, 47 enumerable: false,
42 value: function() { 48 value: function() {
43 // 49 //
44 50 if (navigator.appVersion.indexOf("Win")!=-1) {
51 this._os = 'windows';
52 } else if (navigator.appVersion.indexOf("Mac")!=-1) {
53 this._os = 'mac';
54 }
45 } 55 }
46 }, 56 },
47 //////////////////////////////////////////////////////////////////// 57 ////////////////////////////////////////////////////////////////////
@@ -62,6 +72,8 @@ exports.CloudPopup = Montage.create(Component, {
62 enumerable: false, 72 enumerable: false,
63 value: function() { 73 value: function() {
64 // 74 //
75 this.components.download_btn.addEventListener('click', this.downloadCloudApp.bind(this), false);
76 //
65 this.components.test_btn.addEventListener('click', this.testConnection.bind(this), false); 77 this.components.test_btn.addEventListener('click', this.testConnection.bind(this), false);
66 // 78 //
67 this.components.ok_btn.addEventListener('click', this.closeDialog.bind(this), false); 79 this.components.ok_btn.addEventListener('click', this.closeDialog.bind(this), false);
@@ -69,7 +81,15 @@ exports.CloudPopup = Montage.create(Component, {
69 } 81 }
70 }, 82 },
71 //////////////////////////////////////////////////////////////////// 83 ////////////////////////////////////////////////////////////////////
72 //this.application.ninja.coreIoApi.hideCloudDialog 84 //
85 downloadCloudApp: {
86 enumerable: false,
87 value: function() {
88 console.log(this._os);
89 }
90 },
91 ////////////////////////////////////////////////////////////////////
92 //
73 testConnection: { 93 testConnection: {
74 enumerable: false, 94 enumerable: false,
75 value: function() { 95 value: function() {