Fix for Bug 5593, Change cart markup to allow for easier icon styling
authorOwen Leonard <oleonard@myacpl.org>
Fri, 7 Jan 2011 16:15:18 +0000 (11:15 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Tue, 5 Apr 2011 03:04:07 +0000 (15:04 +1200)
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>
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc

index 83b54ea..f04a51c 100644 (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;
 }
index a0869b2..570bd5f 100644 (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.");