From 8fd0378f830b9d1d42a11e8df06cffab2dfb5eb6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 8 Dec 2009 10:03:49 -0500 Subject: [PATCH] Changes to the appearance and behavior of the cart in the staff client (see Bug 3871) --- .../prog/en/css/staff-global.css | 162 +----------------- .../intranet-tmpl/prog/en/includes/header.inc | 6 +- koha-tmpl/intranet-tmpl/prog/en/js/basket.js | 40 +---- .../intranet-tmpl/prog/img/cart-small.gif | Bin 0 -> 456 bytes 4 files changed, 15 insertions(+), 193 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/cart-small.gif diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 313e36b87a..e99df5318d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -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 diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index b8b33e5823..8e0320f5ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -6,6 +6,9 @@
  • Circulation
  • Patrons
  • Search
  • + +
  • Cart
  • +
  • More @@ -37,9 +40,6 @@
  • - -
  • Cart
  • -
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js index f0bbf7b94b..8a0bd208ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js @@ -374,10 +374,10 @@ function showLess() { function updateBasket(updated_value,target) { if(target){ - target.$('#basketcount').html(""+updated_value+""); + target.$('#basketcount').html(" ("+updated_value+")"); target.$('#cartDetails').html(_("Your cart contains ")+updated_value+_(" items")); } else { - $('#basketcount').html(""+updated_value+""); + $('#basketcount').html(" ("+updated_value+")"); $('#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 index 0000000000000000000000000000000000000000..e7899a7e02f4f64b41b9525c0c4bbc3b3e5d362e GIT binary patch literal 456 zcmZ?wbhEHbk literal 0 HcmV?d00001 -- 2.39.5