From 3251315ecc22544dab50623ee5862e00dfe02302 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Mon, 20 Feb 2012 15:15:37 -0800 Subject: check cloud availability before open file picker and new file dialogs Signed-off-by: Ananya Sen --- js/io/ui/cloudpopup.reel/cloudpopup.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js/io/ui') diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js index a2283d46..8e24f1a1 100755 --- a/js/io/ui/cloudpopup.reel/cloudpopup.js +++ b/js/io/ui/cloudpopup.reel/cloudpopup.js @@ -23,6 +23,12 @@ exports.CloudPopup = Montage.create(Component, { }, //////////////////////////////////////////////////////////////////// // + callback:{ + writable:true, + enumerable:true, + value:null + }, + // components: { enumerable: false, value: {test_btn: null, ok_btn: null, cancel_btn: null, download_btn: null, status: null, url: null} @@ -121,6 +127,10 @@ exports.CloudPopup = Montage.create(Component, { value: function() { // this.application.ninja.coreIoApi.hideCloudDialog(); + this.application.ninja.coreIoApi._cloudDialogOpen=false; + if(!!this.callback){ + this.callback(); + } } }, //////////////////////////////////////////////////////////////////// @@ -131,6 +141,7 @@ exports.CloudPopup = Montage.create(Component, { // this.application.ninja.coreIoApi.rootUrl = null; this.application.ninja.coreIoApi.hideCloudDialog(); + this.application.ninja.coreIoApi._cloudDialogOpen=false; } } //////////////////////////////////////////////////////////////////// -- cgit v1.2.3