X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=js%2FjqModal%2FjqModal.js;h=db1dd9e7c2fe360475f7f0e25f3b1ca1675be4c5;hb=b873a5bdc5dfbac1daeda52af39cb2dc7ad41575;hp=19ed95519dee8e699e172a7e4c8bfb0ec0629ca3;hpb=97c3c8c2c5d7a35302f9f72c23c7e056ba777a2a;p=kivitendo-erp.git diff --git a/js/jqModal/jqModal.js b/js/jqModal/jqModal.js index 19ed95519..db1dd9e7c 100644 --- a/js/jqModal/jqModal.js +++ b/js/jqModal/jqModal.js @@ -34,6 +34,7 @@ $.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');}; $.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');}; $.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});}; $.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});}; +$.fn.jqmClose=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t);this.remove();});}; $.jqm = { hash:{}, @@ -43,14 +44,13 @@ open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-i else o=F; h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F; - if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}} if(c.ajax) {var r=c.target||h.w,u=c.ajax,r=(typeof r == 'string')?$(r,h.w):$(r),u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u; - r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});} + r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));f(h);});} else if(cc)h.w.jqmAddClose($(cc,h.w)); if(c.toTop&&h.o)h.w.before('').insertAfter(h.o); - (c.onShow)?c.onShow(h):h.w.show();e(h);return F; + (c.onShow)?c.onShow(h):h.w.show();f(h);return F; }, close:function(s){var h=H[s];if(!h.a)return F;h.a=F; if(A[0]){A.pop();if(!A[0])L('unbind');} @@ -58,9 +58,8 @@ close:function(s){var h=H[s];if(!h.a)return F;h.a=F; if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return F; }, params:{}}; -var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),F=false, +var s=0,H=$.jqm.hash,A=[],F=false, i=$('').css({opacity:0}), -e=function(h){if(ie6)if(h.o)h.o.html('
').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);}, f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}}, L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);}, m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;},