diff options
author | Silvio <silvio@socioambiental.org> | 2013-04-30 18:23:29 -0300 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2013-04-30 18:23:29 -0300 |
commit | ffa100d5acacebc42c376e2d95a3b6f4ecc616fe (patch) | |
tree | ac7435565c3ee39e5562c76077585b31c12fe921 | |
parent | 980357177dc492922e6a9f152e94f7c1b30fc167 (diff) | |
download | gmap_arcgis_js-ffa100d5acacebc42c376e2d95a3b6f4ecc616fe.tar.gz gmap_arcgis_js-ffa100d5acacebc42c376e2d95a3b6f4ecc616fe.tar.bz2 |
Stateful showOverlay()
-rw-r--r-- | gmap_arcgis.js | 66 |
1 files changed, 36 insertions, 30 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index 76142ad..289331f 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -32,12 +32,45 @@ function gmapArcgis(config) { // UI unblocker wrapper unblockUI: function() { - jQuery.unblockUI(); + if (this.config.ui == undefined || this.config.ui == 'blocked') { + jQuery.unblockUI(); + this.config.ui = 'unblocked'; + } }, // UI blocker wrapper - blockUI: function() { - jQuery.blockUI(); + blockUI: function(params) { + if (this.config.ui == undefined || this.config.ui == 'unblocked') { + jQuery.blockUI(params); + this.config.ui = 'blocked'; + } + }, + + // Block the UI and show an overlay + showOverlay: function(t) { + if ($.browser.msie === false || $.browser.msie === undefined) { + message = this.config.overlayMessage; + + if (this.config.overlayCss != undefined) { + css = this.config.overlayCss; + } + else { + css = { }; + } + + if (t == false) { + this.blockUI({ + message: message, + css: css, + }); + } else { + this.blockUI({ + message: message, + css: css, + timeout: t, + }); + } + } }, // Count object properties @@ -345,33 +378,6 @@ function gmapArcgis(config) { } }, - // Block the UI and show an overlay - showOverlay: function(t) { - if ($.browser.msie === false || $.browser.msie === undefined) { - message = this.config.overlayMessage; - - if (this.config.overlayCss != undefined) { - css = this.config.overlayCss; - } - else { - css = { }; - } - - if (t == false) { - $.blockUI({ - message: message, - css: css, - }); - } else { - $.blockUI({ - message: message, - css: css, - timeout: t, - }); - } - } - }, - // Change a element in the map changeElement: function(type, element, callback) { if (this.config[type][element] == undefined || this.config[type][element]['showOn'] == undefined) { |