MediaWiki:Wikiminiatlas.js: Difference between revisions
mNo edit summary |
(start implementing quicklink feature) |
||
Line 138: | Line 138: | ||
coord_params: '', | coord_params: '', | ||
coord_filter: null, | coord_filter: null, | ||
quicklinkbox : null, | |||
quicklinkdest : null, | |||
region_index : 0, | region_index : 0, | ||
Line 189: | Line 192: | ||
} | } | ||
return false; | return false; | ||
}, | |||
// start the timer to fade in the quicklink tooltip | |||
qlStart : function() | |||
{ | |||
}, | |||
// abort the timer, hide the tooltip | |||
qlStop : function() | |||
{ | |||
}, | |||
// jump straight to the preferred map-service | |||
qlClick : function() | |||
{ | |||
alert( "Google Maps at:" + this.ql_lat + "," + this.ql_lon ); | |||
}, | }, | ||
Line 372: | Line 391: | ||
// link.parentNode.insertBefore(mapbutton, link.nextSibling); | // link.parentNode.insertBefore(mapbutton, link.nextSibling); | ||
link.parentNode.insertBefore(mapbutton,link); | link.parentNode.insertBefore(mapbutton,link); | ||
if ( config.quicklink ) { | |||
link.ql_lat = marker.lat; | |||
link.ql_lon = marker.lon; | |||
addEvent( link, 'mouseover', qlStart ); | |||
addEvent( link, 'mouseout', qlStop ); | |||
addEvent( link, 'click', qlClick ); | |||
} | |||
} | } | ||
Line 382: | Line 409: | ||
} //for | } //for | ||
// prepare quicklink menu box | |||
if ( coordinates != null && config.quicklink ) { | |||
quicklinkbox = document.createElement('div'); | |||
// more to come :-) | |||
} | |||
// iframe | // prepare iframe to house the map | ||
if ( coordinates != null ) { | if ( coordinates != null ) { | ||
iframe.div = document.createElement('div'); | iframe.div = document.createElement('div'); |