From 84094ad38b767ad4d8f08c40147d809b4244c6e5 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Fri, 5 Sep 2014 10:06:26 +0000 Subject: [PATCH] Use divs instead of images for pagination arrows --- src/mibew/libs/pagination.php | 19 +++++++++---------- .../styles/pages/default/css/default.css | 19 +++++++++++++++++++ .../styles/pages/default/css/default_ie.css | 10 ++++------ 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/src/mibew/libs/pagination.php b/src/mibew/libs/pagination.php index e6bf495e..511594e8 100644 --- a/src/mibew/libs/pagination.php +++ b/src/mibew/libs/pagination.php @@ -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 - * @param string $id Name of the image with neither path nor extension. - * @param string $alt Value of an 'alt' atribute of the image tag. + * The resulting markup is a div tag with specifed class and title. + * + * @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 */ -function generate_pagination_image($style_path, $id, $alt) +function generate_pagination_arrow($class, $title) { - return "\"""; + return '
'; } /** @@ -176,8 +177,7 @@ function generate_pagination($style_path, $pagination, $bottom = true) if ($curr_page > 1) { $result .= generate_pagination_link( $curr_page - 1, - generate_pagination_image( - $style_path, + generate_pagination_arrow( "prevpage", getlocal("previous") ) @@ -199,8 +199,7 @@ function generate_pagination($style_path, $pagination, $bottom = true) if ($curr_page < $pagination['total']) { $result .= PAGINATION_SPACING . generate_pagination_link( $curr_page + 1, - generate_pagination_image( - $style_path, + generate_pagination_arrow( "nextpage", getlocal("next") ) diff --git a/src/mibew/styles/pages/default/css/default.css b/src/mibew/styles/pages/default/css/default.css index 69cde75b..d2a5241f 100644 --- a/src/mibew/styles/pages/default/css/default.css +++ b/src/mibew/styles/pages/default/css/default.css @@ -994,6 +994,25 @@ table.awaiting .no-threads, table.awaiting .no-visitors { 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 */ .lrtl .dashitem img, .lrtl #dashlocalesPopup h2 img, .lrtl #offwarn img { diff --git a/src/mibew/styles/pages/default/css/default_ie.css b/src/mibew/styles/pages/default/css/default_ie.css index 9528b081..d58dcfc6 100644 --- a/src/mibew/styles/pages/default/css/default_ie.css +++ b/src/mibew/styles/pages/default/css/default_ie.css @@ -16,12 +16,10 @@ * limitations under the License. */ -.inline-block { - display: inline; - zoom: 1; -} - -.dashitem { +.inline-block, +.dashitem, +.pagination .prevpage, +.pagination .nextpage { display: inline; zoom: 1; }