Bugzilla – Attachment 50788 Details for
Bug 16338
Remove the use of "onclick" from the lists template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 16338 - Remove the use of "onclick" from the lists template
PASSED-QA-Bug-16338---Remove-the-use-of-onclick-fr.patch (text/plain), 4.22 KB, created by
Katrin Fischer
on 2016-04-27 08:30:48 UTC
(
hide
)
Description:
[PASSED QA] Bug 16338 - Remove the use of "onclick" from the lists template
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-04-27 08:30:48 UTC
Size:
4.22 KB
patch
obsolete
>From 7e3162d789f38409c53694ca1818e6842180ff46 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Sun, 24 Apr 2016 21:07:19 -0400 >Subject: [PATCH] [PASSED QA] Bug 16338 - Remove the use of "onclick" from the > lists template > >This patch removes the use of "onclick" from the list delete button, >moving the event definition into the script. > >Also changed: Removed some unnecessary link markup; Added some >whitespace around the action buttons. > >To test, apply the patch and go to Lists. > >Click the "Delete" button next to any list. You should be prompted to >confirm the deletion. Verify that both confirming and canceling the >deletion works correctly. > >Signed-off-by: Aleisha <aleishaamohia@hotmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 3 +++ > .../prog/en/modules/virtualshelves/tables/shelves_results.tt | 8 ++++---- > 2 files changed, 7 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 7383f0d..47df3e3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -107,6 +107,9 @@ $(document).ready(function(){ > } > } > }); >+ $("body").on("click", ".deleteshelf", function(){ >+ return confirmDelete(MSG_CONFIRM_DELETE_LIST); >+ }); > }); > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt >index f19a54a..d8fa6f0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt >@@ -22,7 +22,7 @@ > "dt_modification_time": > "[% data.modification_time | $KohaDates %]", > "dt_action": >- "<a style=\"cursor:pointer\">[% PROCESS action_form shelfnumber=data.shelfnumber can_manage_shelf=data.can_manage_shelf can_delete_shelf=data.can_delete_shelf type=data.type %]</a>" >+ "[% PROCESS action_form shelfnumber=data.shelfnumber can_manage_shelf=data.can_manage_shelf can_delete_shelf=data.can_delete_shelf type=data.type %]" > }[% UNLESS loop.last %],[% END %] > [% END %] > ] >@@ -38,17 +38,17 @@ > [%~ action_block = action_block _ '<input type="hidden" name="category" value="' _ type _ '" />' ~%] > [%~ action_block = action_block _ '<input type="hidden" name="referer" value="list" />' ~%] > [%~ action_block = action_block _ '<button class="editshelf btn btn-mini"><i class="fa fa-pencil"></i> Edit</button>' ~%] >- [%~ action_block = action_block _ '</form>' ~%] >+ [%~ action_block = action_block _ '</form> ' ~%] > [%~ END ~%] > [%~ IF can_manage_shelf OR can_delete_shelf ~%] >- [%~ action_block = action_block _ '<form action="shelves.pl" method="post">' ~%] >+ [%~ action_block = action_block _ ' <form action="shelves.pl" method="post">' ~%] > [%~ action_block = action_block _ '<input type="hidden" name="shelfoff" value="' _ shelfoff _ '" />' ~%] > [%~ action_block = action_block _ '<input type="hidden" name="shelves" value="1" />' ~%] > [%~ action_block = action_block _ '<input type="hidden" name="op" value="delete" />' ~%] > [%~ action_block = action_block _ '<input type="hidden" name="shelfnumber" value="' _ shelfnumber _ '" />' ~%] > [%~ action_block = action_block _ '<input type="hidden" name="category" value="' _ type _ '" />' ~%] > [%~ action_block = action_block _ '<input type="hidden" name="referer" value="list" />' ~%] >- [%~ action_block = action_block _ '<button class="deleteshelf btn btn-mini" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)"><i class="fa fa-trash"></i> Delete</button>' ~%] >+ [%~ action_block = action_block _ '<button type="submit" class="deleteshelf btn btn-mini"><i class="fa fa-trash"></i> Delete</button>' ~%] > [%~ action_block = action_block _ '</form>' ~%] > [%~ END ~%] > [%~ ELSE ~%] >-- >1.9.1
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 16338
:
50641
|
50687
| 50788