Bugzilla – Attachment 15599 Details for
Bug 9675
Replace YUI buttons on authorities home page with Bootstrap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9675 - Replace YUI buttons on authorities home page with Bootstrap
SIGNED-OFF-Bug-9675---Replace-YUI-buttons-on-autho.patch (text/plain), 5.89 KB, created by
Bernardo Gonzalez Kriegel
on 2013-02-21 20:15:05 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9675 - Replace YUI buttons on authorities home page with Bootstrap
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-02-21 20:15:05 UTC
Size:
5.89 KB
patch
obsolete
>From 4df65484f4c20e788eba3745687e6ac10fbed918 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 21 Feb 2013 14:37:18 -0500 >Subject: [PATCH] [SIGNED-OFF] Bug 9675 - Replace YUI buttons on authorities > home page with Bootstrap > >This patch converts the toolbar include file used by the >authorities home page and authority view page >(authorities-home.pl and authorities/detail.pl) replacing YUI button >and menu code with Bootstrap. > >To test: > >- View the authorities home page and confirm that the "New > authority" button looks correct and works correctly. >- Search for an existing authority and click the "Details" link to view. > "Edit," "Delete," "Save," and "New authority" buttons should look > correct and work correctly. The "Delete" button should only appear for > authorities which are unused. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Comment: Now it works. New and all operations on existing auth works. >No errors. >--- > .../prog/en/includes/authorities-toolbar.inc | 109 +++++++------------- > 1 file changed, 35 insertions(+), 74 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc >index ec216bd..e25f49f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc >@@ -1,82 +1,43 @@ >-<div id="toolbar"> > <script type="text/javascript"> >- //<![CDATA[ >- >- // prepare DOM for YUI Toolbar >- >- $(document).ready(function() { >- $("#newmenuc").empty(); >- $("#delAuthc").empty(); >- $("#savemenuc").empty(); >- yuiToolbar(); >- }); >- >- // YUI Toolbar Functions >- >- function yuiToolbar() { >- >- var newmenu = [ >- [% FOREACH authtypesloo IN authtypesloop %]{ text: "[% authtypesloo.authtypetext %]", url: "/cgi-bin/koha/authorities/authorities.pl?authtypecode=[% authtypesloo.value %]"}, >-[% END %] >- ] >- >- new YAHOO.widget.Button({ >- type: "menu", >- label: _("New authority"), >- name: "newmenubutton", >- menu: newmenu, >- container: "newmenuc" >- }); >- >- var editButton = new YAHOO.widget.Button("editAuth"); >- >- var delAuthButton = new YAHOO.widget.Button({ >- id: "delAuth", >- type: "button", >- label: _("Delete"), >- container: "delAuthc", >- onclick: {fn: confirm_deletion } >+//<![CDATA[ >+ $(document).ready(function() { >+ $("#delAuth").click(function(){ >+ confirm_deletion(); >+ return false; > }); >+ }); > >- var savemenu = [ >- { text: _("MADS (XML)"), url: "/cgi-bin/koha/authorities/export.pl?format=mads&op=export&authid=[% authid %]" }, >- { text: _("MARCXML"), url: "/cgi-bin/koha/authorities/export.pl?format=marcxml&op=export&authid=[% authid %]" }, >- { text: _("MARC (non-Unicode/MARC-8)"), url: "/cgi-bin/koha/authorities/export.pl?format=marc8&op=export&authid=[% authid %]" }, >- { text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/authorities/export.pl?format=utf8&op=export&authid=[% authid %]" }, >- ]; >- >- new YAHOO.widget.Button({ >- type: "menu", >- label: _("Save"), >- name: "savemenubutton", >- menu: savemenu, >- container: "savemenuc" >- }); >- } >+//]]> >+</script> >+<div id="toolbar" class="btn-toolbar"> > >- //]]> >- </script> >- <form name="f2" method="post" action="authorities.pl"> >- >-[% IF ( authid ) %] <a id="editAuth" href="authorities.pl?authid=[% authid %]">Edit</a> >- >+[% IF ( authid ) %] >+ <div class="btn-group"><a class="btn btn-small" id="editAuth" href="authorities.pl?authid=[% authid %]"><i class="icon-pencil"></i> Edit</a></div> > [% UNLESS ( count ) %] >- <span id="delAuthc"><a id="delAuth" href="javascript:confirm_deletion()">Delete</a></span> >+ <div class="btn-group"><a href="#" class="btn btn-small" id="delAuth"><i class="icon-remove"></i> Delete</a></div> > [% END %] >- <span id="savemenuc">Save</span> >-[% ELSE %] [% END %] >- >- <span id="newmenuc"> >- <label for="add_authtypecode">New: </label> >- <select id="add_authtypecode" name="authtypecode"> >-[% FOREACH authtypesloo IN authtypesloop %] >- [% IF ( authtypesloo.selected ) %] >- <option value="[% authtypesloo.value %]" selected="selected">[% authtypesloo.authtypetext %]</option> >- [% ELSE %] >- <option value="[% authtypesloo.value %]">[% authtypesloo.authtypetext %]</option> >- [% END %] >+ >+ <div class="btn-group"> >+ <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-download-alt"></i> Save >+ <span class="caret"></span> >+ </a> >+ <ul class="dropdown-menu"> >+ <li><a href="/cgi-bin/koha/authorities/export.pl?format=mads&op=export&authid=[% authid %]">MADS (XML)</a></li> >+ <li><a href="/cgi-bin/koha/authorities/export.pl?format=marcxml&op=export&authid=[% authid %]">MARCXML</a></li> >+ <li><a href="/cgi-bin/koha/authorities/export.pl?format=marc8&op=export&authid=[% authid %]">MARC (non-Unicode/MARC-8)</a></li> >+ <li><a href="/cgi-bin/koha/authorities/export.pl?format=utf8&op=export&authid=[% authid %]">MARC (Unicode/UTF-8)</a></li> >+ </ul> >+ </div> > [% END %] >- </select> >- <input type="submit" value="Add" class="button" /> >- </span></form> >+ >+ <div class="btn-group"> >+ <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-plus"></i> New authority >+ <span class="caret"></span> >+ </a> >+ <ul class="dropdown-menu"> >+ [% FOREACH authtypesloo IN authtypesloop %] >+ <li><a href="/cgi-bin/koha/authorities/authorities.pl?authtypecode=[% authtypesloo.value %]">[% authtypesloo.authtypetext %]</a></li> >+ [% END %] >+ </ul> >+ </div> > </div> >-- >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 9675
:
15573
|
15598
|
15599
|
15828