MediaWiki:KarteLaden.js
Aus Tiroul
(Unterschied zwischen Versionen)
Version vom 15:35, 20. Mär. 2007 (bearbeiten) WikiSysop (Diskussion | Beiträge) ← Zum vorherigen Versionsunterschied |
Version vom 15:52, 20. Mär. 2007 (bearbeiten) (Entfernen) WikiSysop (Diskussion | Beiträge) Zum nächsten Versionsunterschied → |
||
Zeile 56: | Zeile 56: | ||
mydiv.style.visibility='hidden'; | mydiv.style.visibility='hidden'; | ||
mydiv.style.border='1px solid gray'; | mydiv.style.border='1px solid gray'; | ||
- | mydiv.innerHTML = '<img src="'+kartetirol_imgbase+'button_hide.png" style="z-index:10; position:absolute; right:11px; top: 11px; width:18px; cursor:pointer" onclick="togglekartetirolRegIFrame()"><iframe style="position:absolute; right:1px; top: 1px; width:'+(kartetirol_width+10)+'px; height:'+(kartetirol_height+10)+'px; background-color: white; padding: 0px; margin: 0px;" src="'+kartetirol_iframeurl+'?'+ostmin+"_"+nordmin+"_"+ostmax+"_"+nordmax+'" scrolling="no" frameborder="0"></iframe>'; | + | mydiv.innerHTML = '<img src="'+kartetirol_imgbase+'button_hide.png" style="z-index:10; position:absolute; right:11px; top: 11px; width:18px; cursor:pointer" onclick="togglekartetirolRegIFrame()"><iframe style="position:absolute; right:1px; top: 1px; width:'+(kartetirol_width+10)+'px; height:'+(kartetirol_height+10)+'px; background-color: white;" src="'+kartetirol_iframeurl+'?'+ostmin+"_"+nordmin+"_"+ostmax+"_"+nordmax+'" scrolling="no" frameborder="0" marginwidth="0" marginheight="0"></iframe>'; |
koordinatenReg.appendChild(mydiv); | koordinatenReg.appendChild(mydiv); | ||
Zeile 96: | Zeile 96: | ||
mydiv.style.visibility='hidden'; | mydiv.style.visibility='hidden'; | ||
mydiv.style.border='1px solid gray'; | mydiv.style.border='1px solid gray'; | ||
- | mydiv.innerHTML = '<img src="'+kartetirol_imgbase+'button_hide.png" style="z-index:10; position:absolute; right:11px; top: 11px; width:18px; cursor:pointer" onclick="togglekartetirolIFrame()"><iframe style="position:absolute; right:1px; top: 1px; width:'+(kartetirol_width+10)+'px; height:'+(kartetirol_height+10)+'px; background-color: white; padding: 0px; margin: 0px;" src="'+kartetirol_iframeurl+'?'+ost+"_"+nord+'" scrolling="no" frameborder="0"></iframe>'; | + | mydiv.innerHTML = '<img src="'+kartetirol_imgbase+'button_hide.png" style="z-index:10; position:absolute; right:11px; top: 11px; width:18px; cursor:pointer" onclick="togglekartetirolIFrame()"><iframe style="position:absolute; right:1px; top: 1px; width:'+(kartetirol_width+10)+'px; height:'+(kartetirol_height+10)+'px; background-color: white;" src="'+kartetirol_iframeurl+'?'+ost+"_"+nord+'" scrolling="no" frameborder="0" marginwidth="0" marginheight="0"></iframe>'; |
koordinaten.appendChild(mydiv); | koordinaten.appendChild(mydiv); |
Version vom 15:52, 20. Mär. 2007
////defautlts var kartetirol_coordinate_region = ''; var kartetirol_width = 720; var kartetirol_height = 500; var kartetirol_iframeurl = "http://avslintest/htdocs/entwicklung/cristian/tugaatlas/index.php"; var kartetirol_imgbase = "http://avslintest/htdocs/entwicklung/cristian/tugaatlas/images/"; // // globals // var kartetirol_iframe = null; var kartetirolReg_iframe = null; // // Einfügen des IFrames // function kartetirolRegLoader() { var ostmin; var nordmin; var ostmax; var nordmax; var koordinatenReg = document.getElementById("KoordinateRegion"); if (koordinatenReg != null && kartetirolReg_iframe == null) { var coordReg_index = (koordinatenReg.innerHTML).indexOf('params='); if(coordReg_index>-1) { var coordReg_params = (koordinatenReg.innerHTML).substr(coordReg_index+7); var kor = coordReg_params.split("_"); ostmin = kor[1]; nordmin = kor[3]; ostmax = kor[5]; nordmax = kor[7]; var myspan = document.createElement("span"); myspan .setAttribute("id","atlas_"); myspan .innerHTML=' <a href="#" onclick="return togglekartetirolRegIFrame();" style="color:#cc2200">Atlas</a>'; koordinatenReg.appendChild(myspan ); var mydiv = document.createElement("div"); mydiv.setAttribute("id","kartetirolReg_iframe"); mydiv.style.position="absolute"; mydiv.style.right='2em'; mydiv.style.top='1em'; mydiv.style.height=(kartetirol_height+12)+'px'; mydiv.style.width=(kartetirol_width+12)+'px'; mydiv.style.backgroundColor='white'; mydiv.style.padding='0px'; mydiv.style.margin='0px'; mydiv.style.visibility='hidden'; mydiv.style.border='1px solid gray'; mydiv.innerHTML = '<img src="'+kartetirol_imgbase+'button_hide.png" style="z-index:10; position:absolute; right:11px; top: 11px; width:18px; cursor:pointer" onclick="togglekartetirolRegIFrame()"><iframe style="position:absolute; right:1px; top: 1px; width:'+(kartetirol_width+10)+'px; height:'+(kartetirol_height+10)+'px; background-color: white;" src="'+kartetirol_iframeurl+'?'+ostmin+"_"+nordmin+"_"+ostmax+"_"+nordmax+'" scrolling="no" frameborder="0" marginwidth="0" marginheight="0"></iframe>'; koordinatenReg.appendChild(mydiv); kartetirolReg_iframe = document.getElementById('kartetirolReg_iframe'); } } } function kartetirolLoader() { var nord; var ost; var koordinaten = document.getElementById('KoordinateUTM'); if (koordinaten != null && kartetirol_iframe == null) { var coord_index = (koordinaten.innerHTML).indexOf('params='); if(coord_index>-1) { var coord_params = (koordinaten.innerHTML).substr(coord_index+7); var kor = coord_params.split("_"); ost = kor[1]; nord = kor[3]; var myspan = document.createElement("span"); myspan .setAttribute("id","atlas_"); myspan .innerHTML=' <a href="#" onclick="return togglekartetirolIFrame();" style="color:#cc2200">Atlas</a>'; koordinaten.appendChild(myspan ); var mydiv = document.createElement("div"); mydiv.setAttribute("id","kartetirol_iframe"); mydiv.style.position="absolute"; mydiv.style.right='2em'; mydiv.style.top='1em'; mydiv.style.height=(kartetirol_height+12)+'px'; mydiv.style.width=(kartetirol_width+12)+'px'; mydiv.style.backgroundColor='white'; mydiv.style.padding='0px'; mydiv.style.margin='0px'; mydiv.style.visibility='hidden'; mydiv.style.border='1px solid gray'; mydiv.innerHTML = '<img src="'+kartetirol_imgbase+'button_hide.png" style="z-index:10; position:absolute; right:11px; top: 11px; width:18px; cursor:pointer" onclick="togglekartetirolIFrame()"><iframe style="position:absolute; right:1px; top: 1px; width:'+(kartetirol_width+10)+'px; height:'+(kartetirol_height+10)+'px; background-color: white;" src="'+kartetirol_iframeurl+'?'+ost+"_"+nord+'" scrolling="no" frameborder="0" marginwidth="0" marginheight="0"></iframe>'; koordinaten.appendChild(mydiv); kartetirol_iframe = document.getElementById('kartetirol_iframe'); } } } // // Installation // addOnloadHook(kartetirolRegLoader); addOnloadHook(kartetirolLoader); function togglekartetirolRegIFrame() { if(kartetirolReg_iframe.style.visibility != "visible") { kartetirolReg_iframe.style.visibility="visible"; } else { kartetirolReg_iframe.style.visibility="hidden"; } return false; } function togglekartetirolIFrame() { if(kartetirol_iframe.style.visibility != "visible") { kartetirol_iframe.style.visibility="visible"; } else { kartetirol_iframe.style.visibility="hidden"; } return false; } //