Bug 7500 [FOLLOW-UP][Star ratings] Use CSS Sprites for faster page loading
authorOwen Leonard <oleonard@myacpl.org>
Tue, 15 May 2012 19:29:33 +0000 (15:29 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 13 Sep 2012 15:52:05 +0000 (17:52 +0200)
Combines two star ratings sprites into one and makes
the corresponding CSS changes. The two original images
have been removed.

To test, view star ratings on search results and the detail page.
Try setting star ratings on the detail page.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/opac-tmpl/prog/en/css/jquery.rating.css
koha-tmpl/opac-tmpl/prog/images/delete.gif [deleted file]
koha-tmpl/opac-tmpl/prog/images/star-ratings-sprite.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/images/star.gif [deleted file]

index e89096b..616db6f 100644 (file)
@@ -1,9 +1,11 @@
 /* jQuery.Rating Plugin CSS - http://www.fyneworks.com/jquery/star-rating/ */
 div.rating-cancel,div.star-rating{float:left;width:15px;height:15px;text-indent:-999em;cursor:pointer;display:block;background:transparent;overflow:hidden}
-div.rating-cancel,div.rating-cancel a{background:url(../../images/delete.gif) no-repeat 0 -16px}
-div.star-rating,div.star-rating a{background:url(../../images/star.gif) no-repeat 0 0px}
-div.rating-cancel a,div.star-rating a{display:block;width:16px;height:100%;background-position:0 0px;border:0}
+div.rating-cancel,div.rating-cancel a{background:url(../../images/star-ratings-sprite.png) no-repeat 0 -49px}
+div.star-rating,div.star-rating a{background:url(../../images/star-ratings-sprite.png) no-repeat 0 0px}
+div.rating-cancel a{display:block;width:16px;height:100%;background-position:0 -49px;border:0}
+div.star-rating a{display:block;width:16px;height:100%;background-position:0 0px;border:0}
 div.star-rating-on a{background-position:0 -32px!important}
+div.rating-cancel.star-rating-hover a{background-position:0 -65px}
 div.star-rating-hover a{background-position:0 -16px}
 /* Read Only CSS */
 div.star-rating-readonly a{cursor:default !important}
diff --git a/koha-tmpl/opac-tmpl/prog/images/delete.gif b/koha-tmpl/opac-tmpl/prog/images/delete.gif
deleted file mode 100755 (executable)
index 43c6ca8..0000000
Binary files a/koha-tmpl/opac-tmpl/prog/images/delete.gif and /dev/null differ
diff --git a/koha-tmpl/opac-tmpl/prog/images/star-ratings-sprite.png b/koha-tmpl/opac-tmpl/prog/images/star-ratings-sprite.png
new file mode 100644 (file)
index 0000000..1dadc55
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/images/star-ratings-sprite.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/images/star.gif b/koha-tmpl/opac-tmpl/prog/images/star.gif
deleted file mode 100644 (file)
index d0948a7..0000000
Binary files a/koha-tmpl/opac-tmpl/prog/images/star.gif and /dev/null differ