Changes to the appearance and behavior of the cart in the staff client (see Bug 3871)
authorOwen Leonard <oleonard@oleonard-desktop.(none)>
Tue, 8 Dec 2009 15:03:49 +0000 (10:03 -0500)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Sun, 20 Dec 2009 13:27:12 +0000 (14:27 +0100)
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
koha-tmpl/intranet-tmpl/prog/en/js/basket.js
koha-tmpl/intranet-tmpl/prog/img/cart-small.gif [new file with mode: 0644]

index 313e36b..e99df53 100644 (file)
@@ -1791,9 +1791,11 @@ h1#xml a {
        width:35px;
 }
 
-#cartDetails,#cartUpdate,#holdDetails,#listsDetails {
+#cartDetails {
        background-color : #FFF;
        border: 1px solid #739acf;
+       border-right-width : 2px;
+       border-bottom-width : 2px;
        color : black;
        display : none;
        margin : 0;
@@ -1801,163 +1803,15 @@ h1#xml a {
        text-align : center;
        width : 180px;
 }
-
-#cartmenulink, #listsmenulink {
-       background : #aaa;
-       padding : 5px;
-       color : #333;
-       text-decoration : none;
-       cursor : pointer;
-}
-
- #cartmenulink *, #listsmenulink * {
-       font-style : normal;
-       background-image : url(../../img/button-bg.gif);
-       background-repeat : no-repeat;
-}
-
- #cartmenulink i, #listsmenulink i {
-       background-position : top left;
-       position : absolute;
-       margin-bottom : -5px;
-       top : 0;
-       left : 0;
-       width : 5px;
-       height : 5px;
-}
-
- #cartmenulink span, #listsmenulink span {
-       background-position : bottom left;
-       left : -5px;
-       padding : 0 0 5px 10px;
-       margin-bottom : -5px;
-}
-/* For IE7 */
- *:first-child+html #cartmenulink span { padding-top : 3px; padding-bottom : 7px; }
- *:first-child+html #listsmenulink span { padding-top : 5px; }
-
- #cartmenulink span i, #listsmenulink span i {
-       background-position : bottom right;
-       margin-bottom : 0;
-       position : absolute;
-       left : 100%;
-       width : 10px;
-       height : 100%;
-       top : 0;
-}
-
- #cartmenulink span span, #listsmenulink span span {
-       background-position : top right;
-       position : absolute;
-       right : -10px;
-       margin-left : 10px;
-       top : -5px;
-       height : 0;
-}
-
-* html #cartmenulink span, * html #cartmenulink i, * html #listsmenulink span, * html #listsmenulink i {
-       float : left;
-       width : auto;
-       background-image : none;
-       cursor : pointer;
-}
-* html #cartmenulink span, * html #listsmenulink span {
-       padding-top : 5px;
-}
-#listsmenulink {
-       background : #9FBFFF;
-}
-
-#cartmenulink {
-       background : #98CB58;
-       color : #336600;
-       font-size : 105%;
-}
-
-#listsmenulink:hover {
-       background-color : #b8d0e6;
-}
-
-#cartmenulink:hover {
-       background-color : #BFDE96;
-}
-
-#cartmenulink img {
-       background-image : none;
-       display : inline;
-       padding : 3px 3px 0 3px;
-}
-
-#cartmenulink span#basketcount {
-       background-image : none;
-       float : none;
-       display : inline;
-       height : auto;
-       position : relative;
-       margin : 0;
-       padding : 0;
-       left : auto;
-       right : auto;
-       top : auto;
-}
-
 #cartmenulink span#basketcount span {
-       background-image : none;
-       background-color : #E6FCB7;
-       color : #000;
        display : inline;
-       float : none;
-       font-size : 80%;
+       font-size : 90%;
        font-weight : normal;
-       margin : 0 0 0 .9em;
-       padding : 0 .3em 0 .3em;
-       position : relative;
-       left : auto;
-       right : auto;
-       top : auto;
-}
-
-a#listsmenulink, a#listsmenulink:hover {
-       color : #006699;
-       font-size : 105%;
-       font-weight : bold;
-       line-height : 185%;
-       margin-left : 1.5em;
-}
-
-a#cartmenulink, a#cartmenulink:hover {
-       color : #336600;
-       font-size : 105%;
-       font-weight : bold;
-       line-height : 185%;
-       margin-left : 1.5em;
-}
-* html a#cartmenulink {
-       padding-top: 0;
-}
- * html a#cartmenulink:hover {
-       padding-top : 0;
+       padding : 0;
 }
-/* For IE7 */
-*:first-child+html a#listsmenulink { padding-top : 0; }
-*:first-child+html a#listsmenulink:hover { padding-top : 0; }
-*:first-child+html a#cartmenulink { padding-top : 0; }
-*:first-child+html a#cartmenulink:hover { padding-top : 0; }
-*:first-child+html #cartmenulink span i{ top : -4px; }
-*:first-child+html #listsmenulink span i { top : -5px; }
 
