Bugzilla – Attachment 33068 Details for
Bug 8836
Resurrect Rotating Collections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8836 [Alt QA Followup] - Add confirmation dialog for deleting collections
Bug-8836-Alt-QA-Followup---Add-confirmation-dialog.patch (text/plain), 3.62 KB, created by
Owen Leonard
on 2014-10-31 13:25:14 UTC
(
hide
)
Description:
Bug 8836 [Alt QA Followup] - Add confirmation dialog for deleting collections
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-10-31 13:25:14 UTC
Size:
3.62 KB
patch
obsolete
>From 3a8a58e8c7778d904b4e527c39e6eede94a8c05c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 31 Oct 2014 09:04:43 -0400 >Subject: [PATCH] Bug 8836 [Alt QA Followup] - Add confirmation dialog for > deleting collections >Content-Type: text/plain; charset="utf-8" > >The previous patch for adding a confirmation dialog didn't work to make >the confirmation message translatable. This alternate patch uses a >progressive-enhancement method recycled from Guided Reports to trigger a >warning and highlight the row which was clicked. > >To test, apply the patch and try to delete an existing rotating >collection. You should get a confirmation dialog, and the corresponding >row in the table should be highlighted red. > >Clicking cancel should cancel the deletion. Clicking OK should complete >the deletion. > >To test the translatability of the confirmation message: > >Run perl translate update [a language code, e.g. 'en-GB'] >Search [lang]-i-staff-t-prog-v-3006000.po for the message string >--- > .../intranet-tmpl/prog/en/css/staff-global.css | 3 ++- > .../rotating_collections/rotatingCollections.tt | 15 ++++++++++++++- > 2 files changed, 16 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >index defc5f7..58cd38b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >@@ -280,7 +280,8 @@ tr.even td, tr.even.highlight td { > font-weight : bold; > } > >-tr.warn td { >+tr.warn td, >+tr.warn:nth-child(odd) td { > background-color: #FF9090; > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt >index 7124575..a807b6b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt >@@ -2,6 +2,19 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Rotating collections</title> > [% INCLUDE 'doc-head-close.inc' %] >+<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> > </head> > <body id="rcoll_rotatingCollections" class="tools rcoll"> > [% INCLUDE 'header.inc' %] >@@ -38,7 +51,7 @@ > <td><a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% collectionsLoo.colId %]">Add or remove items</a></td> > <td><a href="/cgi-bin/koha/rotating_collections/transferCollection.pl?colId=[% collectionsLoo.colId %]">Transfer</a></td> > <td><a href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=edit&colId=[% collectionsLoo.colId %]">Edit</a></td> >- <td><a href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&colId=[% collectionsLoo.colId %]">Delete</a></td> >+ <td><a class="confirmdelete" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&colId=[% collectionsLoo.colId %]">Delete</a></td> > </tr> > [% END %] > </table> >-- >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 8836
:
12560
|
16746
|
19118
|
19119
|
19337
|
19339
|
21008
|
21009
|
21010
|
21011
|
23966
|
23967
|
23968
|
23969
|
23970
|
23971
|
23976
|
28140
|
28141
|
30838
|
30921
|
31087
|
32361
|
32362
|
32588
|
32589
|
32690
|
32691
|
32693
|
32773
|
32774
|
32973
|
32974
|
32975
|
32976
|
32994
|
32999
|
33000
|
33001
|
33002
|
33045
|
33046
|
33047
|
33048
|
33050
|
33051
|
33058
|
33059
|
33060
|
33061
|
33062
|
33063
|
33064
|
33065
|
33066
|
33068
|
33070
|
33095
|
33096
|
33097
|
33098
|
33099
|
33100
|
33101
|
33102
|
33103
|
33330
|
33331
|
33374