Bugzilla – Attachment 160727 Details for
Bug 35753
Checkbox() function in additional-contents not necessary
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35753: Remove Checkbox() function
Bug-35753-Remove-Checkbox-function.patch (text/plain), 2.29 KB, created by
Lucas Gass (lukeg)
on 2024-01-09 22:01:16 UTC
(
hide
)
Description:
Bug 35753: Remove Checkbox() function
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-01-09 22:01:16 UTC
Size:
2.29 KB
patch
obsolete
>From 3cfecf0f7e66a14922102589e898de3365633833 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 9 Jan 2024 21:57:49 +0000 >Subject: [PATCH] Bug 35753: Remove Checkbox() function > >To test: >1. APPLY PATCH and clear browser cache. >2. Have multiple additional content items ( news/HTML customization/Pages ) >3. From one of the pages ( news/HTML customization/Pages ) click the 'Delete selected' button. Since no items are checked you should see the 'Please select content to delete' alert. >4. Check some items and click 'Delete selected' they should be correctly deleted. > >Note: There is no change in behavior from this patch. >--- > .../prog/en/modules/tools/additional-contents.tt | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >index 6d75eaccb2..987036d8d2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >@@ -567,17 +567,6 @@ > modalNumber = $(this).attr('data-number'); > $('.modal[data-number="'+modalNumber+'"]').modal('show'); > }) >- function Checkbox(){ >- var form = document.getElementById('del_form'); >- var inputs = form.getElementsByTagName('input'); >- var checked = false; >- for (var i=0; i<inputs.length; i++) { >- if (inputs[i].type == 'checkbox' && inputs[i].name == 'ids') { >- checked = inputs[i].checked; >- if (checked) return true; >- } >- } >- } > > function filterDataTable( table, column, term ){ > if( column ){ >@@ -630,7 +619,7 @@ > }); > > $("#del_form").on("submit",function(){ >- if ( Checkbox() ) { >+ if ( $('#del_form input[type="checkbox"][name="ids"]:checked').length ) { > return confirmDelete( _("Are you sure you want to delete the selected content?") ); > } else { > alert(_("Please select content to delete.")); >-- >2.30.2
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 35753
:
160727
|
160800
|
161164