-#listsmenulink img {
+#cartmenulink img {
        background-image : none;
        display : inline;
-       padding : 0 0 2px 0;
-}
-
-* html #cartmenulink {
-       border : 1px solid #336600;
-}
-
-* html #listsmenulink {
-       border : 1px solid #006699;
-}
-
-
+       padding : 3px 6px 0 0;
+}
\ No newline at end of file
index b8b33e5..8e0320f 100644 (file)
@@ -6,6 +6,9 @@
                 <!-- TMPL_IF NAME="CAN_user_circulate" --><li><a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a></li><!-- /TMPL_IF -->
                 <!-- TMPL_IF NAME="CAN_user_borrowers" --><li><a href="/cgi-bin/koha/members/members-home.pl">Patrons</a></li><!-- /TMPL_IF -->
                 <!-- TMPL_IF NAME="CAN_user_catalogue" --><li><a href="/cgi-bin/koha/catalogue/search.pl">Search</a></li><!-- /TMPL_IF -->
+                <!-- TMPL_IF NAME="intranetbookbag" -->
+                    <li><a href="#" id="cartmenulink"><img src="/intranet-tmpl/prog/img/cart-small.gif" alt="" border="0" />Cart<span id="basketcount"></span></a></li>
+                <!-- /TMPL_IF -->
                 <!-- TMPL_VAR name="IntranetNav" -->
                 <li class="more">
                     <a id="showmore" href="/cgi-bin/koha/mainpage.pl">More</a>
@@ -37,9 +40,6 @@
                         </div>
                     </div>
                 </li>
-                <!-- TMPL_IF NAME="intranetbookbag" -->
-                    <li><a href="#" id="cartmenulink"><i></i><span><i></i><span></span><img src="/intranet-tmpl/prog/img/cart.gif" width="14" height="14" alt="" border="0" />Cart<span id="basketcount"></span></span></a></li>
-                <!-- /TMPL_IF -->
             </ul>
         </div>
     <div id="login">
index f0bbf7b..8a0bd20 100644 (file)
@@ -374,10 +374,10 @@ function showLess() {
 
 function updateBasket(updated_value,target) {
        if(target){
-       target.$('#basketcount').html("<span>"+updated_value+"</span>");
+       target.$('#basketcount').html(" <span>("+updated_value+")</span>");
        target.$('#cartDetails').html(_("Your cart contains ")+updated_value+_(" items"));
        } else {
-       $('#basketcount').html("<span>"+updated_value+"</span>");
+       $('#basketcount').html(" <span>("+updated_value+")</span>");
        $('#cartDetails').html(_("Your cart contains ")+updated_value+_(" items"));
        }
        var basketcount = updated_value;
@@ -420,50 +420,18 @@ function vShelfAdd() {
 function showCart(){
                var position = $("#cartmenulink").offset();
                var top = position.top + $("#cartmenulink").outerHeight();
-               var menuWidth = 200;
-               var buttonWidth = $("#cartmenulink").innerWidth();
-               var buttonOffset = menuWidth - buttonWidth;
-               var left = position.left -  buttonOffset;
+               var left = position.left
                $("#cartDetails").css("position","absolute").css("top",top);
                $("#cartDetails").css("position","absolute").css("left",left);
-               $("#cartDetails").fadeIn("fast",function(){
-                       $("#cartDetails").dropShadow({left: 3, top: 3, blur: 0,  color: "#000", opacity: 0.1});
-        });
-}
-
-function showLists(){
-               var position = $("#listsmenulink").offset();
-              var top = position.top + $("#listsmenulink").outerHeight();
-               var menuWidth = 200;
-               var buttonWidth = $("#listsmenulink").innerWidth();
-               var buttonOffset = menuWidth - buttonWidth;
-               var left = position.left -  buttonOffset;
-               $("#listsDetails").css("position","absolute").css("top",top);
-               $("#listsDetails").css("position","absolute").css("left",left);
-               $("#listsDetails").fadeIn("fast",function(){
-                       $("#listsDetails").dropShadow({left: 3, top: 3, blur: 0,  color: "#000", opacity: 0.1});
-        });
+               $("#cartDetails").fadeIn("fast");
 }
 
 function hideCart(){
-    $("#cartDetails").removeShadow();
     $("#cartDetails").fadeOut("fast");
 }
 
-function hideLists(){
-    $("#listsDetails").removeShadow();
-    $("#listsDetails").fadeOut("fast");
-}
-
-
 $(document).ready(function(){
        $("#cartmenulink").click(function(){ openBasket(); return false; });
-       $("#cartDetails,#cartmenulink").click(function(){ hideCart(); });
-       $("#cartmenulink").hover(function(){
-               showCart();
-       },function(){
-               hideCart();
-       });
        if(basketcount){ updateBasket(basketcount); }
 });
 
diff --git a/koha-tmpl/intranet-tmpl/prog/img/cart-small.gif b/koha-tmpl/intranet-tmpl/prog/img/cart-small.gif
new file mode 100644 (file)
index 0000000..e7899a7
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/cart-small.gif differ