Bugzilla – Attachment 191152 Details for
Bug 41576
Tidy kohaTable block - reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41576: reports - auto tidy
3190b52.patch (text/plain), 7.44 KB, created by
Jonathan Druart
on 2026-01-09 14:51:49 UTC
(
hide
)
Description:
Bug 41576: reports - auto tidy
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-01-09 14:51:49 UTC
Size:
7.44 KB
patch
obsolete
>From 3190b527bd140a63a56e556e1805c60d28e09d04 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 9 Jan 2026 13:15:45 +0100 >Subject: [PATCH] Bug 41576: reports - auto tidy > >--- > .../en/modules/reports/catalogue_stats.tt | 20 +++++++------- > .../prog/en/modules/reports/itemslost.tt | 27 +++++++++---------- > .../en/modules/reports/orders_by_budget.tt | 15 +++++------ > 3 files changed, 29 insertions(+), 33 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >index e0acd6236f7..f9e86abe14d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >@@ -410,26 +410,24 @@ > ]; > [% END %] > </script> >- > <script> > function changeRemovedDateTrStatus() { > var Cellvalue = $("input[name='Cellvalue']:checked").val(); >- if(Cellvalue == "deleteditems") { >+ if (Cellvalue == "deleteditems") { > $("#removeddatetr").show(); >- $("input[value='deleteditems.timestamp']").prop('disabled', false); >- $("#deldateFrom").prop('disabled', false); >- $("#deldateTo").prop('disabled', false); >+ $("input[value='deleteditems.timestamp']").prop("disabled", false); >+ $("#deldateFrom").prop("disabled", false); >+ $("#deldateTo").prop("disabled", false); > } else { > $("#removeddatetr").hide(); >- $("input[value='deleteditems.timestamp']").prop('disabled', true).prop('checked', false); >- $("#deldateFrom").prop('disabled', true).val(''); >- $("#deldateTo").prop('disabled', true).val(''); >+ $("input[value='deleteditems.timestamp']").prop("disabled", true).prop("checked", false); >+ $("#deldateFrom").prop("disabled", true).val(""); >+ $("#deldateTo").prop("disabled", true).val(""); > } > } > >- $(document).ready(function() { >- >- $("input[name='Cellvalue']").change(function() { >+ $(document).ready(function () { >+ $("input[name='Cellvalue']").change(function () { > changeRemovedDateTrStatus(); > }); > changeRemovedDateTrStatus(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >index 8fe3ff8e198..ee56c5a4992 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >@@ -201,9 +201,8 @@ > table_settings['columns'].unshift({cannot_be_modified: 1, cannot_be_toggled: 1, columnname: 'itemnumber', is_hidden: 0}); > [% END %] > </script> >- > <script> >- $(document).ready(function() { >+ $(document).ready(function () { > var lostitems_table = $("#lostitems-table").kohaTable( > { > order: [], >@@ -216,14 +215,14 @@ > > function itemSelectionBuildExportLink() { > var itemnumbers = new Array(); >- $("input[name='itemnumber'][type='checkbox']:checked").each(function() { >+ $("input[name='itemnumber'][type='checkbox']:checked").each(function () { > itemnumbers.push($(this).val()); > }); > if (itemnumbers.length > 0) { > var csv_profile_id = $("#csv_profile_id option:selected").val(); >- var url = '/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id='+csv_profile_id; >- url += '&itemnumber=' + itemnumbers.join('&itemnumber='); >- $('a.itemselection_action_export').attr('href', url); >+ var url = "/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id=" + csv_profile_id; >+ url += "&itemnumber=" + itemnumbers.join("&itemnumber="); >+ $("a.itemselection_action_export").attr("href", url); > } else { > return false; > } >@@ -233,32 +232,32 @@ > function itemSelectionBuildActionLinks() { > var export_link_ok = itemSelectionBuildExportLink(); > if (export_link_ok) { >- $('.itemselection_actions').show(); >+ $(".itemselection_actions").show(); > } else { >- $('.itemselection_actions').hide(); >+ $(".itemselection_actions").hide(); > } > } > > itemSelectionBuildActionLinks(); > >- $("input[name='itemnumber'][type='checkbox']").change(function() { >+ $("input[name='itemnumber'][type='checkbox']").change(function () { > itemSelectionBuildActionLinks(); > }); >- $("#csv_profile_id").change(function() { >+ $("#csv_profile_id").change(function () { > itemSelectionBuildActionLinks(); > }); > >- $(".SelectAll").on("click",function(e){ >+ $(".SelectAll").on("click", function (e) { > e.preventDefault(); >- $("#lostitems-table input:checkbox").each(function(){ >+ $("#lostitems-table input:checkbox").each(function () { > $(this).prop("checked", true); > }); > itemSelectionBuildActionLinks(); > }); > >- $(".ClearAll").on("click",function(e){ >+ $(".ClearAll").on("click", function (e) { > e.preventDefault(); >- $("#lostitems-table input:checkbox").each(function(){ >+ $("#lostitems-table input:checkbox").each(function () { > $(this).prop("checked", false); > }); > itemSelectionBuildActionLinks(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt >index 0694e33b53f..8cb82916222 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt >@@ -171,9 +171,8 @@ > <script> > var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'orders_by_fund', 'funds-table', 'json' ) | $raw %]; > </script> >- > <script> >- $(document).ready( function () { >+ $(document).ready(function () { > var funds_table = $("#funds").kohaTable( > { > autoWidth: false, >@@ -181,17 +180,17 @@ > table_settings > ); > >- showallbudgets = $('#budgetfilter').html(); >- $('#budgetfilter .b_inactive').remove(); >+ showallbudgets = $("#budgetfilter").html(); >+ $("#budgetfilter .b_inactive").remove(); > >- $('#showbudgets').click(function(){ >+ $("#showbudgets").click(function () { > if ($(this).is(":checked")) { >- $('#budgetfilter').html(showallbudgets); >+ $("#budgetfilter").html(showallbudgets); > } else { >- $('#budgetfilter .b_inactive').remove(); >+ $("#budgetfilter .b_inactive").remove(); > } > }); >- } ); >+ }); > </script> > [% END %] > >-- >2.43.0 >
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 41576
:
191149
|
191150
|
191151
| 191152