//= Javascript für Overlays, Loader etc. //= require jquery.ui.draggable //== Loading Overlay showLoading = function(show_text){ ol = $("#loadingOverlay"); ol.height($("#maklertools").height()); ol.width($("#maklertools").width()); ol.fadeIn(200); } hideLoading = function(){ $("#loadingOverlay").fadeOut(200); } hideSmarty = function(){ $('#smarty_area').fadeOut(400); } //== Ajax Overlay //== Info-Overlay initInfoOverlay = function(id){ overlay = $("#"+id) overlay.hide() dwidth = window.innerWidth dheight = window.innerHeight overlay.css({'max-width': (dwidth*0.9)+'px', 'max-height': (dheight*0.75)+'px'}); owidth = overlay.width(); oheight = overlay.height(); overlay.css({left: ((dwidth/2)-(owidth/2))+'px', top: ((dheight/2)-(oheight/2))+'px', width: owidth+'px', height: (oheight+25)+'px', position: "fixed"}); overlay.fadeIn(500); } //== Helper-Funktionen // Ausblenden hideAjaxOverlay = function(id_tmp){ $("#"+id_tmp).slideUp(); } // Ajax Fullscreen Overlay setAjaxFullscreen = function(id){ overlay = $("#"+id); dwidth = window.innerWidth dheight = window.innerHeight overlay.css({'width': (dwidth*0.9)+'px', 'height': (dheight*0.8)+'px'}); // // overlay.animate({left: "0px", top: "49px", width: ($(document).width())+"px", height: (window.outerHeight-154)+"px"}, 200); // overlay.css("max-width", "100%"); } // Z-Index setzen // Overlay Z-Index Setter initOverlayZindexSetter = function(over){ var zindexes = new Array $("div.<%= AJAX_OVERLAY_CLASS %>, div.<%= INFO_OVERLAY_CLASS %>").each(function(){ zindexes.push(parseInt($(this).css('z-index'))); }); zindex_max = parseInt(zindexes.sort().reverse()[0]); // neues Overlay z-index setzen over.css('z-index', zindex_max+1); zindex_max = parseInt(over.css('z-index')); $('#'+over.attr('id')).click(function(){ $(this).css('z-index', zindex_max+1); zindex_max = parseInt($(this).css('z-index')); }); }