X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=js%2Fjquery.joverlay.js;h=cf4e159986d95d96fae0887fb8de90e88081d414;hb=905d621b6f4fed60deb772df691c15e4a57a1902;hp=e4effec8e74703f7af97b564ba0898c42c82c278;hpb=8d9827c9afe92caaca5615713f26d46475346dd3;p=quix0rs-gnu-social.git diff --git a/js/jquery.joverlay.js b/js/jquery.joverlay.js index e4effec8e7..cf4e159986 100644 --- a/js/jquery.joverlay.js +++ b/js/jquery.joverlay.js @@ -1,6 +1,6 @@ /* Copyright (c) 2009 Alvaro A. Lima Jr http://alvarojunior.com/jquery/joverlay.html * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) - * Version: 0.7.1 (JUN 15, 2009) + * Version: 0.8 (OUT 19, 2009) * Requires: jQuery 1.3+ */ @@ -9,43 +9,54 @@ // Global vars var isIE6 = $.browser.msie && $.browser.version == 6.0; // =( var JOVERLAY_TIMER = null; - var JOVERLAY_ELEMENT_PREV = null; $.fn.jOverlay = function(options) { // Element exist? if ( $('#jOverlay').length ) {$.closeOverlay();} - // Clear Element Prev - JOVERLAY_ELEMENT_PREV = null; - // Clear Timer if (JOVERLAY_TIMER !== null) { clearTimeout( JOVERLAY_TIMER ); } // Set Options - var options = $.extend({}, $.fn.jOverlay.options, options); + var options = $.extend({}, $.fn.jOverlay.options, options || {}); - // private function - function center(id) { - if (options.center) { - $.center(id); - } - } + // success deprecated !!! Use onSuccess + var onSuccess = options.onSuccess || options.success; var element = this.is('*') ? this : '#jOverlayContent'; + var position = isIE6 ? 'absolute' : 'fixed'; + var isImage = /([^\/\\]+)\.(png|gif|jpeg|jpg|bmp)$/i.test( options.url ); var imgLoading = options.imgLoading ? "" : ''; + // private function + function center(id) { + if (options.center) { + $.center(id); + } else if( isIE6 ) { + $.center('#jOverlayContent',{ + 'top' : $(window).scrollTop() + 'px', + 'marginLeft' : '', + 'marginTop' : '', + 'left' : '' + }); + } + } + $('body').prepend(imgLoading + "
" + "