mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-12 10:31:09 +03:00
Use divs instead of images for pagination arrows
This commit is contained in:
parent
5a3a4d959f
commit
84094ad38b
@ -44,16 +44,17 @@ function generate_pagination_link($page, $title)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds HTML markup for pagination image
|
* Builds HTML markup for pagination arrow
|
||||||
*
|
*
|
||||||
* @param string $style_path Root path of the style
|
* The resulting markup is a div tag with specifed class and title.
|
||||||
* @param string $id Name of the image with neither path nor extension.
|
*
|
||||||
* @param string $alt Value of an 'alt' atribute of the image tag.
|
* @param string $class Name of the CSS class which should be used.
|
||||||
|
* @param string $title Value of an 'title' atribute of the div tag.
|
||||||
* @return string HTML markup
|
* @return string HTML markup
|
||||||
*/
|
*/
|
||||||
function generate_pagination_image($style_path, $id, $alt)
|
function generate_pagination_arrow($class, $title)
|
||||||
{
|
{
|
||||||
return "<img src=\"" . $style_path . "/images/$id.gif\" border=\"0\" alt=\"" . htmlspecialchars($alt) . "\"/>";
|
return '<div class="' . $class . '" title="' . htmlspecialchars($title) . '"></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -176,8 +177,7 @@ function generate_pagination($style_path, $pagination, $bottom = true)
|
|||||||
if ($curr_page > 1) {
|
if ($curr_page > 1) {
|
||||||
$result .= generate_pagination_link(
|
$result .= generate_pagination_link(
|
||||||
$curr_page - 1,
|
$curr_page - 1,
|
||||||
generate_pagination_image(
|
generate_pagination_arrow(
|
||||||
$style_path,
|
|
||||||
"prevpage",
|
"prevpage",
|
||||||
getlocal("previous")
|
getlocal("previous")
|
||||||
)
|
)
|
||||||
@ -199,8 +199,7 @@ function generate_pagination($style_path, $pagination, $bottom = true)
|
|||||||
if ($curr_page < $pagination['total']) {
|
if ($curr_page < $pagination['total']) {
|
||||||
$result .= PAGINATION_SPACING . generate_pagination_link(
|
$result .= PAGINATION_SPACING . generate_pagination_link(
|
||||||
$curr_page + 1,
|
$curr_page + 1,
|
||||||
generate_pagination_image(
|
generate_pagination_arrow(
|
||||||
$style_path,
|
|
||||||
"nextpage",
|
"nextpage",
|
||||||
getlocal("next")
|
getlocal("next")
|
||||||
)
|
)
|
||||||
|
@ -994,6 +994,25 @@ table.awaiting .no-threads, table.awaiting .no-visitors {
|
|||||||
margin-bottom:1em;
|
margin-bottom:1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Pagination */
|
||||||
|
|
||||||
|
.pagination .nextpage,
|
||||||
|
.pagination .prevpage {
|
||||||
|
height: 13px;
|
||||||
|
width: 13px;
|
||||||
|
display: inline-block;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: top left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination .nextpage {
|
||||||
|
background-image: url('../images/nextpage.gif');
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination .prevpage {
|
||||||
|
background-image: url('../images/prevpage.gif');
|
||||||
|
}
|
||||||
|
|
||||||
/* rtl rules */
|
/* rtl rules */
|
||||||
|
|
||||||
.lrtl .dashitem img, .lrtl #dashlocalesPopup h2 img, .lrtl #offwarn img {
|
.lrtl .dashitem img, .lrtl #dashlocalesPopup h2 img, .lrtl #offwarn img {
|
||||||
|
@ -16,12 +16,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.inline-block {
|
.inline-block,
|
||||||
display: inline;
|
.dashitem,
|
||||||
zoom: 1;
|
.pagination .prevpage,
|
||||||
}
|
.pagination .nextpage {
|
||||||
|
|
||||||
.dashitem {
|
|
||||||
display: inline;
|
display: inline;
|
||||||
zoom: 1;
|
zoom: 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user