Sha256: 18612a7e8bd639b3fe808391d5615464aec6f9aac5ceba71bad37c3ee66adb04

Contents?: true

Size: 1.94 KB

Versions: 28

Compression:

Stored size: 1.94 KB

Contents

/**
 * Copyright (c) 2009 Sergiy Kovalchuk (serg472@gmail.com)
 * 
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *  
 * Following code is based on Element.mask() implementation from ExtJS framework (http://extjs.com/)
 *
 */
(function(a){a.fn.mask=function(c,b){a(this).each(function(){if(b!==undefined&&b>0){var d=a(this);d.data("_mask_timeout",setTimeout(function(){a.maskElement(d,c)},b))}else{a.maskElement(a(this),c)}})};a.fn.unmask=function(){a(this).each(function(){a.unmaskElement(a(this))})};a.fn.isMasked=function(){return this.hasClass("masked")};a.maskElement=function(d,c){if(d.data("_mask_timeout")!==undefined){clearTimeout(d.data("_mask_timeout"));d.removeData("_mask_timeout")}if(d.isMasked()){a.unmaskElement(d)}if(d.css("position")=="static"){d.addClass("masked-relative")}d.addClass("masked");var e=a('<div class="loadmask"></div>');if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){e.height(d.height()+parseInt(d.css("padding-top"))+parseInt(d.css("padding-bottom")));e.width(d.width()+parseInt(d.css("padding-left"))+parseInt(d.css("padding-right")))}if(navigator.userAgent.toLowerCase().indexOf("msie 6")>-1){d.find("select").addClass("masked-hidden")}d.append(e);if(c!==undefined){var b=a('<div class="loadmask-msg" style="display:none;"></div>');b.append("<div>"+c+"</div>");d.append(b);b.css("top",Math.round(d.height()/2-(b.height()-parseInt(b.css("padding-top"))-parseInt(b.css("padding-bottom")))/2)+"px");b.css("left",Math.round(d.width()/2-(b.width()-parseInt(b.css("padding-left"))-parseInt(b.css("padding-right")))/2)+"px");b.show()}};a.unmaskElement=function(b){if(b.data("_mask_timeout")!==undefined){clearTimeout(b.data("_mask_timeout"));b.removeData("_mask_timeout")}b.find(".loadmask-msg,.loadmask").remove();b.removeClass("masked");b.removeClass("masked-relative");b.find("select").removeClass("masked-hidden")}})(jQuery);

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
erp_app-4.2.0 app/assets/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-4.0.0 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.16 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.15 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.14 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.13 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.12 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.11 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.10 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.9 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.8 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.7 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.6 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.5 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.4 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.3 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.2 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.0.16 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.0.15 public/javascripts/jquery_plugins/jquery.loadmask.min.js
erp_app-3.1.1 public/javascripts/jquery_plugins/jquery.loadmask.min.js