@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
3 lines (2 loc) • 1.39 kB
JavaScript
!function(n){"function"==typeof define&&define.amd?define(["kendo.core.min"],n):n()}((function(){var n,t,e,i,o,a;n=window.kendo.jQuery,t=window.kendo,e=t.mobile.ui,i=e.Widget,o=n.map(t.eventMap,(function(n){return n})).join(" ").split(" "),a=i.extend({init:function(t,e){var o=this,a=n('<div class="km-loader"><span class="km-loading km-spin"></span><span class="km-loading-left"></span><span class="km-loading-right"></span></div>');i.fn.init.call(o,a,e),o.container=t,o.captureEvents=!1,o._attachCapture(),a.append(o.options.loading).hide().appendTo(t)},options:{name:"Loader",loading:"<h1>Loading...</h1>",timeout:100},show:function(){var n=this;clearTimeout(n._loading),!1!==n.options.loading&&(n.captureEvents=!0,n._loading=setTimeout((function(){n.element.show()}),n.options.timeout))},hide:function(){this.captureEvents=!1,clearTimeout(this._loading),this.element.hide()},changeMessage:function(n){this.options.loading=n,this.element.find(">h1").html(n)},transition:function(){this.captureEvents=!0,this.container.css("pointer-events","none")},transitionDone:function(){this.captureEvents=!1,this.container.css("pointer-events","")},_attachCapture:function(){var n=this;function t(t){n.captureEvents&&t.preventDefault()}n.captureEvents=!1;for(var e=0;e<o.length;e++)n.container[0].addEventListener(o[e],t,!0)}}),e.plugin(a)}));
//# sourceMappingURL=kendo.mobile.loader.min.js.map