From 7f6a009754c509a7f2c8df01aac5d08d39e98828 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Feb 2013 12:36:50 -0500 Subject: [PATCH] Bug 9690 - Replace YUI buttons on the catalog search results page with Bootstrap Content-Type: text/plain; charset="utf-8" "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. --- .../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 e95c60f..4fd2d70 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 = "