Skip to content

Commit

Permalink
Merge pull request #3233 from Hackwar/patch-11
Browse files Browse the repository at this point in the history
[#30197] class hide-phone for active numeric pagination items
  • Loading branch information
Michael Babker committed Apr 8, 2014
2 parents 8902e6f + c428417 commit aa58b14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions administrator/templates/isis/html/pagination.php
Expand Up @@ -147,6 +147,8 @@ function pagination_list_render($list)
*/
function pagination_item_active(&$item)
{
$class = '';

// Check for "Start" item
if ($item->text == JText::_('JLIB_HTML_START'))
{
Expand Down Expand Up @@ -176,6 +178,7 @@ function pagination_item_active(&$item)
if (!isset($display))
{
$display = $item->text;
$class = ' class="hidden-phone"';
}

if ($item->base > 0)
Expand All @@ -194,7 +197,7 @@ function pagination_item_active(&$item)
$title = ' class="hasTooltip" title="' . $item->text . '"';
}

return '<li><a' . $title . ' href="#" onclick="document.adminForm.' . $item->prefix . $limit . '; Joomla.submitform();return false;">' . $display . '</a></li>';
return '<li' . $class . '><a' . $title . ' href="#" onclick="document.adminForm.' . $item->prefix . $limit . '; Joomla.submitform();return false;">' . $display . '</a></li>';
}

/**
Expand Down Expand Up @@ -235,9 +238,9 @@ function pagination_item_inactive(&$item)
// Check if the item is the active page
if (isset($item->active) && ($item->active))
{
return '<li class="active"><a>' . $item->text . '</a></li>';
return '<li class="active hidden-phone"><a>' . $item->text . '</a></li>';
}

// Doesn't match any other condition, render a normal item
return '<li class="disabled"><a>' . $item->text . '</a></li>';
return '<li class="disabled hidden-phone"><a>' . $item->text . '</a></li>';
}
9 changes: 6 additions & 3 deletions templates/protostar/html/pagination.php
Expand Up @@ -147,6 +147,8 @@ function pagination_list_render($list)
*/
function pagination_item_active(&$item)
{
$class = '';

// Check for "Start" item
if ($item->text == JText::_('JLIB_HTML_START'))
{
Expand Down Expand Up @@ -175,9 +177,10 @@ function pagination_item_active(&$item)
if (!isset($display))
{
$display = $item->text;
$class = ' class="hidden-phone"';
}

return "<li><a title=\"" . $item->text . "\" href=\"" . $item->link . "\" class=\"pagenav\">" . $display . "</a></li>";
return '<li' . $class . '><a title="' . $item->text . '" href="' . $item->link . '" class="pagenav">' . $display . '</a></li>';
}

/**
Expand Down Expand Up @@ -218,9 +221,9 @@ function pagination_item_inactive(&$item)
// Check if the item is the active page
if (isset($item->active) && ($item->active))
{
return '<li class="active"><a>' . $item->text . '</a></li>';
return '<li class="active hidden-phone"><a>' . $item->text . '</a></li>';
}

// Doesn't match any other condition, render a normal item
return '<li class="disabled"><a>' . $item->text . '</a></li>';
return '<li class="disabled hidden-phone"><a>' . $item->text . '</a></li>';
}

0 comments on commit aa58b14

Please sign in to comment.