Go to file
Jonathan Druart 369ca5b0fd
Bug 38436: Fix column visibility when bKohaColumnsUseNames is used
When the columns displayed in the table can vary (depending on sysprefs)
we use bKohaColumnsUseNames. This allows us to use the name of the
columns instead of there order number.

The code was totally wrong, and didn't retrieve the correct number.

A good example to confirm that is to add:
 console.log("%s is at %s".format(this.columnname, used_id));
at the end of the `if ( use_names ) {` block of _dt_visibility.

If at least one column is hidden by default and cannot be toggled (and
so won't appear in the list of the columns of the "Column visibility" button),
there will be a shift.

This line was definitelly wrong:
 var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( selector + ' th' );
We cannot rely on the order of the visible columns, we need to retrieve
the list of the columns using DT's api.

Now the columns are retrieved using their class names, and from DT's
api.
The code is way nicer and more inline with how we are supposed to play
with DT.
Look at those 2 lines to pass the list of columns to the colvis button:
  let included_columns = table_settings.columns.filter(c => !c.cannot_be_toggled);
  columns: included_columns.map(c => '.' + c.columnname).join(',')

Test plan:
Play intensively with the items table (detail.pl), but also with the
other tables not using bKohaColumnsUseNames (eg. patrons search)
You need to set column as hidden by default and/or cannot be toggled.
You need to play with the "Columns" button.
Note that you need to remove the localStorage keys starting with 'DataTables_'
to retrieve the visibility settings from what is defined in the admin area.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:54 +01:00
C4 Bug 38344: Fix typo - space before exclamation mark in "Thank you !" 2024-11-19 16:35:16 +01:00
Koha Bug 35659: (QA follow-up) Fix DateTime and cronlogaction messages 2024-11-19 16:59:55 +01:00
acqui Bug 37265: Consideration of UniqueItemFields setting when receiving items in an order 2024-10-02 10:50:41 +01:00
admin Bug 38436: Adjust column names for the holdings tables 2024-11-20 14:01:53 +01:00
api Bug 36454: (QA follow-up) Use native is_expired instead of redundant JS calculation 2024-11-18 17:04:25 +01:00
authorities Bug 36603: (QA follow-up) Resolve two conditional declarations 2024-11-08 16:42:53 +01:00
basket Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
bin
…
bookings Bug 35574: Bookings tab from biblio details should only require manage_bookings permission 2023-12-18 15:21:04 +01:00
catalogue Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
cataloguing Bug 38030: stocknumberAV.pl fails with CSRF protection 2024-10-22 12:06:50 +02:00
circ Bug 28294: (follow-up) Adjust call to request transfer 2024-11-20 14:01:51 +01:00
clubs Bug 34478: Manual fix - add op clubs/templates-add-modify 2024-03-01 10:57:55 +01:00
course_reserves Bug 28762: Use Koha::Course in course-details controller 2024-07-23 16:04:05 +01:00
debian Bug 34088: (follow-up) fix env vars in koha-upgrade-schema 2024-11-13 17:00:49 +01:00
docs Update contributor list with some new contributors 2024-09-13 16:06:22 +02:00
erm Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
errors Bug 37741: Do not send cookie back from error pages 2024-08-30 12:45:45 +02:00
etc Bug 36991: Add ability to scan call numbers index/search field 2024-11-08 16:42:51 +01:00
ill Bug 35570: Prevent use of ILL module if deprecated FreeForm backend is installed 2024-10-31 08:05:21 +01:00
installer Bug 38436: Rename columns_settings.columnname in DB 2024-11-20 14:01:54 +01:00
koha-tmpl Bug 38436: Fix column visibility when bKohaColumnsUseNames is used 2024-11-20 14:01:54 +01:00
labels Bug 30745: (QA follow-up) tidy 2024-11-18 17:44:31 +01:00
lib Bug 35681: Use ::Bootstrap version of FromANSI 2024-05-02 16:47:39 +02:00
members Bug 28633: Add preferred name field to patrons 2024-11-11 14:12:09 +01:00
misc Bug 35659: (QA follow-up) Fix DateTime and cronlogaction messages 2024-11-19 16:59:55 +01:00
offline_circ Bug 34478: Changes for offline_circ 2024-03-01 10:58:34 +01:00
opac Bug 14670: Fix tests and import 2024-11-14 10:46:37 +01:00
patron_lists Bug 34478: Changes for patron_lists/add-modify 2024-03-01 10:57:41 +01:00
patroncards Bug 37614: Printing patron cards from patron lists should be a GET 2024-08-16 17:33:45 +02:00
plugins Bug 30897: Add option to disable automated restart 2024-04-11 16:53:42 +02:00
pos Bug 33478: Apply formatting to RECEIPT 2024-04-26 20:15:44 +02:00
preservation Bug 38089: (follow-up) More fixes for errors in original submission 2024-10-11 11:13:47 +02:00
recalls Bug 38089: (follow-up) More fixes for errors in original submission 2024-10-11 11:13:47 +02:00
reports Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-14 10:46:31 +01:00
reserve Bug 37868: Remove C4::Reserves::ToggleSuspend 2024-10-21 15:10:35 +02:00
reviews Bug 2486: Show user comments in staff interface 2024-08-26 17:39:42 +02:00
rotating_collections Bug 34478: Manual fix - add op - rotating_collections/addItems 2024-03-01 10:57:33 +01:00
serials Bug 29818: Cannot save subscription frequency without display order 2024-11-18 17:44:35 +01:00
services
…
skel
…
suggestion Bug 33484: Fix for suggestions 2024-10-28 17:10:26 +01:00
svc Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
t Bug 38299: Update tests 2024-11-18 17:44:38 +01:00
tags Bug 34478: Add 'op' to tags/review 2024-03-01 10:58:25 +01:00
tools Bug 37326: decode barcode file in inventory tool 2024-11-18 17:44:35 +01:00
virtualshelves Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
xt Bug 37728: Adjust test to catch more missing 'op' in POSTed forms 2024-10-18 14:25:56 +02:00
.editorconfig
…
.eslintrc.json Bug 36400: Centralize {js,ts,vue} formatting config in .prettierrc.js 2024-04-22 08:57:39 +02:00
.gitignore Bug 35402: Update the OPAC and staff interface to Bootstrap 5 2024-08-23 15:58:41 +02:00
.htaccess
…
.mailmap Bug 36943: (follow-up) 24.05.00 - Update .mailmap 2024-05-24 15:36:40 +02:00
.perlcriticrc
…
.perltidyrc Bug 30002: Adjust perltidy 2023-06-08 08:32:42 -03:00
.prettierrc.js Bug 36400: (follow-up) remove option editorconfig from .prettierrc.js 2024-04-22 08:57:40 +02:00
.proverc.dist
…
.stylelintrc.json
…
INSTALL
…
Koha.pm Bug 33641: DBRev 24.06.00.063 2024-11-14 14:19:41 +01:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 37824: remove references to non-existent files in Makefile.PL 2024-09-27 15:58:35 +02:00
README
…
README.md
…
README.robots
…
about.pl Bug 35570: Prevent use of ILL module if deprecated FreeForm backend is installed 2024-10-31 08:05:21 +01:00
app.psgi Bug 36149: Add userenv middleware to app.psgi 2024-05-14 15:04:37 -03:00
build-resources.PL Bug 32609: Use the current yarn.lock to generate node_modules 2023-02-10 11:07:57 -03:00
changelanguage.pl
…
cpanfile Bug 37478: (follow-up) Add MARC::Lint to cpanfile 2024-11-08 11:23:46 +01:00
cypress.config.ts Bug 36012: Extend cypress's requestTimeout value 2024-03-22 15:07:36 +01:00
fix-perl-path.PL
…
gulpfile.js Bug 36640: (follow-up) CSS fixes for DataTables controls 2024-11-14 14:19:34 +01:00
help.pl
…
kohaversion.pl
…
mainpage.pl Bug 36064: (QA follow-up) Simplify and tidy 2024-10-25 11:09:51 +02:00
package.json Bug 38424: Upgrade redoclyly/cli version to latest stable 2024-11-20 11:36:26 +01:00
rewrite-config.PL
…
rspack.config.js Bug 37824: (QA follow-up) Fix improper handling of jQuery and DataTables libraries by marking them as externals 2024-09-16 18:41:17 +02:00
tsconfig.json Bug 32030: Move cypress to t - fix build_js/watch_js 2022-11-08 09:44:52 -03:00
webpack.config.js Bug 35919: Add record sources admin page 2024-04-26 17:06:04 +02:00
yarn.lock 38424: Update yarn.lock 2024-11-20 11:36:27 +01:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo