aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2013-07-29 17:08:18 -0300
committerSilvio <silvio@socioambiental.org>2013-07-29 17:08:18 -0300
commit23656069bcbcd2092267ab2942912f949f5f6c4b (patch)
tree07095d855760d5b37ed092a5e7b11048ca1c1877
parent4da80d04185a06a8d1fb04ad6b9abfaecbbb6017 (diff)
downloadgmap_arcgis_js-23656069bcbcd2092267ab2942912f949f5f6c4b.tar.gz
gmap_arcgis_js-23656069bcbcd2092267ab2942912f949f5f6c4b.tar.bz2
Using window.ui for block/unblock
-rw-r--r--gmap_arcgis.js22
1 files changed, 15 insertions, 7 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index 9303c8f..715aeb0 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -32,12 +32,18 @@ function gmapArcgis(config) {
// UI unblocker wrapper
unblockUI: function() {
- jQuery.unblockUI();
+ if (window.ui == undefined || window.ui == 'blocked') {
+ jQuery.unblockUI();
+ window.ui = 'unblocked';
+ }
},
// UI blocker wrapper
blockUI: function(params) {
- this.config.ui = 'blocked';
+ if (window.ui == undefined || window.ui == 'unblocked') {
+ jQuery.blockUI(params);
+ window.ui = 'blocked';
+ }
},
// Block the UI and show an overlay
@@ -58,14 +64,16 @@ function gmapArcgis(config) {
if (t == false) {
this.blockUI({
- message: message,
- css: css,
+ message: message,
+ css: css,
+ onUnblock: this.unBlockUI,
});
} else {
this.blockUI({
- message: message,
- css: css,
- timeout: t,
+ message: message,
+ css: css,
+ timeout: t,
+ onUnblock: this.unBlockUI,
});
}
}