Bugzilla – Attachment 97324 Details for
Bug 23493
jquery.dataTables.rowGrouping.js is no longer maintained, but there is an official DataTables version we could switch to
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23493: Replace rowGrouping with rowGroup
Bug-23493-Replace-rowGrouping-with-rowGroup.patch (text/plain), 5.13 KB, created by
Martin Renvoize (ashimema)
on 2020-01-13 16:22:24 UTC
(
hide
)
Description:
Bug 23493: Replace rowGrouping with rowGroup
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-01-13 16:22:24 UTC
Size:
5.13 KB
patch
obsolete
>From a8f3e066d7cbca22c19d07115e90d03e71fc3eef Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 23 Aug 2019 10:52:11 +0100 >Subject: [PATCH] Bug 23493: Replace rowGrouping with rowGroup > >This is an initial attempt to get some feedback. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/circ/circulation.tt | 3 +- > .../prog/en/modules/members/moremember.tt | 3 +- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 29 ++++++++----------- > 3 files changed, 16 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 71809af850..5b66136d4b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -10,6 +10,7 @@ > [% USE AuthorisedValues %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >+[% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %] > [% SET destination = "circ" %] > <title> > Koha › Circulation >@@ -1014,7 +1015,7 @@ > [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] > [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] > [% INCLUDE 'timepicker.inc' %] >- [% Asset.js("lib/jquery/plugins/jquery.dataTables.rowGrouping.js") | $raw %] >+ [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %] > [% Asset.js("js/pages/circulation.js") | $raw %] > [% Asset.js("js/checkouts.js") | $raw %] > [% Asset.js("js/holds.js") | $raw %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index bf6dac9b8d..704c7384a6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -8,6 +8,7 @@ > [% USE Price %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >+[% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %] > <title>Koha › Patrons › > [% UNLESS blocking_error %] > Patron details for [% INCLUDE 'patron-title.inc' no_html = 1 %] >@@ -845,13 +846,13 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >+ [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %] > [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'strings.inc' %] > [% INCLUDE 'calendar.inc' %] > [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] > [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] > [% INCLUDE 'timepicker.inc' %] >- [% Asset.js("lib/jquery/plugins/jquery.dataTables.rowGrouping.js") | $raw %] > [% Asset.js("js/pages/circulation.js") | $raw %] > [% Asset.js("js/checkouts.js") | $raw %] > [% Asset.js("js/holds.js") | $raw %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 0d73aed520..4cb3ddf89c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -596,19 +596,20 @@ $(document).ready(function() { > fnCallback(json) > } ); > }, >+ "rowGroup":{ >+ "dataSrc": "issued_today", >+ "startRender": function ( rows, group ) { >+ if ( group ) { >+ return $('<tr/>').append("<td colspan='100%'><strong>" + TODAYS_CHECKOUTS + "</strong></td>"); >+ } else { >+ return $('<tr/>').append("<td colspan='100%'><strong>" + PREVIOUS_CHECKOUTS + "</strong></td>"); >+ } >+ } >+ }, > "fnInitComplete": function(oSettings, json) { > // Disable rowGrouping plugin after first use > // so any sorting on the table doesn't use it >- var oSettings = issuesTable.fnSettings(); >- >- for (f = 0; f < oSettings.aoDrawCallback.length; f++) { >- if (oSettings.aoDrawCallback[f].sName == 'fnRowGrouping') { >- oSettings.aoDrawCallback.splice(f, 1); >- break; >- } >- } >- >- oSettings.aaSortingFixed = null; >+ //var oSettings = issuesTable.fnSettings(); > > // Build a summary of checkouts grouped by itemtype > var checkoutsByItype = json.aaData.reduce(function (obj, row) { >@@ -628,13 +629,7 @@ $(document).ready(function() { > .append(ul) > .insertBefore(oSettings.nTableWrapper) > }, >- }, columns_settings_issues_table).rowGrouping( >- { >- iGroupingColumnIndex: 1, >- iGroupingOrderByColumnIndex: 0, >- sGroupingColumnSortDirection: "asc" >- } >- ); >+ }, columns_settings_issues_table); > > if ( $("#issues-table").length ) { > $("#issues-table_processing").position({ >-- >2.20.1
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 23493
:
92443
|
92444
|
97324
|
97344
|
97694
|
97704
|
98041
|
98042
|
98055
|
98056
|
98118
|
98132