From a4fa3bacb3b84bbe63581296919224a0bc5ee3e1 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Feb 2013 12:36:50 -0500 Subject: [PATCH] [PASSED QA] Bug 9690 - Replace YUI buttons on the catalog search results page with Bootstrap "Save," "Place hold," and "Z39.50 search" buttons on the catalog search results page are generated by YUI. This patch removes YUI styling from the "Save" button and uses Bootstrap to apply styling to the "Place hold" and "Z39.50 search" button. The "search to hold" split button menu is converted to Bootstrap as well. The "Save" button's appearance is inconsistent with the Bootstrap ones, but right now we don't have a good method for overriding the default submit button CSS with Bootstrap button styling. I hope this can be dealt with in a more global way in a subsequent patch. To test, search the catalog in the staff client. Confirm that the "Save," "Place hold," and "Z39.50 search" buttons look correct and work correctly. Also select a patron and "search to hold," confirming the functionality of all the opitions added to the "Place hold" button menu. Signed-off-by: Bernardo Gonzalez Kriegel Comment: All buttons works ok, nice looking. No errors. On button 'Place hold', all opitions works :) Signed-off-by: Katrin Fischer Works nicely, no problems found. Noticed that buttons here are smaller than in other places, but this has been so before. --- .../intranet-tmpl/prog/en/css/staff-global.css | 5 +- .../prog/en/modules/catalogue/results.tt | 103 ++++++++++---------- 2 files changed, 53 insertions(+), 55 deletions(-) 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 18a4ef2..4723e6b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1427,9 +1427,8 @@ li.email { border : 1px solid #B9D8D9; } -/* Hack just for Firefox */ -html>/**/body #searchheader button, x:-moz-any-link, x:default { - padding-bottom : 3px; +#searchheader .btn-group > .btn:first-child { + margin-left : .7em; } #searchheader form { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 4d89a53..c5eaaf8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -52,16 +52,35 @@ function cartList(){ return false; } } -$(window).load(function() { - new YAHOO.widget.Button("cartsubmit", { onclick: { fn: cartList }}); -}); $(document).ready(function() { -$("#placeholdc").empty(); +$("#cartsubmit").click(function(){ + cartList(); + return false; +}); +$("#z3950submit").click(function(){ + PopupZ3950(); + return false; +}); + +$("#searchheader").on("click",".placehold", function(){ + placeHold(); + $(".btn-group").removeClass("open"); + return false; +}); +$(".placeholdfor").click(function(){ + holdForPatron(); + $(".btn-group").removeClass("open"); + return false; +}); +$("#forgetholdfor").click(function(){ + forgetPatron(); + $(".btn-group").removeClass("open"); + return false; +}); $('#sortbyform').find("input:submit").hide(); $('#sort_by').change(function() { $('#sortbyform').submit(); }); -$(".addtocart").show(); var param1 = "