1 2 if (opener != null && opener.CKEDITOR !== undefined) { 3 window.onload = function () { 4 jQuery( document ).ready(function() { 5 if ((location.search.split("ckg_media=")[1]||"").split("&")[0] == "link") { 6 jQuery(".select").on("click", function(event) { 7 var $link, id; 8 9 event.preventDefault(); 10 11 $link = jQuery(this); 12 id = $link.attr("id").substr(2); 13 dw_mediamanager.insert(id); 14 return; 15 }); 16 } else if ((location.search.split("ckg_media=")[1]||"").split("&")[0] == "img") { 17 jQuery("#media__linkbtn4").css("display", "none"); 18 ckg_nonimage_overlay(); 19 } 20 }); 21 22 jQuery(document).ajaxComplete(function() { 23 ckg_nonimage_overlay(); 24 }); 25 }; 26 27 jQuery( ".odd, .even" ).each( function( index, element ){ 28 if(!this.title.match(/\.(jpg|jpeg|png|tiff?|gif)$/)){ 29 jQuery( this ).html(LANG.plugins.ckgdoku.mediamgr_notice+": <b>" + this.title +"</b>"); 30 } 31 }); 32 33 } 34 35 function ckg_nonimage_overlay() { 36 if ((location.search.split("ckg_media=")[1]||"").split("&")[0] !== "img") { 37 return; 38 } 39 } 40 41