Fix for Bug 5593, Change cart markup to allow for easier icon styling

Replacing inline cart image with a span with a unique ID. Adding
styling to the deafult CSS to give that span a background of the
same cart image as before. Custom CSS can override this with a
different image.

Example for OPACUserCSS preference:

  background-image : url("/opac-tmpl/prog/famfamfam/silk/basket.png");
  width:16px;
  height:16px;
}

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

    background-image: url("/opac-tmpl/prog/famfamfam/silk/basket.png");
}

Will also change the cart image in opac detail view.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Owen Leonard 2011-01-07 11:15:18 -05:00 committed by Chris Cormack
parent ef9c269d7a
commit f1869ec064
2 changed files with 12 additions and 1 deletions

View File

@ -1654,6 +1654,17 @@ span.starMT {
* html #cartmenulink span, * html #listsmenulink span {
padding-top : 5px;
}
#cartmenulink span#carticon {
background: transparent url("../../images/cart.gif") top left no-repeat;
position: static;
width : 14px;
height:14px;
margin: 0.35em 0.45em 0 0.2em;
padding:0;
float: left;
}
#listsmenulink {
background : #9FBFFF;
}

View File

@ -48,7 +48,7 @@
var MSG_NO_RECORD_ADDED = _("No item was added to your cart");
var MSG_CONFIRM_DEL_BASKET = _("Are you sure you want to empty your cart?");
var MSG_CONFIRM_DEL_RECORDS = _("Are you sure you want to remove the selected items?");
$("#cartDetails").ready(function(){ $("#cmspan").html("<a href=\"#\" id=\"cartmenulink\" class=\"\"><i><\/i><span><i><\/i><span><\/span><img src=\"/opac-tmpl/prog/images/cart.gif\" width=\"14\" height=\"14\" alt=\"\" border=\"0\" /> "+_("Cart")+"<span id=\"basketcount\"><\/span><\/span><\/a>"); }); <!-- TMPL_ELSE --><!-- TMPL_IF NAME="virtualshelves" -->
$("#cartDetails").ready(function(){ $("#cmspan").html("<a href=\"#\" id=\"cartmenulink\" class=\"\"><i><\/i><span><i><\/i><span><\/span><span id=\"carticon\"></span> "+_("Cart")+"<span id=\"basketcount\"><\/span><\/span><\/a>"); }); <!-- TMPL_ELSE --><!-- TMPL_IF NAME="virtualshelves" -->
var MSG_NO_RECORD_SELECTED = _("No item was selected");<!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="opacuserlogin" --><!-- TMPL_IF NAME="TagsEnabled" -->var MSG_TAGS_DISABLED = _("Sorry, tags are not enabled on this system.");
var MSG_TAG_ALL_BAD = _("Error! Your tag was entirely markup code. It was NOT added. Please try again with plain text.");