map and waypoint related changed/fixes
- nicer wording of waypoint type vs. cache wp in map popup box - fixed wiki link for additional wp in map popup box - fixed map settings initialization, was completely broken - increased map picture description font - fixed old-MSIE warning - optimized XML and JS escaping
This commit is contained in:
parent
b759926b16
commit
69abeb673c
@ -48,3 +48,4 @@ date commit ID change
|
||||
removed table listing_restored
|
||||
added index cache_logs_archived:user_id
|
||||
2013-03-10 added field 'mappreview' in pictures and pictures_modified
|
||||
2013-03-14 added fields coordinates_type.preposition and pp_trans_id
|
||||
|
@ -204,11 +204,11 @@ INSERT INTO `cache_logtype` (`cache_type_id`, `log_type_id`) VALUES ('10', '3');
|
||||
-- Table coordinates_type
|
||||
SET NAMES 'utf8';
|
||||
TRUNCATE TABLE `coordinates_type`;
|
||||
INSERT INTO `coordinates_type` (`id`, `name`, `trans_id`, `image`) VALUES ('1', 'Parking', '1788', 'resource2/ocstyle/images/misc/wp_parking.png');
|
||||
INSERT INTO `coordinates_type` (`id`, `name`, `trans_id`, `image`) VALUES ('2', 'Stage or reference point', '1789', 'resource2/ocstyle/images/misc/wp_reference.png');
|
||||
INSERT INTO `coordinates_type` (`id`, `name`, `trans_id`, `image`) VALUES ('3', 'Path', '1926', 'resource2/ocstyle/images/misc/wp_path.png');
|
||||
INSERT INTO `coordinates_type` (`id`, `name`, `trans_id`, `image`) VALUES ('4', 'Final', '1927', 'resource2/ocstyle/images/misc/wp_final.png');
|
||||
INSERT INTO `coordinates_type` (`id`, `name`, `trans_id`, `image`) VALUES ('5', 'Point of interest', '1570', 'resource2/ocstyle/images/misc/wp_poi.png');
|
||||
INSERT INTO `coordinates_type` (`id`, `name`, `trans_id`, `image`, `preposition`, `pp_trans_id`) VALUES ('1', 'Parking', '1788', 'resource2/ocstyle/images/misc/wp_parking.png', 'for', 1923);
|
||||
INSERT INTO `coordinates_type` (`id`, `name`, `trans_id`, `image`, `preposition`, `pp_trans_id`) VALUES ('2', 'Stage or reference point', '1789', 'resource2/ocstyle/images/misc/wp_reference.png', 'of', 894);
|
||||
INSERT INTO `coordinates_type` (`id`, `name`, `trans_id`, `image`, `preposition`, `pp_trans_id`) VALUES ('3', 'Path', '1926', 'resource2/ocstyle/images/misc/wp_path.png', 'to ', 1961);
|
||||
INSERT INTO `coordinates_type` (`id`, `name`, `trans_id`, `image`, `preposition`, `pp_trans_id`) VALUES ('4', 'Final', '1927', 'resource2/ocstyle/images/misc/wp_final.png', 'of', 894);
|
||||
INSERT INTO `coordinates_type` (`id`, `name`, `trans_id`, `image`, `preposition`, `pp_trans_id`) VALUES ('5', 'Point of interest', '1570', 'resource2/ocstyle/images/misc/wp_poi.png', 'at', 1962);
|
||||
|
||||
-- Table countries
|
||||
SET NAMES 'utf8';
|
||||
@ -2399,6 +2399,8 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1957', '\"Spoil
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1958', 'Back to the cache description', '2013-02-23 19:00:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1959', 'Only the last %1 pictures are displayed.', '2013-02-23 19:00:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1960', 'Page', '2013-02-23 19:00:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1961', 'to ', '2013-02-23 19:00:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1962', 'at', '2013-02-23 19:00:04');
|
||||
|
||||
-- Table sys_trans_ref
|
||||
SET NAMES 'utf8';
|
||||
@ -6055,7 +6057,7 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1922', 'DE', 'Spoiler anklicken zum Anzeigen', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1923', 'DE', 'für', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1924', 'DE', 'Der Cache hat %1 %2zusätzliche Wegpunkte%3.', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1925', 'DE', 'Der Cache hat einen %1zusätzlichen Wegpunkt%2.', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1925', 'DE', 'Der Cache hat einen %2zusätzlichen Wegpunkt%3.', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1926', 'DE', 'Pfad', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1927', 'DE', 'Ziel', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1928', 'DE', '%1Vorschaubilder</a> anzeigen<br />(% der Kartenfläche, 0=aus)', '2012-10-11 00:00:00');
|
||||
@ -6082,6 +6084,8 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1958', 'DE', 'zurück zur Cachebeschreibung', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1959', 'DE', 'Es werden nur die neuesten %1 Bilder angezeigt.', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1960', 'DE', 'Seite', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1961', 'DE', 'zu', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1962', 'DE', 'bei', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'EN', 'Reorder IDs \r', '2010-09-02 00:15:30');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'EN', 'The database could not be reconnected.', '2010-08-28 11:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'EN', 'Testing – please do not login', '2010-08-28 11:48:07');
|
||||
@ -7572,6 +7576,8 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1958', 'EN', 'Back to the cache description', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1959', 'EN', 'Only the last %1 pictures are displayed.', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1960', 'EN', 'Seite', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1961', 'EN', 'to', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1962', 'EN', 'at', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'ES', 'Reordenar ID', '2010-12-09 00:17:55');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'ES', 'La base de datos no se pudo conectar.', '2010-12-09 00:17:55');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'ES', 'En pruebas - por favor, no entre.', '2010-12-09 00:17:55');
|
||||
@ -8991,6 +8997,8 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1861', 'ES', 'Mat./Física', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1862', 'ES', 'movimiento', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1863', 'ES', 'Drive-In', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1961', 'ES', 'a', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1962', 'ES', 'cerca de', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('6', 'FR', 'Pseudo', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('7', 'FR', 'Quite', '2010-10-04 00:17:39');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('24', 'FR', 'Prénom', '2010-10-04 00:17:39');
|
||||
@ -10548,6 +10556,8 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1930', 'IT', 'Al massimo %1 cache possono essere visualizzate con Microsoft Internet Explorer.', '2013-03-14 10:49:58');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1940', 'IT', 'Galleria di immagini', '2013-03-14 10:49:58');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1943', 'IT', 'Tutte le immagini sono protette da copyright. Se vuoi utilizzarle chiedi il permesso all\'autore. Dal 7 aprile 2013 i log che includono immagini possono essere usati senza alcuna modifica secondo i termini dellla <a href=\"articles.php?page=impressum#datalicense\">nuova licenza dati</a>.', '2013-03-14 10:49:58');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1961', 'IT', 'a', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1962', 'IT', 'presso', '2013-02-19 05:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('922', 'JA', 'JA', '2011-05-15 16:04:51');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'NL', 'ID\'s opnieuw sorteren', '2011-02-04 19:49:56');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'NL', 'De verbinding met de database kon niet hersteld worden.', '2011-02-04 19:49:56');
|
||||
|
@ -5,6 +5,8 @@ CREATE TABLE `coordinates_type` (
|
||||
`name` varchar(80) NOT NULL,
|
||||
`trans_id` int(10) unsigned NOT NULL,
|
||||
`image` varchar(60) NOT NULL,
|
||||
`preposition` varchar(20) NOT NULL,
|
||||
`pp_trans_id` int(10) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `name` (`name`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
|
||||
|
@ -362,6 +362,7 @@ function output_cachexml($sWaypoint)
|
||||
echo ' <wpt ';
|
||||
echo 'typeid="' . xmlentities($waypoint['type']) . '" ';
|
||||
echo 'typename="' . xmlentities($waypoint['name']) . '" ';
|
||||
echo 'typepreposition="' . xmlentities($waypoint['preposition']) . '" ';
|
||||
echo 'image="' . xmlentities($waypoint['image']) . '" ';
|
||||
echo 'imagewidth="38" imageheight="38" ';
|
||||
echo 'latitude="' . xmlentities($waypoint['latitude']) . '" ';
|
||||
@ -484,12 +485,12 @@ function output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat
|
||||
if ($r['oconly']) $flags |= 16;
|
||||
|
||||
if ($compact)
|
||||
echo '<c d="' . xmlentities($r['wp_oc']) . '/' .
|
||||
xmlentities(round($r['longitude'],5)) . '/' .
|
||||
xmlentities(round($r['latitude'],5)) . '/' .
|
||||
xmlentities($r['type']) . '/' . xmlentities($flags) . '"' .
|
||||
(isset($r['cachename']) ? ' n="' . xmlentities($r['cachename']) . '"' : '') .
|
||||
' />';
|
||||
echo '<c d="' .
|
||||
xmlentities(
|
||||
$r['wp_oc'] . '/' . round($r['longitude'],5) . '/' .
|
||||
round($r['latitude'],5) . '/' . $r['type'] . '/' . $flags) . '"' .
|
||||
(isset($r['cachename']) ? ' n="' . xmlentities($r['cachename']) . '"' : '') .
|
||||
' />';
|
||||
else
|
||||
echo '<cache wp="' . xmlentities($r['wp_oc']) . '"' .
|
||||
' lon="' . xmlentities(round($r['longitude'],5)) . '"' .
|
||||
|
@ -28,8 +28,8 @@
|
||||
{literal}<!--
|
||||
function mapLoad()
|
||||
{
|
||||
document.getElementById('map').innerHTML =
|
||||
"<p>{t}Your Internet Explorer is too old to display the map. Please upgrade at least to version 7, better 8.{/t}</p>";
|
||||
document.getElementById('googlemap').innerHTML =
|
||||
"<div style='position:relative; top:180px; left:10px'><p>{t escape=js}Your Internet Explorer is too old to display the map. Please upgrade at least to version 7, better 8.{/t}</p></div>";
|
||||
}
|
||||
-->{/literal}
|
||||
</script>
|
||||
@ -989,6 +989,7 @@ function init_waypoint_markers(aWaypoints)
|
||||
var imageheight = aWaypoints[nearestwp].getAttribute('imageheight');
|
||||
var wptype = maWpWaypoints[nearestwp].getAttribute('typeid');
|
||||
var typename = maWpWaypoints[nearestwp].getAttribute('typename');
|
||||
var preposition = maWpWaypoints[nearestwp].getAttribute('typepreposition');
|
||||
var description = maWpWaypoints[nearestwp].getAttribute('description');
|
||||
|
||||
var maxwidth;
|
||||
@ -1002,7 +1003,7 @@ function init_waypoint_markers(aWaypoints)
|
||||
"<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 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'><span style='white-space:normal'>" + typename + "</span></td><td style='vertical-align:top'></td><td class='wppopupheader'> " + preposition + "</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 != "")
|
||||
@ -1128,7 +1129,7 @@ function parseXML_GetHTML(xmlobject)
|
||||
if (sName.length > 60)
|
||||
sHtml += "; white-space:normal";
|
||||
sHtml += "'><a href='viewcache.php?wp=" + encodeURI(sWPOC) + "' target='_blank'><font size='2'>" + xmlentities(sName) + "</font></a></td><td align='right' vertical-align:'top'><font size='2'><b> " + xmlentities(sWPOC) + "</b></font></td></tr>";
|
||||
sHtml += "<tr><td colspan='2' style='vertical-align:top;'>{/literal}{t escape=js}by{/t}{literal} <a href='viewprofile.php?userid=" + encodeURI(nUserId) + "' target='_blank'>" + xmlentities(sUsername) + "</a></td><td align='right'><a class='nooutline' href='articles.php?page=cacheinfo#difficulty' target='_blank'><img src='resource2/{/literal}{$opt.template.style}/images/difficulty/diff-" + String(nDifficulty*10) + ".gif' border='0' width='19' height='16' hspace='2' alt='{t}D{/t} " + nDifficulty + "' title='{t}Difficulty{/t} " + nDifficulty + "/5'{literal} /><img src='resource2/{/literal}{$opt.template.style}/images/difficulty/terr-" + String(nTerrain*10) + ".gif' border='0' width='19' height='16' hspace='2' alt='{t}T{/t} " + nTerrain + "' title='{t}Terrain{/t} " + nTerrain + "/5'{literal} /></a></td></tr>";
|
||||
sHtml += "<tr><td colspan='2' style='vertical-align:top;'>{/literal}{t escape=js}by{/t}{literal} <a href='viewprofile.php?userid=" + encodeURI(nUserId) + "' target='_blank'>" + xmlentities(sUsername) + "</a></td><td align='right'><a class='nooutline' href='articles.php?page=cacheinfo#difficulty' target='_blank'><img src='resource2/{/literal}{$opt.template.style}/images/difficulty/diff-" + String(nDifficulty*10) + ".gif' border='0' width='19' height='16' hspace='2' alt='{t escape=js}D{/t} " + nDifficulty + "' title='{t escape=js}Difficulty{/t} " + nDifficulty + "/5'{literal} /><img src='resource2/{/literal}{$opt.template.style}/images/difficulty/terr-" + String(nTerrain*10) + ".gif' border='0' width='19' height='16' hspace='2' alt='{t escape=js}T{/t} " + nTerrain + "' title='{t escape=js}Terrain{/t} " + nTerrain + "/5'{literal} /></a></td></tr>";
|
||||
sHtml += "<tr><td colspan='3' height='3px'></td></tr>";
|
||||
|
||||
sHtml += "<tr><td colspan='2'>" + xmlentities(sTypeText) + " (" + xmlentities(sSizeText) + ")</td><td align='right' rowspan='2'>" + (bOconly==1 ? "{/literal}{$help_oconly}{literal}<img src='resource2/ocstyle/images/misc/is_oconly_small.png' alt='OConly' title='OConly' /></a>" : "") + "</td></tr>";
|
||||
@ -1161,9 +1162,9 @@ function parseXML_GetHTML(xmlobject)
|
||||
{/literal}
|
||||
var sMsg;
|
||||
if (oWaypoints.length > 1)
|
||||
sMsg = "{t}The cache has %1 %2additional waypoints%3.{/t}";
|
||||
sMsg = "{t escape=js}The cache has %1 %2additional waypoints%3.{/t}";
|
||||
else
|
||||
sMsg = "{t}The cache has an %2additional waypoint%3.{/t}";
|
||||
sMsg = "{t escape=js}The cache has an %2additional waypoint%3.{/t}";
|
||||
sMsg = sMsg.replace("%1",oWaypoints.length);
|
||||
sMsg = sMsg.replace("%2","{$help_wps}");
|
||||
sMsg = sMsg.replace("%3","{if $help_wps != ""}</a>{/if}");
|
||||
@ -1430,7 +1431,7 @@ function download_gpx()
|
||||
|
||||
if (mbDownloadEnabled == false)
|
||||
{
|
||||
alert({/literal}"{t}Between 1 and 500 caches must be displayed for download.{/t}"{literal});
|
||||
alert({/literal}"{t escape=js}Between 1 and 500 caches must be displayed for download.{/t}"{literal});
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1500,13 +1501,13 @@ function toggle_settings()
|
||||
{
|
||||
{/literal}
|
||||
// set controls to config values
|
||||
document.getElementById('opt_menumap0').selected = '{$opt_menumap == 0 ? "selected" : ""}';
|
||||
document.getElementById('opt_menumap1').selected = '{$opt_menumap == 1 ? "selected" : ""}';
|
||||
document.getElementById('opt_overview').checked = '{$opt_overview == 1 ? "checked" : ""}';
|
||||
document.getElementById('opt_maxcaches').value = '{$opt_maxcaches}';
|
||||
document.getElementById('opt_cacheicons1').selected = '{$opt_cacheicons == 1 ? "selected":""}';
|
||||
document.getElementById('opt_cacheicons2').selected = '{$opt_cacheicons == 2 ? "selected":""}';
|
||||
document.getElementById('opt_pictures').value = '{$opt_pictures}';
|
||||
document.getElementById('opt_menumap0').selected = "{if $opt_menumap == 0}selected{/if}";
|
||||
document.getElementById('opt_menumap1').selected = "{if $opt_menumap == 1}selected{/if}";
|
||||
document.getElementById('opt_overview').checked = "{if $opt_overview == 1}checked{/if}";
|
||||
document.getElementById('opt_maxcaches').value = "{$opt_maxcaches}";
|
||||
document.getElementById('opt_cacheicons1').selected = "{if $opt_cacheicons == 1}selected{/if}";
|
||||
document.getElementById('opt_cacheicons2').selected = "{if $opt_cacheicons == 2}selected{/if}";
|
||||
document.getElementById('opt_pictures').value = "{$opt_pictures}";
|
||||
|
||||
so.style.display = 'block';
|
||||
{literal}
|
||||
@ -2030,7 +2031,7 @@ function toggle_attribselection(bSaveCookies)
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
|
||||
tas.innerHTML = (bShow ? "{t}Less{/t}" : "{t}Show all{/t}");
|
||||
tas.innerHTML = (bShow ? "{t escape=js}Less{/t}" : "{t escape=js}Show all{/t}");
|
||||
if (bFullscreen)
|
||||
document.getElementById('attribcell').style.width = (bShow ? '675px' : '600px');
|
||||
bAllAttribs = !bAllAttribs;
|
||||
@ -2186,7 +2187,7 @@ function toggle_attribselection(bSaveCookies)
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="cachepicbox" class="mapboxframe mapboxshadow" style="position:absolute; {if $bFullscreen}left:4px; top:7px;{else}left:0; top:0;{/if} background:#fdfdfd; display:none; z-index:60">
|
||||
<div id="cachepicbox" class="default mapboxframe mapboxshadow" style="position:absolute; {if $bFullscreen}left:4px; top:7px;{else}left:0; top:0;{/if} background:#fdfdfd; display:none; z-index:60">
|
||||
<div style="position:absolute; right:-19px; top:2px; opacity:0.7">
|
||||
<img src="resource2/ocstyle/images/misc/close-smaller.png" onclick="hide_picture()" style="cursor:pointer"/>
|
||||
</div>
|
||||
|
@ -12,13 +12,14 @@ class ChildWp_Handler
|
||||
$this->translator = new Language_Translator();
|
||||
|
||||
// read available types from DB
|
||||
$rs = sql("SELECT `coordinates_type`.`id`, IFNULL(`sys_trans_text`.`text`, `coordinates_type`.`name`) AS `name`, `coordinates_type`.`image`
|
||||
$rs = sql("SELECT `coordinates_type`.`id`, IFNULL(`trans`.`text`, `coordinates_type`.`name`) AS `name`, `coordinates_type`.`image`, IFNULL(`trans_pp`.`text`, `coordinates_type`.`preposition`) AS `preposition`
|
||||
FROM `coordinates_type`
|
||||
LEFT JOIN `sys_trans_text` ON `coordinates_type`.`trans_id`=`sys_trans_text`.`trans_id` AND `sys_trans_text`.`lang`='&1'",
|
||||
LEFT JOIN `sys_trans_text` `trans` ON `coordinates_type`.`trans_id`=`trans`.`trans_id` AND `trans`.`lang`='&1'
|
||||
LEFT JOIN `sys_trans_text` `trans_pp` ON `coordinates_type`.`pp_trans_id`=`trans_pp`.`trans_id` AND `trans_pp`.`lang`='&1'",
|
||||
$opt['template']['locale']);
|
||||
while ($r = sql_fetch_assoc($rs))
|
||||
{
|
||||
$type = new ChildWp_Type($r['id'], $r['name'], $r['image']);
|
||||
$type = new ChildWp_Type($r['id'], $r['name'], $r['preposition'], $r['image']);
|
||||
$this->childWpTypes[$type->getId()] = $type;
|
||||
}
|
||||
sql_free_result($rs);
|
||||
@ -69,9 +70,7 @@ class ChildWp_Handler
|
||||
$idAndNames = array();
|
||||
|
||||
foreach ($this->childWpTypes as $type)
|
||||
{
|
||||
$idAndNames[$type->getId()] = $this->translator->translate($type->getName());
|
||||
}
|
||||
$idAndNames[$type->getId()] = $type->getName();
|
||||
|
||||
return $idAndNames;
|
||||
}
|
||||
@ -81,9 +80,7 @@ class ChildWp_Handler
|
||||
$nameAndTypes= array();
|
||||
|
||||
foreach ($this->childWpTypes as $type)
|
||||
{
|
||||
$nameAndTypes[$this->translator->translate($type->getName())] = $type->getImage();
|
||||
}
|
||||
$nameAndTypes[$type->getName()] = $type->getImage();
|
||||
|
||||
return $nameAndTypes;
|
||||
}
|
||||
@ -106,7 +103,8 @@ class ChildWp_Handler
|
||||
|
||||
if ($type)
|
||||
{
|
||||
$ret['name'] = $this->translator->translate($type->getName());
|
||||
$ret['name'] = $type->getName();
|
||||
$ret['preposition'] = $type->getPreposition();
|
||||
$ret['image'] = $type->getImage();
|
||||
}
|
||||
}
|
||||
|
@ -59,8 +59,7 @@ abstract class ChildWp_Presenter
|
||||
{
|
||||
$this->childWpHandler = $childWpHandler;
|
||||
$this->cacheId = $cacheId;
|
||||
$this->waypointTypes = $childWpHandler->getChildWpIdAndNames();
|
||||
$this->typeImages = $childWpHandler->getChildNamesAndImages();
|
||||
$this->waypointTypes = $childWpHandler->getChildWpIdAndNames(); $this->typeImages = $childWpHandler->getChildNamesAndImages();
|
||||
}
|
||||
|
||||
public function initChildWp($childId, $childWp)
|
||||
|
@ -4,12 +4,14 @@ class ChildWp_Type
|
||||
{
|
||||
private $id;
|
||||
private $name;
|
||||
private $preposition;
|
||||
private $image;
|
||||
|
||||
public function __construct($id, $name, $image = false)
|
||||
public function __construct($id, $name, $preposition, $image = false)
|
||||
{
|
||||
$this->id = $id;
|
||||
$this->name = $name;
|
||||
$this->preposition = $preposition;
|
||||
$this->image = $image;
|
||||
}
|
||||
|
||||
@ -23,6 +25,11 @@ class ChildWp_Type
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getPreposition()
|
||||
{
|
||||
return $this->preposition;
|
||||
}
|
||||
|
||||
public function getImage()
|
||||
{
|
||||
return $this->image;
|
||||
|
Loading…
x
Reference in New Issue
Block a user