Lines 228-233
Link Here
|
228 |
<!-- this will probably always have the least amount of data --> |
228 |
<!-- this will probably always have the least amount of data --> |
229 |
[% IF ( EXCEPTION_HOLIDAYS_LOOP ) %] |
229 |
[% IF ( EXCEPTION_HOLIDAYS_LOOP ) %] |
230 |
<h3>Exceptions</h3> |
230 |
<h3>Exceptions</h3> |
|
|
231 |
<label class="controls"> |
232 |
<input type="checkbox" name="show_past" id="show_past_holidayexceptions" class="show_past" /> |
233 |
Show past entries |
234 |
</label> |
231 |
<table id="holidayexceptions"> |
235 |
<table id="holidayexceptions"> |
232 |
<thead><tr> |
236 |
<thead><tr> |
233 |
<th class="exception title-string">Date</th> |
237 |
<th class="exception title-string">Date</th> |
Lines 298-303
Link Here
|
298 |
|
302 |
|
299 |
[% IF ( HOLIDAYS_LOOP ) %] |
303 |
[% IF ( HOLIDAYS_LOOP ) %] |
300 |
<h3>Unique holidays</h3> |
304 |
<h3>Unique holidays</h3> |
|
|
305 |
<label class="controls"> |
306 |
<input type="checkbox" name="show_past" id="show_past_holidaysunique" class="show_past" /> |
307 |
Show past entries |
308 |
</label> |
301 |
<table id="holidaysunique"> |
309 |
<table id="holidaysunique"> |
302 |
<thead> |
310 |
<thead> |
303 |
<tr> |
311 |
<tr> |
Lines 485-492
Link Here
|
485 |
show_expired checkbox is checked */ |
493 |
show_expired checkbox is checked */ |
486 |
$.fn.dataTable.ext.search.push( |
494 |
$.fn.dataTable.ext.search.push( |
487 |
function( settings, searchData, index, rowData, counter ) { |
495 |
function( settings, searchData, index, rowData, counter ) { |
|
|
496 |
var table = settings.nTable.id; |
488 |
var row = $(settings.aoData[index].nTr); |
497 |
var row = $(settings.aoData[index].nTr); |
489 |
if( row.hasClass("date_past") && !$("#show_expired").prop("checked") ){ |
498 |
if( row.hasClass("date_past") && !$("#show_past_" + table ).prop("checked") ){ |
490 |
return false; |
499 |
return false; |
491 |
} else { |
500 |
} else { |
492 |
return true; |
501 |
return true; |
Lines 512-518
Link Here
|
512 |
"sDom": 't', |
521 |
"sDom": 't', |
513 |
"bPaginate": false |
522 |
"bPaginate": false |
514 |
})); |
523 |
})); |
515 |
$("#holidayexceptions,#holidaysyearlyrepeatable,#holidaysunique").dataTable($.extend(true, {}, dataTablesDefaults, { |
524 |
var tables = $("#holidayexceptions,#holidaysyearlyrepeatable,#holidaysunique").DataTable($.extend(true, {}, dataTablesDefaults, { |
516 |
"sDom": 't', |
525 |
"sDom": 't', |
517 |
"aoColumnDefs": [ |
526 |
"aoColumnDefs": [ |
518 |
{ "type": "title-string", "targets" : [ "title-string" ] }, |
527 |
{ "type": "title-string", "targets" : [ "title-string" ] }, |
Lines 525-530
Link Here
|
525 |
} |
534 |
} |
526 |
} |
535 |
} |
527 |
})); |
536 |
})); |
|
|
537 |
|
538 |
$(".show_past").on("change", function(){ |
539 |
tables.draw(); |
540 |
}); |
541 |
|
528 |
$("a.helptext").click(function(){ |
542 |
$("a.helptext").click(function(){ |
529 |
$(this).parent().find(".hint").toggle(); return false; |
543 |
$(this).parent().find(".hint").toggle(); return false; |
530 |
}); |
544 |
}); |
531 |
- |
|
|