Bug 7500 [FOLLOW-UP][Missing images] Use CSS Sprites for faster page loading

- Adds shelf browser navigational arrows to the main sprite.
- Removes "caret.gif" (a sort of breadcrumbs separator in the OPAC) and replaces
  it with a similar Unicode arrow entity.
- Replaces item-bullet.gif (a custom list bullet used in the Cart) with data URI
  encoding the image in the CSS

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Owen Leonard 2012-05-16 10:25:41 -04:00 committed by Paul Poulain
parent 4993fb4cb0
commit 5e61a800db
15 changed files with 36 additions and 13 deletions

View file

@ -2012,7 +2012,6 @@ a#MARCview, a#MARCviewPop, a#ISBDview, a#Normalview, a#Fullhistory, a#Briefhisto
text-decoration : none;
}
#shelfbrowser td, #shelfbrowser th {
vertical-align : bottom;
width : 20%;
}
#shelfbrowser td.top {
@ -2024,6 +2023,30 @@ a#MARCview, a#MARCviewPop, a#ISBDview, a#Normalview, a#Fullhistory, a#Briefhisto
#shelfbrowser a {
display : block;
}
#shelfbrowser #browser_next,
#shelfbrowser #browser_previous {
background-image : url("../../images/sprite.png");
background-position : -5px -988px;
background-repeat: no-repeat;
width : 16px;
}
#shelfbrowser #browser_next a,
#shelfbrowser #browser_previous a {
cursor: pointer;
display : block;
height: 0 !important;
margin: 0;
overflow: hidden;
padding: 50px 0 0;
text-decoration: none;
width: 16px;
}
#shelfbrowser #browser_previous {
background-position: -9px -1001px;
}
#shelfbrowser #browser_next {
background-position: -9px -1051px;
}
#comments .commentline {
border-bottom : 2px solid #eeeeeb;
@ -2133,7 +2156,7 @@ div.ft {
}
#basket td ul li {
font-size:90%;
list-style:disc outside url("../../images/item-bullet.gif");
list-style:disc outside url(data:image/gif;base64,R0lGODlhBQAHAJECAP///5zD6v///wAAACH5BAEAAAIALAAAAAAFAAcAAAIMjCUGkbvhFGQSmVAAADs=);
padding:0.2em 0;
}

View file

@ -13,7 +13,7 @@
<div id="useraccount" class="container">
<!--CONTENT-->
[% FOREACH BORROWER_INF IN BORROWER_INFO %]
<h3><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Fines and charges</h3>
<h3><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]'s account</a> &#8674; Fines and charges</h3>
[% END %]
[% IF ( ACCOUNT_LINES ) %]

View file

