Skip to content

Commit

Permalink
[#748]
Browse files Browse the repository at this point in the history
Storm/Storm2/Tour fix to news image aspect ratios

[#749]
Transparent gif displaying incorrectly on basic branch
  • Loading branch information
arkonan committed Mar 3, 2011
1 parent 6b0b516 commit 7d4f73b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
4 changes: 4 additions & 0 deletions future/templates/modules/news/NewsModule.php
Expand Up @@ -153,6 +153,10 @@ protected function initializeForPage() {

$this->enablePager($content, $this->feed->getEncoding(), $storyPage);

if ($this->platform == 'blackberry') {
$this->addOnLoad('fixImageSizes();');
}

$this->assign('date', $date);
$this->assign('storyURL', urlencode($story->getLink()));
$this->assign('shareEmailURL', $shareEmailURL);
Expand Down
@@ -0,0 +1,4 @@
/* Fix for Storm, Storm 2, and Tour */
#storybody img {
width: 100% !important;
}
24 changes: 17 additions & 7 deletions future/templates/modules/transit/TransitModule.php
Expand Up @@ -188,13 +188,23 @@ protected function initializeForPage() {
$routeInfo['stops'][$stopID]['imgAlt'] = $routeConfig['busImageAltText'];
}

$routeInfo['stops'][$stopID]['img'] = '/common/images/';
if ($this->pagetype == 'basic') {
$routeInfo['stops'][$stopID]['img'] .= $stop['upcoming'] ? 'bus.gif' : 'bus-spacer.gif';
} else if ($this->pagetype == 'touch') {
$routeInfo['stops'][$stopID]['img'] .= $stop['upcoming'] ? 'shuttle.gif' : 'shuttle-spacer.gif';
} else {
$routeInfo['stops'][$stopID]['img'] .= $stop['upcoming'] ? 'shuttle.png' : 'shuttle-spacer.png';
if ($stop['upcoming'] || $this->pagetype != 'basic') {
$routeInfo['stops'][$stopID]['img'] = '/common/images/';
}
switch ($this->pagetype) {
case 'basic':
if ($stop['upcoming']) {
$routeInfo['stops'][$stopID]['img'] .= 'bus.gif';
}
break;

case 'touch':
$routeInfo['stops'][$stopID]['img'] .= $stop['upcoming'] ? 'shuttle.gif' : 'shuttle-spacer.gif';
break;

default:
$routeInfo['stops'][$stopID]['img'] .= $stop['upcoming'] ? 'shuttle.png' : 'shuttle-spacer.png';
break;
}
}

Expand Down
4 changes: 3 additions & 1 deletion future/templates/modules/transit/route-basic.tpl
Expand Up @@ -30,7 +30,9 @@
{foreach $routeInfo['stops'] as $routeID => $stop}
<tr>
<td width="18px" valign="middle">
<img src="{$stop['img']}" width="16" height="13" alt="Bus arriving next at this stop" />
{if $stop['img']}
<img src="{$stop['img']}" width="16" height="13" alt="Bus arriving next at this stop" />
{/if}
</td>
<td valign="middle"{if $stop['upcoming']} class="current"{/if}>
<a href="{$stop['url']}">
Expand Down

0 comments on commit 7d4f73b

Please sign in to comment.