Bugzilla – Attachment 25727 Details for
Bug 11821
Staff client catalog: delete menu items greyed out without explanation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11821 - Staff client catalog: delete menu items greyed out without explanation
Bug-11821---Staff-client-catalog-delete-menu-items.patch (text/plain), 5.81 KB, created by
Kyle M Hall (khall)
on 2014-02-28 16:34:15 UTC
(
hide
)
Description:
Bug 11821 - Staff client catalog: delete menu items greyed out without explanation
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-02-28 16:34:15 UTC
Size:
5.81 KB
patch
obsolete
>From 0e791468ad28dee37deaaa6db6ace591a8d6a776 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 21 Feb 2014 15:27:41 -0500 >Subject: [PATCH] Bug 11821 - Staff client catalog: delete menu items greyed out without explanation > >Biblio edit menu items which are disabled should trigger a tooltip >on hover and an alert on click with explanations. This patch implements >this for the relevent menu items. > >To test, apply the patch for Bug 11829 if necessary. Find a record which >has no items attached. Test the following views: > >- Normal >- MARC >- Labeled MARC >- ISBD >- Items > >Test these Edit menu items: > >- Edit items in a batch >- Delete items in a batch >- Delete all items > >Hovering over these menu items should trigger an explanatory tooltip. >Clicking the menu items should trigger a similar alert. > >Next, locate a title with items attached. On the same pages above, test >the Edit -> Delete record menu item. Hovering should trigger an >explanatory tooltip. Clicking it should trigger a similar alert. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 42 ++++++++++++++++--- > 1 files changed, 35 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >index e2271df..12a4ad0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -82,10 +82,13 @@ > return false; > } > } else { >- alert(_("This record has no items.")); >+ alertNoItems(); > return false; > } > } >+ function alertNoItems(){ >+ alert(_("This record has no items.")); >+ } > [% END %] > $(document).ready(function() { > $("#z3950copy").click(function(){ >@@ -115,6 +118,13 @@ > return false; > }); > $("#export").remove(); // Hide embedded export form if JS menus available >+ $("#deletebiblio").tooltip(); >+ $("#batchedit-disabled,#batchdelete-disabled,#deleteallitems-disabled") >+ .on("click",function(e){ >+ e.preventDefault(); >+ alertNoItems(); >+ }) >+ .tooltip(); > }); > //]]> > </script> >@@ -161,9 +171,21 @@ CAN_user_serials_create_subscription ) %] > <li><a id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]">Edit items</a></li> > [% END %] > >- [% IF ( CAN_user_tools_items_batchmod ) %]<li><a href="/cgi-bin/koha/tools/batchMod.pl?op=show&biblionumber=[% biblionumber %]&src=CATALOGUING">Edit items in batch</a></li>[% END %] >+ [% IF ( CAN_user_tools_items_batchmod ) %] >+ [% IF ( count ) %] >+ <li><a id="batchedit" href="/cgi-bin/koha/tools/batchMod.pl?op=show&biblionumber=[% biblionumber %]&src=CATALOGUING">Edit items in batch</a></li> >+ [% ELSE %] >+ <li class="disabled"><a id="batchedit-disabled" href="#" data-toggle="tooltip" data-placement="left" title="This record has no items">Edit items in batch</a></li> >+ [% END %] >+ [% END %] > >- [% IF ( CAN_user_tools_items_batchdel ) %]<li><a href="/cgi-bin/koha/tools/batchMod.pl?del=1&op=show&biblionumber=[% biblionumber %]&src=CATALOGUING">Delete items in a batch</a></li>[% END %] >+ [% IF ( CAN_user_tools_items_batchdel ) %] >+ [% IF ( count ) %] >+ <li><a id="batchdelete" href="/cgi-bin/koha/tools/batchMod.pl?del=1&op=show&biblionumber=[% biblionumber %]&src=CATALOGUING">Delete items in a batch</a></li> >+ [% ELSE %] >+ <li class="disabled"><a id="batchdelete-disabled" href="#" data-toggle="tooltip" data-placement="left" title="This record has no items">Delete items in a batch</a></li> >+ [% END %] >+ [% END %] > > [% IF ( CAN_user_editcatalogue_edit_items ) %]<li><a href="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]">Attach item</a></li>[% END %] > >@@ -174,13 +196,19 @@ CAN_user_serials_create_subscription ) %] > <li><a id="duplicatebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=[% current_framework %]&op=duplicate">Edit as new (duplicate)</a></li> > <li><a href="#" id="z3950copy">Replace record via Z39.50</a></li> > >- [% IF ( count ) %]<li class="disabled">[% ELSE %]<li>[% END %] >- <a id="deletebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&biblionumber=[% biblionumber %]">Delete record</a></li> >+ [% IF ( count ) %] >+ <li class="disabled"><a id="deletebiblio" data-toggle="tooltip" data-placement="left" title="[% count %] item(s) are attached to this record. You must delete all items before deleting this record." href="#">Delete record</a></li> >+ [% ELSE %] >+ <li><a id="deletebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&biblionumber=[% biblionumber %]">Delete record</a></li> >+ [% END %] > [% END %] > > [% IF ( CAN_user_editcatalogue_edit_items ) %] >- [% UNLESS ( count ) %]<li class="disabled">[% ELSE %]<li>[% END %]<li> >- <a href="#" id="deleteallitems">Delete all items</a></li> >+ [% IF ( count ) %] >+ <li><a href="#" id="deleteallitems">Delete all items</a></li> >+ [% ELSE %] >+ <li class="disabled"><a href="#" id="deleteallitems-disabled" data-toggle="tooltip" data-placement="left" title="This record has no items">Delete all items</a></li> >+ [% END %] > [% END %] > > </ul> >-- >1.7.2.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 11821
:
25592
|
25727
|
26164