From 7fa4ec92070a049f67401d57744d3385fc4a7e0d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 8 Mar 2013 10:43:45 -0500 Subject: [PATCH] Bug 9771 - Replace YUI buttons on acquisitions basket groups page with Bootstrap Content-Type: text/plain; charset="utf-8" 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. --- .../prog/en/modules/acqui/basketgroup.tt | 77 ++++++++------------ 1 file changed, 29 insertions(+), 48 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 d8be02a..58896ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -97,11 +97,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 +113,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,18 +121,20 @@ 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 +221,18 @@ function yuiToolbar() { [% END %] - + Cancel
-
[% ELSE %] -
+ + +

Basket grouping for [% booksellername |html %]

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