Bugzilla – Attachment 49382 Details for
Bug 15866
No warning when deleting a rotating collection using the toolbar button
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15866: Add confirm message for deleting rotating collection from toolbar
Bug-15866-Add-confirm-message-for-deleting-rotatin.patch (text/plain), 2.61 KB, created by
Marc Véron
on 2016-03-21 10:02:10 UTC
(
hide
)
Description:
Bug 15866: Add confirm message for deleting rotating collection from toolbar
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-03-21 10:02:10 UTC
Size:
2.61 KB
patch
obsolete
>From 290ce1f0757f959449604f3521d13a3608c7a805 Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Sun, 20 Mar 2016 23:24:18 +0000 >Subject: [PATCH] Bug 15866: Add confirm message for deleting rotating > collection from toolbar >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: >1) Go to Tools -> Rotating Collections >2) Click on any rotating collection ('Add or remove items' from drop down menu) >3) Click 'Delete' from toolbar. Validate you are now asked to confirm your deletion. Check that cancel works, then check that confirm works. > >Sponsored-by: Catalyst IT > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > .../en/includes/rotating-collections-toolbar.inc | 18 ++++++++++++++++-- > 1 file changed, 16 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/rotating-collections-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/rotating-collections-toolbar.inc >index 8abdbe9..69e7b18 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/rotating-collections-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/rotating-collections-toolbar.inc >@@ -1,3 +1,17 @@ >+<script type="text/javascript"> >+ $(document).ready(function(){ >+ $(".confirmdelete").click(function(){ >+ $(this).parents('tr').addClass("warn"); >+ if(confirm(_("Are you sure you want to delete this collection?"))){ >+ return true; >+ } else { >+ $(this).parents('tr').removeClass("warn"); >+ return false; >+ } >+ }); >+}); >+</script> >+ > <div id="toolbar" class="btn-toolbar"> > <div class="btn-group"> > <a class="btn btn-small" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=new"><i class="fa fa-plus"></i> New collection</a> >@@ -11,7 +25,7 @@ > <a class="btn btn-small" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=edit&colId=[% colId %]"><i class="fa fa-pencil"></i> Edit</a> > </div> > <div class="btn-group"> >- <a class="btn btn-small" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&colId=[% colId %]"><i class="fa fa-remove"></i> Delete</a> >+ <a class="btn btn-small confirmdelete" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&colId=[% colId %]"><i class="fa fa-remove"></i> Delete</a> > </div> > [% END %] >- </div> >\ No newline at end of file >+ </div> >-- >1.7.10.4
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 15866
:
49362
|
49382
|
49424