fixed wp table layout; map: removed redundant wp image filename list

This commit is contained in:
following 2013-03-10 07:09:40 +01:00
parent c598d39d96
commit e0f64b9aa4
6 changed files with 10 additions and 17 deletions

View File

@ -43,7 +43,7 @@ function getWaypoints($cacheid)
$tmpline = mb_ereg_replace('{wp_image}', htmlspecialchars($waypoint['image'], ENT_COMPAT, 'UTF-8'), $tmpline);
$tmpline = mb_ereg_replace('{wp_type}', htmlspecialchars($waypoint['name'], ENT_COMPAT, 'UTF-8'), $tmpline);
$htmlcoordinate = $formatter->formatHtml($waypoint['coordinate'], '</td></tr><tr><td>');
$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('{cacheid}', htmlspecialchars($cacheid, ENT_COMPAT, 'UTF-8'), $tmpline);

View File

@ -36,7 +36,7 @@
$picturelines = '{lines}<tr><td colspan="2">&nbsp;</td></tr>';
$nowaypoints = '<tr><td colspan="2">' . t('No waypoints available') . '</td></tr>';
$waypointline = '<tr bgcolor="#ffffff"><td><img src="{wp_image}" />&nbsp;{wp_type}&nbsp;</td><td><table class="narrowtable"><tr><td>{wp_coordinate}</td></tr></table></tp><td>{wp_description}</td><td>&nbsp;[<a href="childwp.php?cacheid={cacheid}&childid={childid}">' . t('Edit') . '</a>] [<a href="childwp.php?cacheid={cacheid}&deleteid={childid}">' . t('Delete') . '</a>]&nbsp;</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>';
$waypointlines = '<tr><td colspan="2"><table class="edit_wptable">{lines}</table></td></tr><tr><td colspan="2">&nbsp;</td></tr>';
$cache_attrib_js = "new Array({id}, {selected}, '{img_undef}', '{img_large}')";

View File

@ -1355,3 +1355,7 @@ div#havefound {
background-color:#dddddd;
font-size:0.85em;
}
.adminrestore {
color: #819ac1;
}

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -996,19 +996,8 @@ function get_wp_imgparams(wp)
return [wp.getAttribute('image'), wp.getAttribute('imagewidth'), wp.getAttribute('imageheight'),
wp.getAttribute('imagewidth')/2, wp.getAttribute('imageheight')/2];
{else}
var image;
{literal}
switch (wp.getAttribute('typeid'))
{
case '0': image = 'personal'; break;
case '2': image = 'parking'; break;
case '3': image = 'path'; break;
case '4': image = 'final'; break;
case '5': image = 'poi'; break;
default: image = 'reference'; break;
}
{/literal}
return ['resource2/ocstyle/images/map/caches2/wp_' + image + '.png', 32, 32, 13, 24];
return [wp.getAttribute('image').replace('/misc/','/map/caches2/'),
32, 32, 13, 24];
{/if}
{literal}
}

View File

@ -311,8 +311,8 @@
<table bgcolor="#dddddd" width="95%" cellpadding="5%" style="margin-bottom:4px">
{foreach from=$childWaypoints item=childWaypoint}
<tr bgcolor="{cycle values="#ffffff,#eeeeee"}">
<td width="25%"><img src="{$childWaypoint.image}" />{$childWaypoint.name|escape}</td>
<td width="20%">{$childWaypoint.coordinateHtml}</td>
<td width="25%"><table cellspacing="0" cellpadding="0"><tr><td><img src="{$childWaypoint.image}" /></td><td>{$childWaypoint.name|escape}</td></tr></table></td>
<td width="18%">{$childWaypoint.coordinateHtml}</td>
<td>{$childWaypoint.description|escape}</td>
</tr>
{/foreach}