PageSourceSearch

https://www.usson-en-forez.fr/js/dialog/jquery.dialog.min.js

js usson-en-forez.fr collected 2026-10-02 16:20:13 UTC 4,631 bytes, 1 lines download raw bytes

1!function(window,document,$){var dialogId=0;function Dialog(options){this.options=options,this.$mask=null,this.$dialog=null,this.$scrollContainer=null,this.id=++dialogId}var defaults={body:"",title:"",dynamic:!0,modal:!(Dialog.prototype={show:function(){var self;this.$dialog&&this.$dialog.is(":visible")||(self=this).options.onShowing.call(this,function(nope){nope||self.fetchBodyAndRender()})},createMask:function(loading){this.$mask=$("<div/>").addClass("dialog-mask "+(this.options.transitionMask?"dialog-mask-transition":"")).appendTo("body"),loading&&this.$mask.addClass("dialog-mask-loading"),this.$mask.data("forceRepaint",this.$mask[0].clientHeight).addClass("dialog-mask-active")},fetchBodyAndRender:function(){var body=this.options.body,self=this;"function"==typeof body?(this.createMask(!0),body.call(this,function(body){self.render(body)})):self.render(body)},render:function(body){var self=this,$header=(this.options.modal?(this.$mask?this.$mask.removeClass("dialog-mask-loading"):this.createMask(!1),this.options.closeOnMaskClick&&this.$mask.click(function(){self.hide("mask")}),this.options.allowScrolling||($("body").addClass("dialog-no-scroll"),this.$scrollContainer=$("<div/>").addClass("dialog-scroll-container").appendTo("body"),this.options.closeOnMaskClick&&this.$scrollContainer.click(function(e){e.target===this&&self.hide("mask")}))):this.$mask&&this.$mask.remove(),this.options.closeOnEscape&&$(document).on("keyup.dialog-"+this.id,function(e){27===e.keyCode&&$(".dialog-container").last().data("dialog")===self&&(e.preventDefault(),e.stopImmediatePropagation(),self.hide("escape"),$(document).off("keyup.dialog-"+self.id))}),this.$dialog=$("<div/>").addClass("dialog-container").data("dialog",this),this.options.width&&this.$dialog.css(this.options.fixedDimensions?"width":"min-width",this.options.width),this.options.height&&this.$dialog.css(this.options.fixedDimensions?"height":"min-height",this.options.height),this.options.position&&(this.options.position.top&&this.$dialog.css({marginTop:"auto",top:this.options.position.top}),this.options.position.left)&&this.$dialog.css({marginLeft:"auto",left:this.options.position.left}),$header=$("<div/>").addClass("dialog-header"),this.options.title&&$("<div/>").addClass("dialog-title").text(this.options.title).appendTo($header),this.options.closeX&&$("<div/>").addClass("dialog-close").html("&times;").attr({title:"Close","data-dialog-action":"hide"}).appendTo($header),this.options.closeX||this.options.title||($header=$()),$body=$("<div/>").addClass("dialog-body"),body&&("string"==typeof body?$body.append($("<p/>").text(body)):$body.append(body)),body=$("<div/>").addClass("dialog-footer"),this.options.footer&&("string"==typeof this.options.footer?body.html(this.options.footer):body.append(this.options.footer)),this.$dialog.append($header).append($body).append(body).appendTo(this.$scrollContainer||"body"),this.$dialog.on("click","[data-dialog-action]",function(){"hide"===$(this).attr("data-dialog-action")&&self.hide()}),this.$dialog.outerWidth()),$body=this.$dialog.outerHeight();this.options.dynamic?(this.$dialog.addClass("dynamic"),this.options.position&&this.options.position.left||this.$dialog.css("margin-left",-$header/2),this.options.position&&this.options.position.top||this.$dialog.css("margin-top",-$body/2)):(this.options.position&&this.options.position.top||this.$dialog.css("top",Math.max(this.options.gutter,$(window).height()/2-$body/2)),this.options.position&&this.options.position.left||this.$dialog.css("left",Math.max(this.options.gutter,$(window).width()/2-$header/2))),this.$dialog.trigger("show")},hide:function(catalyst){var self;this.$dialog&&this.$dialog.is(":visible")&&(self=this).options.onHiding.call(this,catalyst,function(nope){nope||(self.$dialog.trigger("hide"),self.$mask&&self.$mask.remove(),self.$scrollContainer&&self.$scrollContainer.remove(),self.$dialog.remove(),$(document).off(".dialog-"+self.id),!self.options.modal)||self.options.allowScrolling||$(".dialog-scroll-container").length||$("body").removeClass("dialog-no-scroll")})}}),fixedDimensions:!1,width:null,height:null,closeOnMaskClick:!0,closeOnEscape:!0,closeX:!0,allowScrolling:!1,gutter:20,position:null,onHiding:function(catalyst,callback){callback()},onShowing:function(callback){callback()},transitionMask:!0,footer:null};$.dialog=function(options){var dialog=new Dialog(options=$.extend({},defaults,options||{}));return options.show&&dialog.show(),dialog},$.fn.dialog=function(method){return this.each(function(){var dialog=$(this).data("dialog");dialog&&"function"==typeof dialog[method]&&dialog[method]()})}}(window,document,jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.