Bugzilla – Attachment 6312 Details for
Bug 7225
"Delete all items" should be greyed out when a title has no items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Bug-7225-Delete-all-items-should-be-greyed-out-when-.patch (text/plain), 2.04 KB, created by
Owen Leonard
on 2011-11-15 17:08:00 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2011-11-15 17:08:00 UTC
Size:
2.04 KB
patch
obsolete
>From e3a61eadf0fbf4d9730aa6fc1af2cbadbb796f9b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 15 Nov 2011 12:01:19 -0500 >Subject: [PATCH] Bug 7225 - "Delete all items" should be greyed out when a title has no items >Content-Type: text/plain; charset="utf-8" > >This patch changes the catalog toolbar so that when there are no >items attached to a record the "Delete all items" menu item appears >to be disabled. Clicking it will trigger an alert, "This record >has no items." >--- > .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 5 ++++- > 1 files changed, 4 insertions(+), 1 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 6c7ffae..4b54c40 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -55,6 +55,9 @@ function confirm_items_deletion() { > }else{ > return false; > } >+ } else { >+ alert(_("This record has no items.")); >+ return false; > } > } > [% END %] >@@ -102,7 +105,7 @@ function confirm_items_deletion() { > [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit as New (Duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=&op=duplicate" },[% END %] > [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Replace Record via Z39.50"), onclick: {fn: PopupZ3950 } },[% END %] > [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Delete Record"), onclick: {fn: confirm_deletion }[% IF ( count ) %],id:'disabled'[% END %] },[% END %] >- [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Delete all Items"), onclick: {fn: confirm_items_deletion } }[% END %] >+ [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Delete all Items"), onclick: {fn: confirm_items_deletion }[% UNLESS ( count ) %],id:'disabled'[% END %] }[% END %] > ]; > if(editmenu.length){ > new YAHOO.widget.Button({ >-- >1.7.3 >
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 7225
:
6312
|
6510