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