From 3dae3454288c86dca5c0f8f6d2143d158318eedc Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 8 Mar 2013 10:43:45 -0500 Subject: [PATCH] Bug 9771 [Revised] Replace YUI buttons on acquisitions basket groups page with Bootstrap The acquisitions basket group page has a toolbar with YUI-generated buttons and menus. It should use Bootstrap instead. This patch removes the YUI menu buttons altogether, replacing that functionality with the sidebar menu now included on other acquisitions pages (See Bug 8913). The "New basket group" button is now styled by Bootstrap. Other minor changes: Corrections of invalid markup, improvement to breadcrumbs. To test, view the basket group page and confirm that the toolbar button looks correct and works correctly. Confirm that navigation works and that functionality of the basket group edit page is not affected. Revision adds an explicit width to the basket-grouping form columns so that they don't stretch too wide (and far from each other) when the browser window is very wide. This better replicates the layout of the previous version. Signed-off-by: Mathieu Saby Signed-off-by: Katrin Fischer All tests and QA script happy. Signed-off-by: Jared Camins-Esakov --- .../prog/en/modules/acqui/basketgroup.tt | 83 ++++++++----------- 1 file changed, 33 insertions(+), 50 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index b0a7a92674..deb20e9bf3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -20,7 +20,9 @@ body { margin:0; padding:0; } - +#basketgroupcolumns { + width: 58em; +} #ungrouped { overflow: auto; height: 400px; @@ -97,11 +99,8 @@ function submitForm(form) { form.appendChild(input); } } -// prepare DOM for YUI Toolbar $(document).ready(function() { - // $("#toolbar").empty(); - yuiToolbar(); $("#basket_groups").tabs(); $("table").dataTable($.extend(true, {}, dataTablesDefaults, { @@ -116,34 +115,7 @@ function submitForm(form) { }); -// YUI Toolbar Functions -function yuiToolbar() { - var booksellermenu = [ - { text: _("Vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]" }, - { text: _("Edit vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=enter"}, - ] - var ordersbutton = [ - { text: _("Manage orders"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]" }, - { text: _("Edit uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" }, - ] - new YAHOO.widget.Button("newbasketgroup"); - new YAHOO.widget.Button({ - type: "menu", - label: _("Vendor"), - name: "booksellerbutton", - menu: booksellermenu, - container: "toolbar" - }); - - new YAHOO.widget.Button({ - type: "menu", - label: _("Orders"), - name: "ordersbutton", - menu: ordersbutton, - container: "toolbar" - }); -} //]]> @@ -151,19 +123,21 @@ function yuiToolbar() { [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - + +[% ELSE %] + [% booksellername |html %] › Basket grouping +[% END %] + +
+
+
+
-
- -
- -

Basket grouping for [% booksellername |html %]

-
[% IF ( grouping ) %] -
-
+

Add basket group for [% booksellername |html %]

+
@@ -249,14 +223,18 @@ function yuiToolbar() { [% END %] - + Cancel
-
[% ELSE %] -
+ + +

Basket grouping for [% booksellername |html %]

+
    [% UNLESS ( closed ) %]
  • Open
  • @@ -282,11 +260,9 @@ function yuiToolbar() { [% END %] -
    -
    [% END %] @@ -323,8 +299,15 @@ function yuiToolbar() {
-
-
+
[% END %] - +
+
+
+[% IF ( booksellerid ) %] +[% INCLUDE 'vendor-menu.inc' %] +[% END %] +[% INCLUDE 'acquisitions-menu.inc' %] +
+
[% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5