aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-01 13:56:49 -0800
committerJose Antonio Marquez2012-02-01 13:56:49 -0800
commitb354ea65f7c53ce05aff6a204853e666f084950f (patch)
tree0516192943deea4d36b1c4b7c83ca5b8ce730246 /js/io/ui
parent42122c5c708769e11b626654bf3d989b6b0eddad (diff)
downloadninja-b354ea65f7c53ce05aff6a204853e666f084950f.tar.gz
Adding cancel functionality to cloud popup
Added the functionality to the cloud pupup cancel button to set the rootURL to null if selected, ok button will allow the value to remain as last input. Test button tests the URL, and therefore set it, but does not handling closing the dialog.
Diffstat (limited to 'js/io/ui')
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js
index e8558179..7f494dcf 100755
--- a/js/io/ui/cloudpopup.reel/cloudpopup.js
+++ b/js/io/ui/cloudpopup.reel/cloudpopup.js
@@ -51,6 +51,9 @@ exports.CloudPopup = Montage.create(Component, {
51 value: function() { 51 value: function() {
52 // 52 //
53 this.testConnection(); 53 this.testConnection();
54 if (this.application.ninja.coreIoApi.cloudAvailable()) {
55 this.closeDialog();
56 }
54 } 57 }
55 }, 58 },
56 //////////////////////////////////////////////////////////////////// 59 ////////////////////////////////////////////////////////////////////
@@ -62,7 +65,7 @@ exports.CloudPopup = Montage.create(Component, {
62 this.components.test_btn.addEventListener('click', this.testConnection.bind(this), false); 65 this.components.test_btn.addEventListener('click', this.testConnection.bind(this), false);
63 // 66 //
64 this.components.ok_btn.addEventListener('click', this.closeDialog.bind(this), false); 67 this.components.ok_btn.addEventListener('click', this.closeDialog.bind(this), false);
65 this.components.cancel_btn.addEventListener('click', this.closeDialog.bind(this), false); 68 this.components.cancel_btn.addEventListener('click', this.cancelDialog.bind(this), false);
66 } 69 }
67 }, 70 },
68 //////////////////////////////////////////////////////////////////// 71 ////////////////////////////////////////////////////////////////////
@@ -90,6 +93,16 @@ exports.CloudPopup = Montage.create(Component, {
90 // 93 //
91 this.application.ninja.coreIoApi.hideCloudDialog(); 94 this.application.ninja.coreIoApi.hideCloudDialog();
92 } 95 }
96 },
97 ////////////////////////////////////////////////////////////////////
98 //
99 cancelDialog: {
100 enumerable: false,
101 value: function() {
102 //
103 this.application.ninja.coreIoApi.rootUrl = null;
104 this.application.ninja.coreIoApi.hideCloudDialog();
105 }
93 } 106 }
94 //////////////////////////////////////////////////////////////////// 107 ////////////////////////////////////////////////////////////////////
95 //////////////////////////////////////////////////////////////////// 108 ////////////////////////////////////////////////////////////////////