Changeset 649098
- Timestamp:
- 01/07/2013 10:08:30 AM (13 years ago)
- Location:
- volcano-widget/trunk
- Files:
-
- 2 edited
-
VolcanoWidget.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
volcano-widget/trunk/VolcanoWidget.php
r639612 r649098 5 5 Description: Interactive map of active volcanoes and current earthquakes world-wide 6 6 Author: Tom Pfeiffer 7 Version: 1 7 Version: 1.1 8 8 Author URI: http://www.volcanodiscovery.com/ 9 9 License: GPL2 … … 210 210 var c=document.getElementById('VW_mCont'); 211 211 var iFrame = document.getElementById('VW_iframe'); 212 //var VW_code = document.getElementById('VW_code');213 //var VW_code2 = document.getElementById('VW_code2');214 212 var switchLink = document.getElementById('switchLink'); 215 213 var VW_backDiv = document.getElementById('VW_backDiv'); … … 283 281 document.getElementById('standAlone').href=widgetSrc1; 284 282 document.getElementById('standAlone').innerHTML=widgetSrc1; 285 // workaround for IE...286 //VW_code.innerHTML = '<!-- begin VolcanoWidget -->\n'+iFrameCode+'\n<!-- end VolcanoWidget / http://www.volcano-news.com/active-volcanoes-map/get-widget.html -->\n\n';287 283 288 284 var enlarge = 'enlarge'; var small = 'small map'; … … 290 286 if (lang==2) {enlarge = 'agrandir'; var small = 'petite carte';} 291 287 document.getElementById('VW_mSwitch').innerHTML = enlarge; 288 // on preview 292 289 var onClick = "switchFrame('VW_smallMap','VW_bigMap','"+enlarge+"','"+small+"','"+width2+"','"+height+"px',"+lat+","+lon+");return false;"; 293 290 switchLink.setAttribute('onClick',onClick); 294 291 VW_backDiv.setAttribute('onClick',onClick); 292 // on live version 293 var onClickCode = "switchFrame('VW_smallMap','VW_bigMap','"+enlarge+"','"+small+"','"+width+"','"+height+"px',"+lat+","+lon+");return false;"; 295 294 296 295 var finalCode = '<!-- begin VolcanoWidget -->\n<div id="VW_bigMap" style="display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:999999;">\n<div id="VW_backDiv" style="background:#000;filter:alpha(opacity=80);opacity:.8;height:100%;width:100%;position:absolute;top:0px;left:0px;z-index:-1;" onclick="'+onClick+'"></div></div>'; 297 296 finalCode += '\n<div id="VW_smallMap" style="clear:left"><div id="VW_mCont" style="width:'+width+';height:'+height+'px;position:relative;margin:0;background:#fff;"><a name="VW_mCont"></a>'; 298 finalCode += '<div style="position:absolute;top:8px;right:28px;height:15px;text-align:right;vertical-align:middle;font:12px Verdana,sans-serif;font-weight:bold">[<a href="#" style="color:#bb202a" onclick="'+onClick +'"><span id="VW_mSwitch">'+enlarge+'</span></a>]</div>';297 finalCode += '<div style="position:absolute;top:8px;right:28px;height:15px;text-align:right;vertical-align:middle;font:12px Verdana,sans-serif;font-weight:bold">[<a href="#" style="color:#bb202a" onclick="'+onClickCode+'"><span id="VW_mSwitch">'+enlarge+'</span></a>]</div>'; 299 298 finalCode += iFrameCode2+'</div></div>\n'; 300 299 finalCode += '<script type="text/javascript">'+'function switchFrame(a,b,c,d,e,f,g,h){var i=document.getElementById("VW_mCont");var j=document.getElementById("VW_mSwitch").firstChild;if(j.nodeValue==c){j.nodeValue=d}else{j.nodeValue=c}var k=i.parentNode.getAttribute("id");if(k==a){var l=b}else{var l=a}var m=i.parentNode;var n=document.getElementById(l);n.appendChild(i);m.style.display="none";n.style.display="";if(l==a){i.style.width=e;i.style.height=f;i.style.margin=0;i.style.top=""}else{i.style.width="80%";i.style.height="80%";i.style.margin="auto";i.style.top="20px"}window.location.hash="VW_mCont"}'; -
volcano-widget/trunk/readme.txt
r639623 r649098 52 52 = 1.0 = 53 53 * First release 54 = 1.1 = 55 Minor fix in javascript enlarge function: when returning to small map, the originally set width is restored 56 54 57 55 58 == Feature request ==
Note: See TracChangeset
for help on using the changeset viewer.