Initial
This commit is contained in:
35
public/js/activities.js
Normal file
35
public/js/activities.js
Normal file
@@ -0,0 +1,35 @@
|
||||
var datatable;
|
||||
var colomnspez = columns;
|
||||
colomnspez.splice(3, 0, { title: "Quelle",orderable:false, data: "source",className:"dt-source" });
|
||||
|
||||
$(document).ready(function(){
|
||||
datatable = $('#bookings').DataTable({
|
||||
paging: false,
|
||||
searching:true,
|
||||
scrollX:false,
|
||||
info:false,
|
||||
order: [[ 1, 'desc' ]],
|
||||
"processing": true,
|
||||
ajax: {
|
||||
type : 'POST',
|
||||
url : '/Ajax/getTabelData',
|
||||
data : function(d){
|
||||
d.datum_start = $('#datepickers').val();
|
||||
d.datum_ende = $('#datepickere').val();
|
||||
d.source = $('#source').val();
|
||||
},
|
||||
dataSrc:''},
|
||||
dom: '<"toolbar">frt',
|
||||
"createdRow": function ( row, data, index ) {
|
||||
if(data.validate == "1"){
|
||||
$(row).addClass('bg-warning');
|
||||
}
|
||||
},
|
||||
columns: colomnspez,
|
||||
});
|
||||
|
||||
$("div.toolbar").html('<a class="btn-sm btn-secondary mr-2" href="/Home/newBill" role="button">Neue Rechnung</a><a class="btn-sm btn-secondary" href="/Home/newTransfer" role="button">Neuer Transfer</a>');
|
||||
$('#bookings tbody').on('click', 'td.dt-receiver', function () {collapseDetails($(this), datatable);} );
|
||||
$('#bookings tbody').on('click', 'td.dt-datum', function () {location.href = '/Home/editBill/'+getId($(this),datatable);});
|
||||
$('#bookings tbody').on('click', 'table.tabdet', function () {location.href = '/Home/editBill/'+$(this).attr('data-bs-id');});
|
||||
});
|
||||
Reference in New Issue
Block a user