Bugzilla – Attachment 45640 Details for
Bug 15285
Upgrade DataTables to 1.10.10 or later
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15285: Update common files
Bug-15285-Update-common-files.patch (text/plain), 3.86 KB, created by
Jonathan Druart
on 2015-12-14 12:22:08 UTC
(
hide
)
Description:
Bug 15285: Update common files
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-12-14 12:22:08 UTC
Size:
3.86 KB
patch
obsolete
>From 5c1d981f97c62b2a400797fd1f31b70160bb369f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 14 Dec 2015 12:17:43 +0000 >Subject: [PATCH] Bug 15285: Update common files > >--- > .../prog/en/includes/columns_settings.inc | 18 ++++++++++++------ > .../intranet-tmpl/prog/en/includes/datatables.inc | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 2 +- > 3 files changed, 15 insertions(+), 7 deletions(-) > >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 ec86690..7d80435 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >@@ -1,13 +1,14 @@ > [% USE ColumnsSettings %] > >-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.colvis.css" /> >-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.colvis.js"></script> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/buttons.dataTables.min.css" /> >+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/dataTables.buttons.min.js"></script> >+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/buttons.colVis.min.js"></script> > > <script type="text/javascript"> > function KohaTable(selector, dt_parameters, columns_settings) { > var id = 0; > var hidden_ids = []; >- var excluded_ids = []; >+ var included_ids = []; > $(columns_settings).each( function() { > var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( 'th' ); > var used_id = dt_parameters.bKohaColumnsUseNames ? named_id : id; >@@ -16,12 +17,17 @@ function KohaTable(selector, dt_parameters, columns_settings) { > if ( this['is_hidden'] == "1" ) { > hidden_ids.push( used_id ); > } >- if ( this['cannot_be_toggled'] == "1" ) { >- excluded_ids.push( used_id ); >+ if ( this['cannot_be_toggled'] == "0" ) { >+ included_ids.push( used_id ); > } > id++; > }); >- dt_parameters[ "oColVis" ] = { "aiExclude": excluded_ids }; >+ dt_parameters[ "buttons" ] = [ >+ { >+ extend: 'colvis', >+ columns: included_ids, >+ } >+ ]; > var table = $(selector).dataTable($.extend(true, {}, dataTablesDefaults, dt_parameters)); > > $(hidden_ids).each(function(index, value) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >index 4381b01..590fae5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >@@ -1,5 +1,7 @@ > [% INCLUDE 'format_price.inc' %] > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/dataTables.buttons.min.js"></script> >+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/buttons.colVis.min.js"></script> > <script type="text/javascript"> > //<![CDATA[ > var MSG_DT_FIRST = _("First"); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >index e42918c..86ac14e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >@@ -23,7 +23,7 @@ var dataTablesDefaults = { > "sSearch" : window.MSG_DT_SEARCH || "Search:", > "sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found" > }, >- "sDom": 'C<"top pager"ilpf>tr<"bottom pager"ip>', >+ "dom": 'C<"top pager"ilpf>tr<"bottom pager"ip>', > "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, window.MSG_DT_ALL || "All"]], > "iDisplayLength": 20 > }; >-- >2.1.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 15285
:
45639
|
45640
|
45641
|
46484
|
46485
|
46683
|
46686
|
47261
|
47263
|
47264
|
47266
|
47688
|
47689
|
47690
|
47691