@ -811,7 +811,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
<table><tr>
<td rowspan="2" style="width:20px;"><a style="height: 10em;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% IF ( shelfbrowser_prev_biblionumber ) %][% shelfbrowser_prev_biblionumber %][% ELSE %][% biblionumber %][% END %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_prev_itemnumber %]#shelfbrowser"><img src="/opac-tmpl/prog/images/browse-prev.gif" alt="Previous" border="0" /></a></td>
<td rowspan="2" style="width:20px;"><div id="browser_previous"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% IF ( shelfbrowser_prev_biblionumber ) %][% shelfbrowser_prev_biblionumber %][% ELSE %][% biblionumber %][% END %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_prev_itemnumber %]#shelfbrowser">Previous</a></div></td>
[% FOREACH PREVIOUS_SHELF_BROWS IN PREVIOUS_SHELF_BROWSE %]
<td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% PREVIOUS_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% PREVIOUS_SHELF_BROWS.itemnumber %]#shelfbrowser">
[% IF ( OPACAmazonCoverImages ) %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_isbn ) %]<img border="0" src="http://images.amazon.com/images/P/[% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %].01._AA75_PU_PU-5_.jpg" alt="" />[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
@ -845,7 +845,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
</a></td>
[% END %]
<td rowspan="2" style="width:20px;"><a style="height: 10em;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% IF ( shelfbrowser_next_biblionumber ) %][% shelfbrowser_next_biblionumber %][% ELSE %][% biblionumber %][% END %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_next_itemnumber %]#shelfbrowser"><img src="/opac-tmpl/prog/images/browse-next.gif" alt="Next" border="0" /></a></td>
<td rowspan="2"><div id="browser_next"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% IF ( shelfbrowser_next_biblionumber ) %][% shelfbrowser_next_biblionumber %][% ELSE %][% biblionumber %][% END %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_next_itemnumber %]#shelfbrowser">Next</a></div></td>
</tr>
<tr>
@ -854,7 +854,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
[% END %]
[% FOREACH NEXT_SHELF_BROWS IN NEXT_SHELF_BROWSE %]
<td class="top">[% NEXT_SHELF_BROWS.itemcallnumber %]<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% NEXT_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% NEXT_SHELF_BROWS.itemnumber %]#shelfbrowser">[% NEXT_SHELF_BROWS.title |html %]</a></td>
<td class="top" style="width:20px;">[% NEXT_SHELF_BROWS.itemcallnumber %]<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% NEXT_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% NEXT_SHELF_BROWS.itemnumber %]#shelfbrowser">[% NEXT_SHELF_BROWS.title |html %]</a></td>
[% END %]
</tr>
</table>

View file

@ -25,7 +25,7 @@
<div class="yui-b"><div class="yui-g" id="usermessaging">
[% FOREACH BORROWER_INF IN BORROWER_INFO %]
<h3><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your messaging settings</h3>
<h3><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]'s account</a> &#8674; Your messaging settings</h3>
[% END %]
<form action="/cgi-bin/koha/opac-messaging.pl" method="get" name="opacmessaging">

View file

@ -9,7 +9,7 @@
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<div id="userpasswd" class="container">
<h3><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]'s account</a> <img src="[% themelang %]l../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Change your password </h3>
<h3><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]'s account</a> &#8674; Change your password </h3>
[% IF ( Error_messages ) %]
<div class="dialog error"> <h3>There was a problem with your submission</h3>

View file

@ -9,7 +9,7 @@
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<div id="userprivacy" class="container">
<h3><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]'s account</a> <img src="[% themelang %]l../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Privacy policy </h3>
<h3><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]'s account</a> &#8674; Privacy policy </h3>
[% IF ( deleted ) %]
<div class="dialog message">Your reading history has been deleted.</div>

View file

@ -24,7 +24,7 @@ $(document).ready(function(){
<div class="yui-b"><div class="yui-g">
<div id="userreadingrecord" class="container">
<!--CONTENT-->
<h3><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Checkout history</h3>
<h3><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]'s account</a> &#8674; Checkout history</h3>
[% UNLESS ( count ) %]
You have never borrowed anything from this library.

View file

@ -257,7 +257,7 @@ $(function() {
<div class="yui-g">
[% IF ( viewshelf ) %]<!-- Viewing a particular shelf -->
<h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> <img src="[% themelang %]/../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> <em>[% shelfname |html %]</em></h3>
<h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> &#8674; <em>[% shelfname |html %]</em></h3>
[% IF ( itemsloop ) %]
<div id="toolbar" class="list-actions">

View file

@ -9,7 +9,7 @@
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<h3><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Personal details</h3>
<h3><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]'s account</a> &#8674; Personal details</h3>
<table>
<tr><th scope="row">Name:</th><td> [% firstname %] [% surname %]</td></tr>

View file

@ -13,7 +13,7 @@
<div id="userupdatecontainer" class="container">
[% FOREACH BORROWER_INF IN BORROWER_INFO %]
<h3><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your personal details</h3>
<h3><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]'s account</a> &#8674; Your personal details</h3>
[% IF ( OPACPatronDetails ) %]
<form action="/cgi-bin/koha/opac-userupdate.pl" method="get">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB