Bugzilla – Attachment 15976 Details for
Bug 9769
Replace YUI buttons on acquisitions basket page with Bootstrap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9769 - Replace YUI buttons on acquisitions basket page with Bootstrap
Bug-9769---Replace-YUI-buttons-on-acquisitions-bas.patch (text/plain), 10.54 KB, created by
Owen Leonard
on 2013-03-08 14:58:04 UTC
(
hide
)
Description:
Bug 9769 - Replace YUI buttons on acquisitions basket page with Bootstrap
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-03-08 14:58:04 UTC
Size:
10.54 KB
patch
obsolete
>From 3f5a81b29b7ed958dc96a18fb6f803eace0f08ae Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 8 Mar 2013 09:46:13 -0500 >Subject: [PATCH] Bug 9769 - Replace YUI buttons on acquisitions basket page > with Bootstrap >Content-Type: text/plain; charset="utf-8" > >Toolbar buttons on the acquisitions basket page are constructed by YUI. >They should use Bootstrap instead. > >Other minor changes: Fixes for invalid markup. > >To test, view baskets in various states: Empty, open closed. View >baskets in groups and not in groups. Buttons should look correct and >work correctly: > >- Edit >- Delete >- Close >- Reopen >- Export >--- > .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 94 ++++++++------------ > 1 file changed, 36 insertions(+), 58 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index 386d699..a7ba854 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -78,7 +78,8 @@ > [% UNLESS ( grouped ) %] > <script type="text/javascript"> > //<![CDATA[ >- function confirm_reopen(skip) { >+ function confirm_reopen() { >+ var skip = [% skip_confirm_reopen %]; > var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?")); > if (is_confirmed) { > window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]"; >@@ -104,7 +105,15 @@ > var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { > "sPaginationType": "four_button" > } ) ); >- } ); >+ $("#delbasketbutton").on("click",function(e){ >+ e.preventDefault(); >+ confirm_deletion(); >+ }); >+ $("#reopenbutton").on("click",function(e){ >+ e.preventDefault(); >+ confirm_reopen(); >+ }); >+ }); > //]]> > </script> > >@@ -127,62 +136,25 @@ > [% UNLESS ( confirm_close ) %] > [% UNLESS ( selectbasketg ) %] > [% UNLESS ( closedate ) %] >- <div id="toolbar"> >- <script type="text/javascript"> >- //<![CDATA[ >- // prepare DOM for YUI Toolbar >- $(document).ready(function() { >- yuiToolbar(); >- }); >- // YUI Toolbar Functions >- function yuiToolbar() { >- [% IF ( unclosable ) %] >- new YAHOO.widget.Button("closebutton", {disabled:true}); >- [% ELSIF ( uncertainprices ) %] >- new YAHOO.widget.Button("uncertpricesbutton"); >- [% ELSE %] >- new YAHOO.widget.Button("closebutton"); >- [% END %] >- new YAHOO.widget.Button("basketheadbutton"); >- new YAHOO.widget.Button("exportbutton"); >- new YAHOO.widget.Button("delbasketbutton"); >- } >- //]]> >- </script> >- >- <ul id="toolbar-list" class="toolbar"> >- <li><a href="basketheader.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&op=add_form" class="button" id="basketheadbutton">Edit basket</a></li> >- <li><a href="javascript:confirm_deletion();" class="button" id="delbasketbutton">Delete this basket</a></li> >+ <div id="toolbar" class="btn-toolbar"> >+ <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&op=add_form" class="btn btn-small" id="basketheadbutton"><i class="icon-pencil"></i> Edit basket</a></div> >+ <div class="btn-group"><a href="#" class="btn btn-small" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div> > [% IF ( unclosable ) %] > [% ELSIF ( uncertainprices ) %] >- <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" class="button" id="uncertpricesbutton">Uncertain prices</a></li> >+ <div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" class="btn btn-small" id="uncertpricesbutton">Uncertain prices</a></div> > [% ELSE %] >- <li><a href="[% script_name %]?op=close&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="button" id="closebutton">Close this basket</a></li> >+ <div class="btn-group"> >+ <a href="[% script_name %]?op=close&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="closebutton"><i class="icon-remove-sign"></i> Close this basket</a> >+ </div> > [% END %] >- <li><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="button" id="exportbutton">Export this basket as CSV</a></li> >- </ul> >+ <div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div> > > </div> > [% ELSE %] > [% UNLESS ( grouped ) %] >- <div id="toolbar"> >- <script type="text/javascript"> >- //<![CDATA[ >- // prepare DOM for YUI Toolbar >- $(document).ready(function() { >- yuiToolbar(); >- }); >- // YUI Toolbar Functions >- function yuiToolbar() { >- new YAHOO.widget.Button("reopenbutton"); >- new YAHOO.widget.Button("exportbutton"); >- } >- //]]> >- </script> >- <ul id="toolbar-list" class="toolbar"> >- <li><a href="javascript:confirm_reopen([% skip_confirm_reopen %]);" class="button" id="reopenbutton">Reopen this basket</a></li> >- <li><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="button" id="exportbutton">Export this basket as CSV</a></li> >- </ul> >+ <div id="toolbar" class="btn-toolbar"> >+ <div class="btn-group"><a href="#" class="btn btn-small" id="reopenbutton"><i class="icon-refresh"></i> Reopen this basket</a></div> >+ <div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div> > </div> > [% END %] > [% END %] >@@ -307,13 +279,16 @@ > [% FOREACH foot_loo IN book_foot_loop %] > <tr> > <th>Total (GST [% foot_loo.gstgsti %])</th> >- <th class="gste"/><th class="gste"/><th class="gsti"/><th class="gsti"/> >+ <th class="gste"> </th> >+ <th class="gste"> </th> >+ <th class="gsti"> </th> >+ <th class="gsti"> </th> > <th>[% foot_loo.quantity %]</th> > <th class="gste">[% foot_loo.totalgste %]</th> > <th class="gsti">[% foot_loo.totalgsti %]</th> >- <th/> >+ <th> </th> > <th>[% foot_loo.gstvalue %]</th> >- <th/> >+ <th> </th> > [% IF ( active ) %] > [% UNLESS ( closedate ) %] > <th> </th> >@@ -324,13 +299,16 @@ > [% END %] > <tr> > <th>Total ([% currency %])</th> >- <th class="gste"/><th class="gste"/><th class="gsti"/><th class="gsti"/> >+ <th class="gste"> </th> >+ <th class="gste"> </th> >+ <th class="gsti"> </th> >+ <th class="gsti"> </th> > <th>[% total_quantity %]</th> > <th class="gste">[% total_gste %]</th> > <th class="gsti">[% total_gsti %]</th> >- <th/> >+ <th> </th> > <th>[% total_gstvalue %]</th> >- <th/> >+ <th> </th> > [% IF ( active ) %] > [% UNLESS ( closedate ) %] > <th> </th> >@@ -356,12 +334,12 @@ > Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %] > (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]&op=show">suggestion #[% books_loo.suggestionid %]</a>) > [% END %] >+ </p> > [% IF ( books_loo.notes ) %] > <p class="ordernote"><strong>Note: </strong>[% books_loo.notes|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Change note</a>]</p> > [% ELSE %] >- [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Add note</a>] >+ <p>[<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Add note</a>]</p> > [% END %] >- </p> > </td> > <td class="number gste [% IF books_loo.rrpgste.search('^0') %]error[% END %]">[% books_loo.rrpgste %]</td> > <td class="number gste [% IF books_loo.ecostgste.search('^0') %]error[% END %]">[% books_loo.ecostgste %]</td> >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9769
:
15976
|
16240
|
16269
|
16573
|
18068