1// +-------------------------------------------------+ 2// � 2002-2010 PMB Services / www.sigb.net [email protected] et contributeurs (voir www.sigb.net) 3// +-------------------------------------------------+ 4// $Id: visionneuse.js,v 1.21 2017/07/21 12:39:33 vtouchard Exp $ 5 6function open_visionneuse(callbackFunction,explnum_id){ 7 callback = function(){ 8 return callbackFunction(explnum_id); 9 } 10 var visionneuse = document.createElement('div'); 11 visionneuse.setAttribute('id','visionneuse'); 12 document.getElementsByTagName('body')[0].appendChild(visionneuse); 13 visionneuse.setAttribute('style','position:absolute;left:0;z-index:9000'); 14 visionneuse.setAttribute('onclick','close_visionneuse();'); 15 visionneuse.style.top=getWindowScrollY(); 16 visionneuse.style.width="100%"; 17 visionneuse.style.height="100%"; 18 19 var background = document.createElement('div'); 20 background.setAttribute('id','visionneuseBackground'); 21 visionneuse.appendChild(background); 22 23 var iframe = document.createElement('iframe'); 24 iframe.setAttribute('style','overflow:hidden;background-color:white;position:absolute;z-index:9002;left:2%;top:2%;background-image:url("images/ajax-loader.gif");background-repeat:no-repeat;background-position:center center;'); 25 iframe.setAttribute("width","96%"); 26 iframe.setAttribute("height","96%"); 27 iframe.setAttribute('name','visionneuse'); 28 iframe.setAttribute('id','visionneuseIframe'); 29 iframe.setAttribute('src',''); 30 iframe.addEventListener('load', function(e){ 31 if(this.contentWindow.location.href != 'about:blank'){ 32 this.setAttribute('style','overflow:hidden;background-color:white;position:absolute;z-index:9002;left:2%;top:2%;background-image:none;background-repeat:no-repeat;background-position:center center;'); 33 } 34 }); 35 visionneuse.appendChild(iframe); 36 37 visionneuse.parentNode.style.overflow = "hidden"; 38 39 window.onresize(); 40 41 callback(); 42 43} 44 45function open_alertbox(opac_visionneuse_alert) { 46 var alertbox = document.createElement('div'); 47 alertbox.setAttribute('id','alertbox'); 48 alertbox.setAttribute('style','background-color:white;position:absolute;'); 49 alertbox.setAttribute('onclick','window.parent.close_alertbox();'); 50 alertbox.style.width="100%"; 51 alertbox.style.height="100%"; 52 alertbox.innerHTML=opac_visionneuse_alert; 53 try { 54 document.getElementById('visionneuseIframe').contentDocument.getElementsByTagName('body')[0].appendChild(alertbox); 55 }catch(err){ 56 try { 57 document.getElementById('visionneuseIframe').contentWindow.getElementsByTagName('body')[0].appendChild(alertbox); 58 }catch(err){} 59 } 60} 61 62function close_alertbox() { 63 try { 64 var ab= document.getElementById('visionneuseIframe').contentDocument.getElementById('alertbox'); 65 ab.parentNode.removeChild(ab); 66 }catch(err){ 67 try { 68 var ab= document.getElementById('visionneuseIframe').contentWindow.getElementById('alertbox'); 69 ab.parentNode.removeChild(ab); 70 }catch(err){} 71 } 72} 73 74window.onresize = function(){ 75 var visionneuse = document.getElementById('visionneuse'); 76 if (visionneuse){ 77 visionneuse.style.width=getWindowWidth()+'px'; 78 visionneuse.style.height=getWindowHeight()+'px'; 79 visionneuse.style.top=getWindowScrollY()+'px'; 80 } 81} 82 83function close_visionneuse(){ 84 var visionneuse = document.getElementById('visionneuse'); 85 visionneuse.parentNode.style.overflow = ''; 86 visionneuse.parentNode.removeChild(visionneuse); 87 if(document.form_values){ 88 document.form_values.target=''; 89 document.form_values.action=oldAction; 90 var mode=document.getElementsByName('mode').item(0); 91 if(mode && mode.value == 'extended'){ 92 mode.parentNode.removeChild(mode); 93 var explnum_id=document.getElementsByName('explnum_id').item(0); 94 if(explnum_id) explnum_id.parentNode.removeChild(explnum_id); 95 var val_search=document.getElementById('search'); 96 if(val_search) val_search.parentNode.removeChild(val_search); 97 } 98 } 99} 100 101function getWindowHeight(){ 102 if(window.innerHeight) 103 return window.innerHeight+"px"; 104 else return document.documentElement.clientHeight; 105} 106 107function getWindowWidth(){ 108 if(window.innerWidth) 109 return window.innerWidth+"px"; 110 else return document.documentElement.clientWidth; 111} 112 113function getWindowScrollY(){ 114 if(window.scrollY) 115 return window.scrollY+"px"; 116 else return document.documentElement.scrollTop; 117}
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.