Bugzilla – Attachment 15380 Details for
Bug 9627
Replace YUI buttons and menus on serials pages with Bootstrap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9627 - Replace YUI buttons and menus on serials pages with Bootstrap
Bug-9627---Replace-YUI-buttons-and-menus-on-serial.patch (text/plain), 8.49 KB, created by
Owen Leonard
on 2013-02-15 16:57:20 UTC
(
hide
)
Description:
Bug 9627 - Replace YUI buttons and menus on serials pages with Bootstrap
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-02-15 16:57:20 UTC
Size:
8.49 KB
patch
obsolete
>From 1cebb1c1d94f9f5af81e2f4c7f091717bbce58cf Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 31 Jan 2013 09:39:38 -0500 >Subject: [PATCH] Bug 9627 - Replace YUI buttons and menus on serials pages > with Bootstrap >Content-Type: text/plain; charset="utf-8" > >This patch converts the toolbar include file used by Serials pages to >Bootstrap, replacing YUI button and menu code with Bootstrap markup. > >To test, view any page in serials/ which uses serials-toolbar.inc >(subscription-detail.pl, serials-home.pl, etc). >Buttons and menus should look correct and work correctly, including: > >- New subscription >- Edit subscription >- Edit as new (duplicate) >- Delete subscription >- Renew >- Receive >- Close >--- > .../prog/en/includes/serials-toolbar.inc | 108 ++++++++------------ > 1 file changed, 40 insertions(+), 68 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc >index 0e7497d..efc32dd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc >@@ -1,4 +1,4 @@ >-<div id="toolbar"><script type="text/javascript"> >+<script type="text/javascript"> > //<![CDATA[ > > function confirm_close() { >@@ -13,68 +13,34 @@ > window.location="subscription-detail.pl?subscriptionid=[% subscriptionid %]&op=reopen"; > } > } >- // prepare DOM for YUI Toolbar > > $(document).ready(function() { >- $("#editmenuc").empty(); >- $("#duplicate").parent().remove(); >- $("#delete").parent().remove(); >- $("#renewc").empty(); >- yuiToolbar(); >+ $("#deletesub").click(function(){ >+ confirm_deletion(); >+ return false; >+ }); >+ $("#reopen").click(function(){ >+ confirm_reopen(); >+ return false; >+ }); >+ $("#close").click(function(){ >+ confirm_close(); >+ return false; >+ }); >+ $("#renew").click(function(){ >+ popup([% subscriptionid %]); >+ return false; >+ }) > }); >- >- // YUI Toolbar Functions >- >- function yuiToolbar() { >- >- [% IF ( subscriptionid ) %] >- var editmenu = [ >- [% IF ( CAN_user_serials_edit_subscription ) %] >- { text: _("Edit subscription"), [% IF ( cannotedit ) %]disabled: true, [% END %] url: "/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=[% subscriptionid %]" }, >- [% END %] >- [% IF ( CAN_user_serials_create_subscription ) %] >- { text: _("Edit as new (duplicate)"), [% IF ( cannotedit ) %]disabled: true, [% END %] url: "/cgi-bin/koha/serials/subscription-add.pl?op=dup&subscriptionid=[% subscriptionid %]" }, >- [% END %] >- [% IF ( CAN_user_serials_delete_subscription ) %] >- { text: _("Delete subscription"), [% IF ( cannotedit ) %]disabled: true, [% END %] onclick: {fn: confirm_deletion }} >- [% END %] >- ]; >- [% END %] >- new YAHOO.widget.Button("newsubscription"); >- [% IF ( subscriptionid ) %] >- new YAHOO.widget.Button({ >- id: "renew", >- type: "link", >- href: "#", >- label: _("Renew"), >- container: "renewc", >-onclick: {fn:function(){popup([% subscriptionid %])}} >- }); >- [% IF ( subscriptionid ) %] >- new YAHOO.widget.Button({ >- type: "menu", >- label: _("Edit"), >- name: "editmenubutton", >- menu: editmenu, >- container: "editmenuc" >- >- }); >- [% END %] >- new YAHOO.widget.Button("renew"); >- new YAHOO.widget.Button("receive"); >- new YAHOO.widget.Button("close"); >- new YAHOO.widget.Button("reopen"); >- [% END %] >- } >- > //]]> > </script> >-<ul class="toolbar"> >+<div id="toolbar" class="btn-toolbar"> >+ > [% IF ( CAN_user_serials_create_subscription ) %] > [% IF ( biblionumber_for_new_subscription ) %] >- <li><a id="newsubscription" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=[% biblionumber_for_new_subscription %]">New subscription</a></li> >+ <div class="btn-group"><a id="newsubscription" class="btn btn-small" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=[% biblionumber_for_new_subscription %]"><i class="icon-plus"></i> New subscription</a></div> > [% ELSE %] >- <li><a id="newsubscription" href="/cgi-bin/koha/serials/subscription-add.pl">New subscription</a></li> >+ <div class="btn-group"><a id="newsubscription" class="btn btn-small" href="/cgi-bin/koha/serials/subscription-add.pl"><i class="icon-plus"></i> New subscription</a></div> > [% END %] > [% END %] > >@@ -83,37 +49,43 @@ onclick: {fn:function(){popup([% subscriptionid %])}} > > [% IF ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_delete_subscription ) %] > [% UNLESS ( cannotedit ) %] >- <li id="editmenuc"><a id="edit" href="/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=[% subscriptionid %]">Edit</a></li> >+ <div class="btn-group"> >+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-pencil"></i> Edit <span class="caret"></span></button> >+ <ul class="dropdown-menu"> >+ [% IF ( cannotedit ) %] <li class="disabled"> [% ELSE %] >+ <li> [% END %] >+ <a href="/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=[% subscriptionid %]">Edit subscription</a></li> >+ [% IF ( cannotedit ) %] <li class="disabled"> [% ELSE %] >+ <li> [% END %] >+ <a href="/cgi-bin/koha/serials/subscription-add.pl?op=dup&subscriptionid=[% subscriptionid %]">Edit as new (duplicate)</a></li> >+ [% IF ( CAN_user_serials_delete_subscription ) %] >+ [% IF ( cannotedit ) %] <li class="disabled"> [% ELSE %] >+ <li> [% END %] >+ <a href="#" id="deletesub">Delete subscription</a></li>[% END %] >+ </ul> >+ </div> > [% END %] > [% END %] > >- [% IF ( CAN_user_serials_create_subscription ) %] >- <li><a id="duplicate" href="/cgi-bin/koha/serials/subscription-add.pl?op=dup&subscriptionid=[% subscriptionid %]">Duplicate </a></li> >- [% END %] >- > [% UNLESS ( cannotedit ) %] > [% UNLESS closed %] > [% IF ( CAN_user_serials_renew_subscription ) %] >- <li id="renewc"><a id="renew" href="#" onclick="popup([% subscriptionid %])">Renew </a></li> >+ <div class="btn-group"><a id="renew" class="btn btn-small" href="#" onclick="popup([% subscriptionid %])"><i class="icon-refresh"></i> Renew</a></div> > [% END %] > [% END %] > [% IF ( CAN_user_serials_receive_serials ) %] > [% UNLESS closed %] >- <li><a id="receive" href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscriptionid %]&serstatus=1,3">Receive</a></li> >+ <div class="btn-group"><a id="receive" class="btn btn-small" href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscriptionid %]&serstatus=1,3"><i class="icon-inbox"></i> Receive</a></div> > [% END %] > [% END %] > [% IF CAN_user_serials_edit_subscription %] > [% IF closed %] >- <li><a id="reopen" href="javascript:confirm_reopen();">Reopen</a></li> >+ <div class="btn-group"><a id="reopen" class="btn btn-small" href="#">Reopen</a></div> > [% ELSE %] >- <li><a id="close" href="javascript:confirm_close();">Close</a></li> >+ <div class="btn-group"><a id="close" class="btn btn-small" href="#"><i class="icon-remove-circle"></i> Close</a></div> > [% END %] > [% END %] >- [% IF ( CAN_user_serials_delete_subscription ) %] >- <li><a id="delete" href="javascript:confirm_deletion()">Delete</a></li> >- [% END %] > [% END %] > [% END %] > [% END %] >-</ul> > </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 9627
:
15380
|
15389
|
15448