Bugzilla – Attachment 15368 Details for
Bug 9616
Replace YUI menu on patrons page with Bootstrap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9616 - Replace YUI menu on patrons page with Bootstrap
Bug-9616---Replace-YUI-menu-on-patrons-page-with-B.patch (text/plain), 5.00 KB, created by
Owen Leonard
on 2013-02-15 15:41:40 UTC
(
hide
)
Description:
Bug 9616 - Replace YUI menu on patrons page with Bootstrap
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-02-15 15:41:40 UTC
Size:
5.00 KB
patch
obsolete
>From c4f22d1c26b36d25afe40f7f2da7c2eebdf4828f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 15 Feb 2013 10:37:50 -0500 >Subject: [PATCH] Bug 9616 - Replace YUI menu on patrons page with Bootstrap >Content-Type: text/plain; charset="utf-8" > >This patch converts the toolbar include file used to create the "New >patron" menu to Bootstrap, replacing YUI button and menu code >with Bootstrap markup. > >To test, view any page which uses patron-toolbar.inc (members-home.pl or >circulation.pl after searching for a non-existent patron). Button and >menu should look correct and work correctly with the AddPatronLists >preference in both states. >--- > .../prog/en/includes/patron-toolbar.inc | 86 ++++---------------- > 1 file changed, 16 insertions(+), 70 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >index 4a9b715..374d388 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >@@ -1,73 +1,19 @@ > [% UNLESS ( no_add ) %] >-<div id="toolbar"> >- <script type="text/javascript"> >- //<![CDATA[ >- >- // prepare DOM for YUI Toolbar >- >- $(document).ready(function() { >-[% IF ( AddPatronLists_categorycode ) %] >-[% ELSE %] >- $("#addchild").parent().remove(); >- $("#addprofessional").parent().remove(); >- $("#addorganisation").parent().remove(); >- $("#addstaff").parent().remove(); >- $("#addstatistical").parent().remove(); >-[% END %] >- $("#newmenuc").empty(); >- yuiToolbar(); >- }); >- >- // YUI Toolbar Functions >- >- function yuiToolbar() { >- >- var newmenu = [ >-[% IF ( AddPatronLists_categorycode ) %] >-[% FOREACH categorie IN categories %] >-{ text: "[% categorie.description %]", url: "/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=[% categorie.categorycode %]" }, >-[% END %] >-[% ELSE %] >- { text: _("Adult patron"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=A" }, >- { text: _("Child patron"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=C" }, >- { text: _("Professional patron"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=P" }, >- { text: _("Organization"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=I" }, >- { text: _("Staff"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=S" }, >- { text: _("Statistical"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=X" }, >-[% END %] >- ] >- >- new YAHOO.widget.Button({ >- type: "menu", >- label: _("New patron"), >- name: "newmenubutton", >- menu: newmenu, >- container: "newmenuc" >- }); >- >- } >- >- //]]> >- </script> >- <ul class="toolbar"> >- <li id="newmenuc"> >- <form action="/cgi-bin/koha/members/memberentry.pl" method="get"> >- <input type="hidden" name="op" value="add" /> >- <label for="newcategorycode">New patron: </label><select name="categorycode" id="newcategorycode"> >- [% IF ( AddPatronLists_categorycode ) %] >- [% FOREACH categorie IN categories %]<option value="[% categorie.categorycode %]">[% categorie.description %]</option>[% END %] >- [% ELSE %] >- <option value="A">Adult patron</option> >- <option value="C">Child patron</option> >- <option value="P">Professional patron</option> >- <option value="I">Organization</option> >- <option value="S">Staff</option> >- <option value="X">Statistical</option> >- [% END %] >- </select> >- <input type="submit" class="submit" value="Go" /> >- </form> >- </li> >-</ul> >+<div id="toolbar" class="btn-toolbar"> >+ <div class="btn-group"> >+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New patron <span class="caret"></span></button> >+ <ul class="dropdown-menu"> >+ [% IF ( AddPatronLists_categorycode ) %] >+ [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=[% categorie.categorycode %]">[% categorie.description %]</a></li>[% END %] >+ [% ELSE %] >+ <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=A">Adult patron</a></li> >+ <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=C">Child patron</a></li> >+ <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=P">Professional patron</a></li> >+ <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=I">Organization</a></li> >+ <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=S">Staff patron</a></li> >+ <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=X">Statistical patron</a></li> >+ [% END %] >+ </ul> >+ </div> > </div> > [% END %] >\ No newline at end of file >-- >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 9616
:
15362
|
15368
|
15370
|
15452