Current Path : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/ |
Current File : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/modal_backdrop.min.js |
define ("core/modal_backdrop",["jquery","core/templates","core/notification"],function(a,b,c){var d={ROOT:"[data-region=\"modal-backdrop\"]"},e=function(b){this.root=a(b);this.isAttached=!1;if(!this.root.is(d.ROOT)){c.exception({message:"Element is not a modal backdrop"})}};e.prototype.getRoot=function(){return this.root};e.prototype.attachToDOM=function(){if(this.isAttached){return}a("body").append(this.root);this.isAttached=!0};e.prototype.setZIndex=function(a){this.root.css("z-index",a)};e.prototype.isVisible=function(){return this.root.hasClass("show")};e.prototype.hasTransitions=function(){return this.getRoot().hasClass("fade")};e.prototype.show=function(){if(this.isVisible()){return}if(!this.isAttached){this.attachToDOM()}this.root.removeClass("hide").addClass("show")};e.prototype.hide=function(){if(!this.isVisible()){return}if(this.hasTransitions()){this.getRoot().one("transitionend webkitTransitionEnd oTransitionEnd",function(){this.getRoot().removeClass("show").addClass("hide")}.bind(this))}else{this.getRoot().removeClass("show").addClass("hide")}};e.prototype.destroy=function(){this.root.remove()};return e}); //# sourceMappingURL=modal_backdrop.min.js.map