Bugzilla – Attachment 110449 Details for
Bug 26497
"Hide all columns" throws Javascript error on aqplan.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26497: "Hide all columns" throws Javascript error on aqplan.pl
Bug-26497-Hide-all-columns-throws-Javascript-error.patch (text/plain), 3.03 KB, created by
Owen Leonard
on 2020-09-21 11:08:12 UTC
(
hide
)
Description:
Bug 26497: "Hide all columns" throws Javascript error on aqplan.pl
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-09-21 11:08:12 UTC
Size:
3.03 KB
patch
obsolete
>From 19c19740c88df26af931ed99cc3b4bf7ec4d8b9e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 21 Sep 2020 10:59:56 +0000 >Subject: [PATCH] Bug 26497: "Hide all columns" throws Javascript error on > aqplan.pl > >This patch updates the JavaScript for checking and unchecking checkboxes >on the Acquisitions planning page so that it doesn't require the >checkboxes plugin. > >To test, apply the patch and go to Administration -> Budgets -> Budget >details -> Planning. > >On the planning page, test the "Show all columns" and "Hide all columns" >checkboxes. They should work correctly to show and hide the correct >columns. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt | 4 ++-- > koha-tmpl/intranet-tmpl/prog/js/acq.js | 8 ++++++-- > 2 files changed, 8 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >index 08a03e7dc0..00c56d3c5b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >@@ -139,8 +139,8 @@ > > <td class="actions"> > [% UNLESS ( budget_line.budget_lock ) %] >- <input type="button" class="auto_fill_row" data-budget-id="[% budget_line.budget_id | html %]" value="Auto-fill row"/> >- <input type="button" class="clear_fields" data-budget-id="[% budget_line.budget_id | html %]" value="Clear"> >+ <input type="button" class="auto_fill_row btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Auto-fill row"/> >+ <input type="button" class="clear_fields btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Clear"> > [% ELSE %] > <div style="color:red;">not owned</div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/acq.js b/koha-tmpl/intranet-tmpl/prog/js/acq.js >index e12be33513..7f6bdd7e43 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/acq.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/acq.js >@@ -364,14 +364,18 @@ function showColumn(num){ > } > > function showAllColumns(){ >- $("#selections").checkCheckboxes(); >+ $("#selections").find("input:checkbox").each(function () { >+ $(this).prop("checked", true); >+ }); > $("#selections span").addClass("selected"); > $("#plan td:nth-child(2),#plan tr th:nth-child(2)").nextAll().show(); > $("#hideall").prop("checked", false).parent().removeClass("selected"); > } > function hideAllColumns(){ > var allCols = $("#plan th").length; >- $("#selections").unCheckCheckboxes(); >+ $("#selections").find("input:checkbox").each(function () { >+ $(this).prop("checked", false); >+ }); > $("#selections span").removeClass("selected"); > $("#plan td:nth-child(2),#plan th:nth-child(2)").nextUntil("th:nth-child("+(allCols-1)+"),td:nth-child("+(allCols-1)+")").hide(); // hide all but the last two columns > $("#hideall").prop("checked", true).parent().addClass("selected"); >-- >2.11.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 26497
:
110449
|
110465
|
110487