update new Datatable
This commit is contained in:
@@ -9,10 +9,20 @@ $(document).ready(function(){
|
||||
info:false,
|
||||
order: [[ 1, 'desc' ]],
|
||||
ajax: { url: '/Ajax/getOverviewData', dataSrc:''},
|
||||
dom: '<"toolbar">frt',
|
||||
layout: {
|
||||
topStart: {
|
||||
buttons: [
|
||||
{text:'Neue Rechnung',className:'btn-sm',action: function ( e, dt, node, config ) {
|
||||
location.href = '/newBill/';
|
||||
}},
|
||||
]
|
||||
},
|
||||
topEnd: 'search'
|
||||
},
|
||||
// dom: '<"toolbar">frt',
|
||||
columns: columns,
|
||||
});
|
||||
$("div.toolbar").html('<a class="btn-sm btn-secondary" href="/newBill" role="button">Neuer Eintrag</a>');
|
||||
// $("div.toolbar").html('<a class="btn-sm btn-secondary" href="/newBill" role="button">Neuer Eintrag</a>');
|
||||
// Add event listener for opening and closing details
|
||||
$('#bookings tbody').on('click', 'td.dt-receiver', function () {collapseDetails($(this), datatable);} );
|
||||
$('#bookings tbody').on('click', 'td.dt-datum', function () {location.href = '/editBill/'+getId($(this),datatable);});
|
||||
@@ -25,10 +35,20 @@ $(document).ready(function(){
|
||||
info:true,
|
||||
order: [[ 1, 'desc' ]],
|
||||
ajax: { url: '/Ajax/getToDosData', dataSrc:''},
|
||||
dom: '<"top"i<"syncbutton">>frt<"bottom"lp><"clear">',
|
||||
layout: {
|
||||
topStart: {
|
||||
buttons: [
|
||||
{text:'Sync',className:'btn-sm',action: function ( e, dt, node, config ) {
|
||||
location.href = '/syncScheduled/';
|
||||
}},
|
||||
]
|
||||
},
|
||||
topEnd: 'search'
|
||||
},
|
||||
// dom: '<"top"i<"syncbutton">>frt<"bottom"lp><"clear">',
|
||||
columns: columns,
|
||||
});
|
||||
$("div.syncbutton").html('<a class="btn-sm btn-secondary" href="/syncScheduled" role="button">Sync</a>');
|
||||
// $("div.syncbutton").html('<a class="btn-sm btn-secondary" href="/syncScheduled" role="button">Sync</a>');
|
||||
// Add event listener for opening and closing details
|
||||
$('#todos tbody').on('click', 'td.dt-receiver', function () {collapseDetails($(this), todos);} );
|
||||
$('#todos tbody').on('click', 'td.dt-datum', function () {location.href = '/editBill/'+getId($(this),todos);});
|
||||
|
||||
Reference in New Issue
Block a user