map: improved waypoint popup windows
This commit is contained in:
parent
f87389362a
commit
a592e04f5f
@ -46,6 +46,7 @@ function getWaypoints($cacheid)
|
||||
$htmlcoordinate = $formatter->formatHtml($waypoint['coordinate'], '</td></tr><tr><td style="white-space:nowrap">');
|
||||
$tmpline = mb_ereg_replace('{wp_coordinate}', $htmlcoordinate, $tmpline);
|
||||
$tmpline = mb_ereg_replace('{wp_description}', htmlspecialchars($waypoint['description'], ENT_COMPAT, 'UTF-8'), $tmpline);
|
||||
$tmpline = mb_ereg_replace('{wp_show_description}', mb_ereg_replace('\r\n','<br />',htmlspecialchars($waypoint['description'], ENT_COMPAT, 'UTF-8')), $tmpline);
|
||||
$tmpline = mb_ereg_replace('{cacheid}', htmlspecialchars($cacheid, ENT_COMPAT, 'UTF-8'), $tmpline);
|
||||
$tmpline = mb_ereg_replace('{childid}', htmlspecialchars($waypoint['childid'], ENT_COMPAT, 'UTF-8'), $tmpline);
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
$picturelines = '{lines}<tr><td colspan="2"> </td></tr>';
|
||||
|
||||
$nowaypoints = '<tr><td colspan="2">' . t('No waypoints available') . '</td></tr>';
|
||||
$waypointline = '<tr bgcolor="#ffffff"><td><table class="narrowtable" cellspacing="0" cellpadding="0"><tr><td><img src="{wp_image}" /></td><td>{wp_type}</td></tr></table></td><td><table class="narrowtable"><tr><td style="white-space:nowrap">{wp_coordinate}</td></tr></table></tp><td>{wp_description}</td><td>[<a href="childwp.php?cacheid={cacheid}&childid={childid}">' . t('Edit') . '</a>] [<a href="childwp.php?cacheid={cacheid}&deleteid={childid}">' . t('Delete') . '</a>]</td></tr>';
|
||||
$waypointline = '<tr bgcolor="#ffffff"><td><table class="narrowtable" cellspacing="0" cellpadding="0"><tr><td><img src="{wp_image}" /></td><td>{wp_type}</td></tr></table></td><td><table class="narrowtable"><tr><td style="white-space:nowrap">{wp_coordinate}</td></tr></table></tp><td>{wp_show_description}</td><td>[<a href="childwp.php?cacheid={cacheid}&childid={childid}">' . t('Edit') . '</a>] [<a href="childwp.php?cacheid={cacheid}&deleteid={childid}">' . t('Delete') . '</a>]</td></tr>';
|
||||
$waypointlines = '<tr><td colspan="2"><table class="edit_wptable">{lines}</table></td></tr><tr><td colspan="2"> </td></tr>';
|
||||
|
||||
$cache_attrib_js = "new Array({id}, {selected}, '{img_undef}', '{img_large}')";
|
||||
|
@ -366,7 +366,7 @@ function output_cachexml($sWaypoint)
|
||||
echo 'imagewidth="38" imageheight="38" ';
|
||||
echo 'latitude="' . xmlentities($waypoint['latitude']) . '" ';
|
||||
echo 'longitude="' . xmlentities($waypoint['longitude']) . '" ';
|
||||
echo 'description="' . xmlentities($waypoint['description']) . '" />\n';
|
||||
echo 'description="' . xmlentities(mb_ereg_replace('\r\n','<br />',$waypoint['description'])) . '" />\n';
|
||||
}
|
||||
|
||||
echo ' </cache>\n';
|
||||
|
@ -1198,6 +1198,10 @@ table.mappopup td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
td.wppopupheader {
|
||||
font-size:1.15em;
|
||||
}
|
||||
|
||||
.mapboxframe {
|
||||
border:1px solid #777777;
|
||||
}
|
||||
|
@ -884,7 +884,7 @@ function adjust_infowindow()
|
||||
// alert("Before: " + iw_frame.style.width + " / " + iw_frame.style.height);
|
||||
iw_frame.style.width = String(iw_width + 2) + "px";
|
||||
// making it too wide would let additional wp text flow into the margin at MSIE
|
||||
iw_frame.style.height = String(iw_height + 25) + "px";
|
||||
iw_frame.style.height = String(iw_height + 10) + "px";
|
||||
// alert("After: " + iw_frame.style.width + " / " + iw_frame.style.height);
|
||||
}
|
||||
else
|
||||
@ -990,26 +990,22 @@ function init_waypoint_markers(aWaypoints)
|
||||
var typename = maWpWaypoints[nearestwp].getAttribute('typename');
|
||||
var description = maWpWaypoints[nearestwp].getAttribute('description');
|
||||
|
||||
{/literal}
|
||||
var typetext;
|
||||
if (wptype+0 == 0 && {if $help_note != ""}1{else}0{/if})
|
||||
typetext = "{$help_note}";
|
||||
else if ({if $help_wps != ""}1{else}0{/if})
|
||||
typetext = "{$help_wps}";
|
||||
if (typetext != "")
|
||||
typetext += typename + "</a>";
|
||||
var maxwidth;
|
||||
if (description.length < 512)
|
||||
maxwidth = "320px";
|
||||
else
|
||||
typetext += typename;
|
||||
maxwidth = "480px";
|
||||
|
||||
var text = // MSIE needs max width to wrap long descriptions
|
||||
"<div id='mapinfowindow' style='max-width:400px; max-height:400px'><table class='mappopup'>" +
|
||||
{/literal}
|
||||
var text =
|
||||
"<div id='mapinfowindow' style='max-height:320px;" + {if $msie}" max-width:" + maxwidth + ";" +{/if} " overflow:auto'><table class='mappopup'>" +
|
||||
"<tr><td><table cellspacing='0' cellpadding='0'><tr><td>" +
|
||||
"<img src='" + image + "' width='" + imagewidth + "' height='" + imageheight + "' ></td>" +
|
||||
"<td style='font-size:1.15em'><span style='white-space:normal'>" + typetext + " {t}for{/t}" + "</span></td>" +
|
||||
"<td style='font-weight:bold; font-size:1.2em'> <a href='viewcache.php?wp=" + msPopupMarkerWP + "' target='_blank_'>" + msPopupMarkerWP + "</a></td>" +
|
||||
"<td class='wppopupheader'><span style='white-space:normal'>" + typename + "</span></td><td style='vertical-align:top'></td><td class='wppopupheader'> {t}for{/t}" + "</span></td>" +
|
||||
"<td class='wppopupheader' style='font-weight:bold'> <a href='viewcache.php?wp=" + msPopupMarkerWP + "' target='_blank_'>" + msPopupMarkerWP + "</a></td>" +
|
||||
"</tr></table></td></tr>";
|
||||
if (description != "")
|
||||
text += "<tr><td style='padding:8px; max-width:350px; white-space:normal' colspan='4'>" + description + "</td></tr>";
|
||||
text += "<tr><td style='padding:8px; max-width:" + maxwidth + "; white-space:normal' colspan='4'>" + description + "</td></tr>";
|
||||
text += "</table></div>";
|
||||
{literal}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user