1$(document).ready(function() { 2 vmarkt_confirm_extern_initiate(); 3}); 4 5function vmarkt_confirm_extern_initiate(tgt) { 6 if(typeof(tgt)=="undefined") { 7 var tgt=$("body"); 8 } 9 else if(typeof(tgt)=="string") { 10 var tgt=$("#"+tgt); 11 } 12 else if(typeof(tgt)=="object") { 13 var tgt=$(tgt); 14 } 15 16 $(tgt).find('a.confirm_extern, a.confirm_intern').on("click", function(e) { 17 e.preventDefault(); 18 var href = $(this).attr('href'); 19 var target = $(this).attr('target'); 20 // console.log(href); 21 // console.log(target); 22 $.ajax({ 23 url: 'core/json/linkconfirm.php', 24 dataType: "json", 25 type: 'GET', 26 success: function (data) { 27 // console.log(data); 28 if(data.html!="") { 29 $("body").prepend("<div class=\"confirm_link_overlay ontop\"><div class=\"confirm_link_extern\">"+data.html+"</div></div>"); 30 $(".confirm_link_overlay").on("click", function(event) { 31 if(event.target==this) { 32 linkconfirm_close(); 33 } 34 }); 35 $("body .confirm_link_extern form").on("submit", function(e) { 36 e.preventDefault; 37 if(check_user_confirm($(this))===true) { 38 linkconfirm_close(); 39 if(typeof(target)=="undefined" || target=="_top") { 40 document.location.href=href; 41 } 42 else { 43 window.open(href); 44 } 45 } 46 else { 47 $('.confirm_link_extern').addClass("error"); 48 setTimeout(function() { 49 $(".confirm_link_extern").removeClass('error'); 50 }, 1000); 51 //alert("Bitte bestätigen Sie die angezeigten Punkte!"); 52 } 53 return false; 54 }); 55 } 56 } 57 }); 58 }); 59 60 $(tgt).find('iframe.confirm_extern').each(function(layindex) { 61 var iframe=$(this); 62 63 //Get Styles 64 var iframeCss = window.getComputedStyle(iframe[0]); 65 66 iframe.addClass("linkconfirm--unconfirmed"); 67 68 $.ajax({ 69 url: 'core/json/linkconfirm.php', 70 dataType: "json", 71 type: 'GET', 72 success: function (data) { 73 if(data.html!="") { 74 var lay_id="confirm_ext_"+layindex; 75 var temp="<div id=\""+lay_id+"\" class=\"confirm_iframe_extern\">"+data.html+"</div>"; 76 $(temp).insertAfter(iframe); 77 $("#"+lay_id).find(".confirm_close").remove(); 78 $("#"+lay_id).find("form").on("submit", function(e) { 79 e.preventDefault; 80 if(check_user_confirm($(this))===true) { 81 iframeconfirm_close(lay_id, true); 82 } 83 else { 84 $("#"+lay_id).addClass("error"); 85 setTimeout(function() { 86 $("#"+lay_id).removeClass('error'); 87 }, 1000); 88 //alert("Bitte bestätigen Sie die angezeigten Punkte!"); 89 } 90 return false; 91 }); 92 93 //Styles vom iframe auf DIV anwenden 94 $("#"+lay_id).css("width", iframeCss.width); 95 $("#"+lay_id).css("height", iframeCss.height); 96 if(iframeCss.position!="static") { 97 $("#"+lay_id).css("position", iframeCss.position); 98 $("#"+lay_id).css("left", iframeCss.left); 99 $("#"+lay_id).css("top", iframeCss.top); 100 $("#"+lay_id).css("right", iframeCss.right); 101 $("#"+lay_id).css("bottom", iframeCss.bottom); 102 } 103 104 if(iframeCss.position!="absolute") { 105 $("#"+lay_id).css("transform", 'translateY(-100%)'); 106 $("#"+lay_id).css("margin-bottom", '-'+iframeCss.height); 107 } 108 // $("#"+lay_id).css("right", right); 109 // $("#"+lay_id).css("top", top); 110 // $("#"+lay_id).css("bottom", bottom); 111 // $("#"+lay_id).css("margin", margin); 112 113 //IDs korrigieren 114 $("#"+lay_id).find("input").each(function() { 115 id=$(this).attr("id"); 116 if(typeof(id)!=="undefined") { 117 $(this).attr("id", id+""+layindex); 118 } 119 }); 120 $("#"+lay_id).find("label").each(function() { 121 temp=$(this).attr("for"); 122 if(typeof(temp)!=="undefined") { 123 $(this).attr("for", temp+""+layindex); 124 } 125 }); 126 } 127 } 128 }); 129 }); 130} 131 132function check_user_confirm(f) { 133 var ok=true; 134 $(f).find("input[type=checkbox]:not(:checked)").each(function() { 135 ok=false; 136 }); 137 return ok; 138} 139 140function linkconfirm_close() { 141 $(".confirm_link_extern").remove(); 142 $(".confirm_link_overlay").remove(); 143 $(".linkconfirm_overflow").css("overflow", "inherit"); 144 $(".linkconfirm_overflow").removeClass("linkconfirm_overflow"); 145} 146function iframeconfirm_close(lay_id, ok) { 147 if(ok===true) { 148 $("#"+lay_id).prev("iframe").removeClass("linkconfirm--unconfirmed"); 149 $("#"+lay_id).prev("iframe").removeClass("linkconfirm--disabled"); 150 $("#"+lay_id).remove(); 151 } 152 else { 153 //$("#"+lay_id).prev("iframe").addClass("linkconfirm--disabled"); 154 $("#"+lay_id).addClass('declined'); 155 } 156} 157/* 158########################################################################## 159########## Versionshistorie: 160########################################################################## 161 162+ Version 1: fw-Implementierung direkt 163*/
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.