Bugzilla – Attachment 138995 Details for
Bug 29723
Add a "Configure table" button for KohaTable tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29723: (QA follow-up) Correct scroll to table
Bug-29723-QA-follow-up-Correct-scroll-to-table.patch (text/plain), 4.58 KB, created by
ByWater Sandboxes
on 2022-08-10 14:11:23 UTC
(
hide
)
Description:
Bug 29723: (QA follow-up) Correct scroll to table
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2022-08-10 14:11:23 UTC
Size:
4.58 KB
patch
obsolete
>From 7b6ca8b58ed8412223a559e164aa74c37335ce75 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 10 Aug 2022 12:14:35 +0100 >Subject: [PATCH] Bug 29723: (QA follow-up) Correct scroll to table > >This patch enabled scrolling directly to the correct table configuration when clicking the 'Configure this table' >button from any KohaTable/kohaTable table in Koha. > >Test plan >1. Navigate to Administration > Cities >2. Click 'Configure this table' >3. Confirm the result is the table settings page and you are scrolled to > the cities table configuration > >Signed-off-by: Andrew <andrewfh@dubcolib.org> >--- > admin/columns_settings.pl | 2 ++ > .../prog/en/includes/columns_settings.inc | 2 +- > .../prog/en/modules/admin/columns_settings.tt | 11 +++++++++++ > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 2 +- > 4 files changed, 15 insertions(+), 2 deletions(-) > >diff --git a/admin/columns_settings.pl b/admin/columns_settings.pl >index 994070caf9..55ebb66e2e 100755 >--- a/admin/columns_settings.pl >+++ b/admin/columns_settings.pl >@@ -75,6 +75,8 @@ if ( $action eq 'list' ) { > my $modules = C4::Utils::DataTables::TablesSettings::get_modules; > $template->param( > panel => defined $input->param('module') ? $input->param('module') : undef, >+ page => defined $input->param('page') ? $input->param('page') : undef, >+ table => defined $input->param('table') ? $input->param('table') : undef, > modules => $modules, > ); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >index 1c3af9e495..a2541d27c8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >@@ -168,7 +168,7 @@ function KohaTable(id_selector, dt_parameters, table_settings, add_filters) { > titleAttr: __("Configure this table"), > text: '<i class="fa fa-lg fa-wrench"></i> <span class="dt-button-text">' + _("Configure this table") + '</span>', > action: function() { >- window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '#' + table_settings['page'] + '#' + table_settings['table']; >+ window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '&page=' + table_settings['page'] + '&table=' + table_settings['table']; > }, > } > ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt >index 3c3e3a6e0c..865af8739f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt >@@ -441,6 +441,17 @@ > <script> > $(document).ready( function() { > $("#[% panel | uri %]Toggle").click(); >+ [%- IF page.defined -%] >+ $("#[% panel | uri %]").on('shown.bs.collapse', function () { >+ $('html, body').animate({ >+ [%- IF table.defined -%] >+ scrollTop: ($("#[% page | uri %]\\#[% table | uri %]").offset().top) >+ [%- ELSE -%] >+ scrollTop: ($("#[% page | uri %]").offset().top) >+ [%- END -%] >+ }, 500); >+ }); >+ [%- END -%] > }); > </script> > [%- END -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 13f4821e93..941ecbf351 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -820,7 +820,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { > titleAttr: __("Configure this table"), > text: '<i class="fa fa-lg fa-wrench"></i> <span class="dt-button-text">' + __("Configure this table") + '</span>', > action: function() { >- window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '#' + table_settings['page'] + '#' + table_settings['table']; >+ window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '&page=' + table_settings['page'] + '&table=' + table_settings['table']; > }, > } > ); >-- >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 29723
:
128648
|
131874
|
133029
|
138951
|
138952
|
138972
|
138973
|
138974
|
138975
|
138985
|
138986
|
138987
|
138988
|
138989
|
138992
|
138993
|
138994
|
138995
|
138996
|
138997
|
138998
|
138999
|
139000
|
139002
|
139003
|
139004
|
139005
|
139006
|
139194