Lines 1-3
Link Here
|
|
|
1 |
/* global __ */ |
1 |
// These default options are for translation but can be used |
2 |
// These default options are for translation but can be used |
2 |
// for any other datatables settings |
3 |
// for any other datatables settings |
3 |
// To use it, write: |
4 |
// To use it, write: |
Lines 32-55
var dataTablesDefaults = {
Link Here
|
32 |
} |
33 |
} |
33 |
}, |
34 |
}, |
34 |
"dom": 't', |
35 |
"dom": 't', |
|
|
36 |
"buttons": [ |
37 |
'clearFilter', 'copy', 'csv', 'print' |
38 |
], |
35 |
"paginate": false, |
39 |
"paginate": false, |
36 |
"buttons": [{ |
|
|
37 |
fade: 100, |
38 |
className: "dt_button_clear_filter", |
39 |
titleAttr: window.MSG_CLEAR_FILTER, |
40 |
enabled: false, |
41 |
text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + window.MSG_CLEAR_FILTER + '</span>', |
42 |
available: function ( dt ) { |
43 |
// The "clear filter" button is made available if this test returns true |
44 |
if( dt.settings()[0].aanFeatures.f ){ // aanFeatures.f is null if there is no search form |
45 |
return true; |
46 |
} |
47 |
}, |
48 |
action: function ( e, dt, node ) { |
49 |
dt.search( "" ).draw("page"); |
50 |
node.addClass("disabled"); |
51 |
} |
52 |
}], |
53 |
initComplete: function( settings) { |
40 |
initComplete: function( settings) { |
54 |
var tableId = settings.nTable.id |
41 |
var tableId = settings.nTable.id |
55 |
// When the DataTables search function is triggered, |
42 |
// When the DataTables search function is triggered, |
Lines 65-289
var dataTablesDefaults = {
Link Here
|
65 |
} |
52 |
} |
66 |
}; |
53 |
}; |
67 |
|
54 |
|
68 |
|
55 |
$.fn.dataTable.ext.buttons.clearFilter = { |
69 |
// Return an array of string containing the values of a particular column |
56 |
fade: 100, |
70 |
$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) { |
57 |
className: "dt_button_clear_filter", |
71 |
// check that we have a column id |
58 |
titleAttr: window.MSG_CLEAR_FILTER, |
72 |
if ( typeof iColumn == "undefined" ) return new Array(); |
59 |
enabled: false, |
73 |
// by default we only wany unique data |
60 |
text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + window.MSG_CLEAR_FILTER + '</span>', |
74 |
if ( typeof bUnique == "undefined" ) bUnique = true; |
61 |
available: function ( dt ) { |
75 |
// by default we do want to only look at filtered data |
62 |
// The "clear filter" button is made available if this test returns true |
76 |
if ( typeof bFiltered == "undefined" ) bFiltered = true; |
63 |
if( dt.settings()[0].aanFeatures.f ){ // aanFeatures.f is null if there is no search form |
77 |
// by default we do not wany to include empty values |
64 |
return true; |
78 |
if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true; |
|
|
79 |
// list of rows which we're going to loop through |
80 |
var aiRows; |
81 |
// use only filtered rows |
82 |
if (bFiltered == true) aiRows = oSettings.aiDisplay; |
83 |
// use all rows |
84 |
else aiRows = oSettings.aiDisplayMaster; // all row numbers |
85 |
|
86 |
// set up data array |
87 |
var asResultData = new Array(); |
88 |
for (var i=0,c=aiRows.length; i<c; i++) { |
89 |
iRow = aiRows[i]; |
90 |
var aData = this.fnGetData(iRow); |
91 |
var sValue = aData[iColumn]; |
92 |
// ignore empty values? |
93 |
if (bIgnoreEmpty == true && sValue.length == 0) continue; |
94 |
// ignore unique values? |
95 |
else if (bUnique == true && jQuery.inArray(sValue, asResultData) > -1) continue; |
96 |
// else push the value onto the result data array |
97 |
else asResultData.push(sValue); |
98 |
} |
99 |
return asResultData; |
100 |
} |
101 |
|
102 |
// List of unbind keys (Ctrl, Alt, Direction keys, etc.) |
103 |
// These keys must not launch filtering |
104 |
var blacklist_keys = new Array(0, 16, 17, 18, 37, 38, 39, 40); |
105 |
|
106 |
// Set a filtering delay for global search field |
107 |
jQuery.fn.dataTableExt.oApi.fnSetFilteringDelay = function ( oSettings, iDelay ) { |
108 |
/* |
109 |
* Inputs: object:oSettings - dataTables settings object - automatically given |
110 |
* integer:iDelay - delay in milliseconds |
111 |
* Usage: $('#example').dataTable().fnSetFilteringDelay(250); |
112 |
* Author: Zygimantas Berziunas (www.zygimantas.com) and Allan Jardine |
113 |
* License: GPL v2 or BSD 3 point style |
114 |
* Contact: zygimantas.berziunas /AT\ hotmail.com |
115 |
*/ |
116 |
var |
117 |
_that = this, |
118 |
iDelay = (typeof iDelay == 'undefined') ? 250 : iDelay; |
119 |
|
120 |
this.each( function ( i ) { |
121 |
$.fn.dataTableExt.iApiIndex = i; |
122 |
var |
123 |
$this = this, |
124 |
oTimerId = null, |
125 |
sPreviousSearch = null, |
126 |
anControl = $( 'input', _that.fnSettings().aanFeatures.f ); |
127 |
|
128 |
anControl.unbind( 'keyup.DT' ).bind( 'keyup.DT', function(event) { |
129 |
var $$this = $this; |
130 |
if (blacklist_keys.indexOf(event.keyCode) != -1) { |
131 |
return this; |
132 |
}else if ( event.keyCode == '13' ) { |
133 |
$.fn.dataTableExt.iApiIndex = i; |
134 |
_that.fnFilter( $(this).val() ); |
135 |
} else { |
136 |
if (sPreviousSearch === null || sPreviousSearch != anControl.val()) { |
137 |
window.clearTimeout(oTimerId); |
138 |
sPreviousSearch = anControl.val(); |
139 |
oTimerId = window.setTimeout(function() { |
140 |
$.fn.dataTableExt.iApiIndex = i; |
141 |
_that.fnFilter( anControl.val() ); |
142 |
}, iDelay); |
143 |
} |
144 |
} |
145 |
}); |
146 |
|
147 |
return this; |
148 |
} ); |
149 |
return this; |
150 |
} |
151 |
|
152 |
// Add a filtering delay on general search and on all input (with a class 'filter') |
153 |
jQuery.fn.dataTableExt.oApi.fnAddFilters = function ( oSettings, sClass, iDelay ) { |
154 |
var table = this; |
155 |
this.fnSetFilteringDelay(iDelay); |
156 |
var filterTimerId = null; |
157 |
$(table).find("input."+sClass).keyup(function(event) { |
158 |
if (blacklist_keys.indexOf(event.keyCode) != -1) { |
159 |
return this; |
160 |
}else if ( event.keyCode == '13' ) { |
161 |
table.fnFilter( $(this).val(), $(this).attr('data-column_num') ); |
162 |
} else { |
163 |
window.clearTimeout(filterTimerId); |
164 |
var input = this; |
165 |
filterTimerId = window.setTimeout(function() { |
166 |
table.fnFilter($(input).val(), $(input).attr('data-column_num')); |
167 |
}, iDelay); |
168 |
} |
169 |
}); |
170 |
$(table).find("select."+sClass).on('change', function() { |
171 |
table.fnFilter($(this).val(), $(this).attr('data-column_num')); |
172 |
}); |
173 |
} |
174 |
|
175 |
// Sorting on html contains |
176 |
// <a href="foo.pl">bar</a> sort on 'bar' |
177 |
function dt_overwrite_html_sorting_localeCompare() { |
178 |
jQuery.fn.dataTableExt.oSort['html-asc'] = function(a,b) { |
179 |
a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); |
180 |
b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); |
181 |
if (typeof(a.localeCompare == "function")) { |
182 |
return a.localeCompare(b); |
183 |
} else { |
184 |
return (a > b) ? 1 : ((a < b) ? -1 : 0); |
185 |
} |
65 |
} |
186 |
}; |
|
|
187 |
|
188 |
jQuery.fn.dataTableExt.oSort['html-desc'] = function(a,b) { |
189 |
a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); |
190 |
b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); |
191 |
if(typeof(b.localeCompare == "function")) { |
192 |
return b.localeCompare(a); |
193 |
} else { |
194 |
return (b > a) ? 1 : ((b < a) ? -1 : 0); |
195 |
} |
196 |
}; |
197 |
|
198 |
jQuery.fn.dataTableExt.oSort['num-html-asc'] = function(a,b) { |
199 |
var x = a.replace( /<.*?>/g, "" ); |
200 |
var y = b.replace( /<.*?>/g, "" ); |
201 |
x = parseFloat( x ); |
202 |
y = parseFloat( y ); |
203 |
return ((x < y) ? -1 : ((x > y) ? 1 : 0)); |
204 |
}; |
205 |
|
206 |
jQuery.fn.dataTableExt.oSort['num-html-desc'] = function(a,b) { |
207 |
var x = a.replace( /<.*?>/g, "" ); |
208 |
var y = b.replace( /<.*?>/g, "" ); |
209 |
x = parseFloat( x ); |
210 |
y = parseFloat( y ); |
211 |
return ((x < y) ? 1 : ((x > y) ? -1 : 0)); |
212 |
}; |
213 |
} |
214 |
|
215 |
$.fn.dataTableExt.oSort['num-html-asc'] = function(a,b) { |
216 |
var x = a.replace( /<.*?>/g, "" ); |
217 |
var y = b.replace( /<.*?>/g, "" ); |
218 |
x = parseFloat( x ); |
219 |
y = parseFloat( y ); |
220 |
return ((x < y) ? -1 : ((x > y) ? 1 : 0)); |
221 |
}; |
222 |
|
223 |
$.fn.dataTableExt.oSort['num-html-desc'] = function(a,b) { |
224 |
var x = a.replace( /<.*?>/g, "" ); |
225 |
var y = b.replace( /<.*?>/g, "" ); |
226 |
x = parseFloat( x ); |
227 |
y = parseFloat( y ); |
228 |
return ((x < y) ? 1 : ((x > y) ? -1 : 0)); |
229 |
}; |
230 |
|
231 |
(function() { |
232 |
|
233 |
/* |
234 |
* Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license |
235 |
* Author: Jim Palmer (based on chunking idea from Dave Koelle) |
236 |
* Contributors: Mike Grier (mgrier.com), Clint Priest, Kyle Adams, guillermo |
237 |
* See: http://js-naturalsort.googlecode.com/svn/trunk/naturalSort.js |
238 |
*/ |
239 |
function naturalSort (a, b) { |
240 |
var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi, |
241 |
sre = /(^[ ]*|[ ]*$)/g, |
242 |
dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/, |
243 |
hre = /^0x[0-9a-f]+$/i, |
244 |
ore = /^0/, |
245 |
// convert all to strings and trim() |
246 |
x = a.toString().replace(sre, '') || '', |
247 |
y = b.toString().replace(sre, '') || '', |
248 |
// chunk/tokenize |
249 |
xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), |
250 |
yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), |
251 |
// numeric, hex or date detection |
252 |
xD = parseInt(x.match(hre), 10) || (xN.length != 1 && x.match(dre) && Date.parse(x)), |
253 |
yD = parseInt(y.match(hre), 10) || xD && y.match(dre) && Date.parse(y) || null; |
254 |
// first try and sort Hex codes or Dates |
255 |
if (yD) |
256 |
if ( xD < yD ) return -1; |
257 |
else if ( xD > yD ) return 1; |
258 |
// natural sorting through split numeric strings and default strings |
259 |
for(var cLoc=0, numS=Math.max(xN.length, yN.length); cLoc < numS; cLoc++) { |
260 |
// find floats not starting with '0', string or 0 if not defined (Clint Priest) |
261 |
var oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0; |
262 |
var oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0; |
263 |
// handle numeric vs string comparison - number < string - (Kyle Adams) |
264 |
if (isNaN(oFxNcL) !== isNaN(oFyNcL)) return (isNaN(oFxNcL)) ? 1 : -1; |
265 |
// rely on string comparison if different types - i.e. '02' < 2 != '02' < '2' |
266 |
else if (typeof oFxNcL !== typeof oFyNcL) { |
267 |
oFxNcL += ''; |
268 |
oFyNcL += ''; |
269 |
} |
270 |
if (oFxNcL < oFyNcL) return -1; |
271 |
if (oFxNcL > oFyNcL) return 1; |
272 |
} |
273 |
return 0; |
274 |
} |
275 |
|
276 |
jQuery.extend( jQuery.fn.dataTableExt.oSort, { |
277 |
"natural-asc": function ( a, b ) { |
278 |
return naturalSort(a,b); |
279 |
}, |
66 |
}, |
280 |
|
67 |
action: function ( e, dt, node ) { |
281 |
"natural-desc": function ( a, b ) { |
68 |
dt.search( "" ).draw("page"); |
282 |
return naturalSort(a,b) * -1; |
69 |
node.addClass("disabled"); |
283 |
} |
70 |
} |
284 |
} ); |
71 |
}; |
285 |
|
|
|
286 |
}()); |
287 |
|
72 |
|
288 |
/* Plugin to allow sorting on data stored in a span's title attribute |
73 |
/* Plugin to allow sorting on data stored in a span's title attribute |
289 |
* |
74 |
* |
Lines 359-365
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
Link Here
|
359 |
if (config_exclude_articles_from_sort){ |
144 |
if (config_exclude_articles_from_sort){ |
360 |
var articles = config_exclude_articles_from_sort.split(" "); |
145 |
var articles = config_exclude_articles_from_sort.split(" "); |
361 |
var rpattern = ""; |
146 |
var rpattern = ""; |
362 |
for(i=0;i<articles.length;i++){ |
147 |
for( var i=0; i<articles.length; i++){ |
363 |
rpattern += "^" + articles[i] + " "; |
148 |
rpattern += "^" + articles[i] + " "; |
364 |
if(i < articles.length - 1){ rpattern += "|"; } |
149 |
if(i < articles.length - 1){ rpattern += "|"; } |
365 |
} |
150 |
} |
Lines 385-512
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
Link Here
|
385 |
|
170 |
|
386 |
}()); |
171 |
}()); |
387 |
|
172 |
|
388 |
// Remove string between NSB NSB characters |
|
|
389 |
$.fn.dataTableExt.oSort['nsb-nse-asc'] = function(a,b) { |
390 |
var pattern = new RegExp("\x88.*\x89"); |
391 |
a = a.replace(pattern, ""); |
392 |
b = b.replace(pattern, ""); |
393 |
return (a > b) ? 1 : ((a < b) ? -1 : 0); |
394 |
} |
395 |
$.fn.dataTableExt.oSort['nsb-nse-desc'] = function(a,b) { |
396 |
var pattern = new RegExp("\x88.*\x89"); |
397 |
a = a.replace(pattern, ""); |
398 |
b = b.replace(pattern, ""); |
399 |
return (b > a) ? 1 : ((b < a) ? -1 : 0); |
400 |
} |
401 |
|
402 |
/* Define two custom functions (asc and desc) for basket callnumber sorting */ |
403 |
jQuery.fn.dataTableExt.oSort['callnumbers-asc'] = function(x,y) { |
404 |
var x_array = x.split("<div>"); |
405 |
var y_array = y.split("<div>"); |
406 |
|
407 |
/* Pop the first elements, they are empty strings */ |
408 |
x_array.shift(); |
409 |
y_array.shift(); |
410 |
|
411 |
x_array = jQuery.map( x_array, function( a ) { |
412 |
return parse_callnumber( a ); |
413 |
}); |
414 |
y_array = jQuery.map( y_array, function( a ) { |
415 |
return parse_callnumber( a ); |
416 |
}); |
417 |
|
418 |
x_array.sort(); |
419 |
y_array.sort(); |
420 |
|
421 |
x = x_array.shift(); |
422 |
y = y_array.shift(); |
423 |
|
424 |
if ( !x ) { x = ""; } |
425 |
if ( !y ) { y = ""; } |
426 |
|
427 |
return ((x < y) ? -1 : ((x > y) ? 1 : 0)); |
428 |
}; |
429 |
|
430 |
jQuery.fn.dataTableExt.oSort['callnumbers-desc'] = function(x,y) { |
431 |
var x_array = x.split("<div>"); |
432 |
var y_array = y.split("<div>"); |
433 |
|
434 |
/* Pop the first elements, they are empty strings */ |
435 |
x_array.shift(); |
436 |
y_array.shift(); |
437 |
|
438 |
x_array = jQuery.map( x_array, function( a ) { |
439 |
return parse_callnumber( a ); |
440 |
}); |
441 |
y_array = jQuery.map( y_array, function( a ) { |
442 |
return parse_callnumber( a ); |
443 |
}); |
444 |
|
445 |
x_array.sort(); |
446 |
y_array.sort(); |
447 |
|
448 |
x = x_array.pop(); |
449 |
y = y_array.pop(); |
450 |
|
451 |
if ( !x ) { x = ""; } |
452 |
if ( !y ) { y = ""; } |
453 |
|
454 |
return ((x < y) ? 1 : ((x > y) ? -1 : 0)); |
455 |
}; |
456 |
|
457 |
function parse_callnumber ( html ) { |
458 |
var array = html.split('<span class="callnumber">'); |
459 |
if ( array[1] ) { |
460 |
array = array[1].split('</span>'); |
461 |
return array[0]; |
462 |
} else { |
463 |
return ""; |
464 |
} |
465 |
} |
466 |
|
467 |
// see http://www.datatables.net/examples/advanced_init/footer_callback.html |
468 |
function footer_column_sum( api, column_numbers ) { |
469 |
// Remove the formatting to get integer data for summation |
470 |
var intVal = function ( i ) { |
471 |
if ( typeof i === 'number' ) { |
472 |
if ( isNaN(i) ) return 0; |
473 |
return i; |
474 |
} else if ( typeof i === 'string' ) { |
475 |
var value = i.replace(/[a-zA-Z ,.]/g, '')*1; |
476 |
if ( isNaN(value) ) return 0; |
477 |
return value; |
478 |
} |
479 |
return 0; |
480 |
}; |
481 |
|
482 |
|
483 |
for ( var indice = 0 ; indice < column_numbers.length ; indice++ ) { |
484 |
var column_number = column_numbers[indice]; |
485 |
|
486 |
var total = 0; |
487 |
var cells = api.column( column_number, { page: 'current' } ).nodes().to$().find("span.total_amount"); |
488 |
$(cells).each(function(){ |
489 |
total += intVal( $(this).html() ); |
490 |
}); |
491 |
total /= 100; // Hard-coded decimal precision |
492 |
|
493 |
// Update footer |
494 |
$( api.column( column_number ).footer() ).html(total.format_price()); |
495 |
}; |
496 |
} |
497 |
|
498 |
function filterDataTable( table, column, term ){ |
499 |
if( column ){ |
500 |
table.column( column ).search( term ).draw("page"); |
501 |
} else { |
502 |
table.search( term ).draw("page"); |
503 |
} |
504 |
} |
505 |
|
506 |
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { |
507 |
console.warn(message); |
508 |
}; |
509 |
|
510 |
(function($) { |
173 |
(function($) { |
511 |
|
174 |
|
512 |
$.fn.api = function(options, columns_settings, add_filters) { |
175 |
$.fn.api = function(options, columns_settings, add_filters) { |
Lines 632-643
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
Link Here
|
632 |
|
295 |
|
633 |
return newnode.text().replace( /\n/g, ' ' ).trim(); |
296 |
return newnode.text().replace( /\n/g, ' ' ).trim(); |
634 |
} |
297 |
} |
635 |
} |
298 |
}; |
636 |
|
299 |
|
637 |
var export_buttons = [ |
300 |
var export_buttons = [ |
638 |
{ |
301 |
{ |
639 |
extend: 'excelHtml5', |
302 |
extend: 'excelHtml5', |
640 |
text: _("Excel"), |
303 |
text: __("Excel"), |
641 |
exportOptions: { |
304 |
exportOptions: { |
642 |
columns: exportColumns, |
305 |
columns: exportColumns, |
643 |
format: export_format |
306 |
format: export_format |
Lines 645-651
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
Link Here
|
645 |
}, |
308 |
}, |
646 |
{ |
309 |
{ |
647 |
extend: 'csvHtml5', |
310 |
extend: 'csvHtml5', |
648 |
text: _("CSV"), |
311 |
text: __("CSV"), |
649 |
exportOptions: { |
312 |
exportOptions: { |
650 |
columns: exportColumns, |
313 |
columns: exportColumns, |
651 |
format: export_format |
314 |
format: export_format |
Lines 653-659
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
Link Here
|
653 |
}, |
316 |
}, |
654 |
{ |
317 |
{ |
655 |
extend: 'copyHtml5', |
318 |
extend: 'copyHtml5', |
656 |
text: _("Copy"), |
319 |
text: __("Copy"), |
657 |
exportOptions: { |
320 |
exportOptions: { |
658 |
columns: exportColumns, |
321 |
columns: exportColumns, |
659 |
format: export_format |
322 |
format: export_format |
Lines 661-667
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
Link Here
|
661 |
}, |
324 |
}, |
662 |
{ |
325 |
{ |
663 |
extend: 'print', |
326 |
extend: 'print', |
664 |
text: _("Print"), |
327 |
text: __("Print"), |
665 |
exportOptions: { |
328 |
exportOptions: { |
666 |
columns: exportColumns, |
329 |
columns: exportColumns, |
667 |
format: export_format |
330 |
format: export_format |
Lines 673-682
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
Link Here
|
673 |
{ |
336 |
{ |
674 |
fade: 100, |
337 |
fade: 100, |
675 |
className: "dt_button_clear_filter", |
338 |
className: "dt_button_clear_filter", |
676 |
titleAttr: _("Clear filter"), |
339 |
titleAttr: __("Clear filter"), |
677 |
enabled: false, |
340 |
enabled: false, |
678 |
text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + _("Clear filter") + '</span>', |
341 |
text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + __("Clear filter") + '</span>', |
679 |
action: function ( e, dt, node, config ) { |
342 |
action: function ( e, dt, node ) { |
680 |
dt.search( "" ).draw("page"); |
343 |
dt.search( "" ).draw("page"); |
681 |
node.addClass("disabled"); |
344 |
node.addClass("disabled"); |
682 |
} |
345 |
} |
Lines 690-697
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
Link Here
|
690 |
fade: 100, |
353 |
fade: 100, |
691 |
columns: included_ids, |
354 |
columns: included_ids, |
692 |
className: "columns_controls", |
355 |
className: "columns_controls", |
693 |
titleAttr: _("Columns settings"), |
356 |
titleAttr: __("Columns settings"), |
694 |
text: '<i class="fa fa-lg fa-gear"></i> <span class="dt-button-text">' + _("Columns") + '</span>', |
357 |
text: '<i class="fa fa-lg fa-gear"></i> <span class="dt-button-text">' + __("Columns") + '</span>', |
695 |
exportOptions: { |
358 |
exportOptions: { |
696 |
columns: exportColumns |
359 |
columns: exportColumns |
697 |
} |
360 |
} |
Lines 705-724
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
Link Here
|
705 |
autoClose: true, |
368 |
autoClose: true, |
706 |
fade: 100, |
369 |
fade: 100, |
707 |
className: "export_controls", |
370 |
className: "export_controls", |
708 |
titleAttr: _("Export or print"), |
371 |
titleAttr: __("Export or print"), |
709 |
text: '<i class="fa fa-lg fa-download"></i> <span class="dt-button-text">' + _("Export") + '</span>', |
372 |
text: '<i class="fa fa-lg fa-download"></i> <span class="dt-button-text">' + __("Export") + '</span>', |
710 |
buttons: export_buttons |
373 |
buttons: export_buttons |
711 |
} |
374 |
} |
712 |
); |
375 |
); |
713 |
|
376 |
|
714 |
if ( add_filters ) { |
|
|
715 |
// Duplicate the table header row for columnFilter |
716 |
thead_row = this.find('thead tr'); |
717 |
clone = thead_row.clone().addClass('filters_row'); |
718 |
clone.find("th.NoSort").html(''); |
719 |
thead_row.before(clone); |
720 |
} |
721 |
|
722 |
$(".dt_button_clear_filter, .columns_controls, .export_controls").tooltip(); |
377 |
$(".dt_button_clear_filter, .columns_controls, .export_controls").tooltip(); |
723 |
|
378 |
|
724 |
return $(this).dataTable(settings); |
379 |
return $(this).dataTable(settings); |
725 |
- |
|
|