update auf neuen codeigniter
benutzerverwaltung hinzugefügt sync scheduled implementiert
This commit is contained in:
@@ -10,11 +10,22 @@ $(document).ready(function(){
|
||||
info:false,
|
||||
order: [[ 1, 'asc' ]],
|
||||
ajax: {url: '/Ajax/getScheduledData',dataSrc:''},
|
||||
dom: '<"toolbar">frt',
|
||||
layout: {
|
||||
topStart: {
|
||||
buttons: [
|
||||
{text:'Neue Rechnung',className:'btn-sm',action: function ( e, dt, node, config ) {
|
||||
location.href = '/newScheduled';
|
||||
}},
|
||||
{text:'Neuer Transfer',className:'btn-sm mx-2',action: function ( e, dt, node, config ) {
|
||||
location.href = '/newScheduledTransfer';
|
||||
}},
|
||||
]
|
||||
},
|
||||
topEnd: 'search'
|
||||
},
|
||||
columns: columnspez
|
||||
});
|
||||
$("div.toolbar").html('<a class="btn-sm btn-secondary" href="/newScheduled" role="button">Neue Rechnung</a><a class="btn-sm btn-secondary" href="/newScheduledTransfer" role="button">Neuer Transfer</a>');
|
||||
|
||||
|
||||
$('#scheduled tbody').on('click', 'td.dt-receiver', function () {collapseDetails($(this), datatable);} );
|
||||
$('#scheduled tbody').on('click', 'td.dt-datum', function () {location.href = '/editScheduled/'+getId($(this),datatable);});
|
||||
$('#scheduled tbody').on('click', 'table.tabdet', function () {location.href = '/editScheduled/'+$(this).attr('data-bs-id');});
|
||||
|
||||
@@ -1,6 +1,33 @@
|
||||
var datatable;
|
||||
var todos;
|
||||
|
||||
function syncScheduled(){
|
||||
$('#mySnycModal').modal('show');
|
||||
$('#mySnycModal').find('.modal-title').html("Synchronisierte Einträge!");
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/syncScheduled/",
|
||||
data: {}, // serializes the form's elements.
|
||||
success: function(data){
|
||||
const myModale = document.querySelector('#mySnycModal');
|
||||
var modalText = myModale.querySelector('.modal-body');
|
||||
var modalFenster = myModale.querySelector('.modal-dialog');
|
||||
modalText.innerHTML = data;
|
||||
$('#todos').DataTable().ajax.reload();
|
||||
},
|
||||
error: function(data){
|
||||
const myModale = document.querySelector('#mySnycModal');
|
||||
var modalText = myModale.querySelector('.modal-body');
|
||||
var modalFenster = myModale.querySelector('.modal-dialog');
|
||||
modalFenster.classList.add("alert");
|
||||
modalFenster.classList.add("alert-danger");
|
||||
modalText.textContent = 'Fehler bei der Ausführung!';
|
||||
$('#todos').DataTable().ajax.reload();
|
||||
}
|
||||
});
|
||||
// location.href = '/syncScheduled/';
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
datatable = $('#bookings').DataTable({
|
||||
paging: false,
|
||||
@@ -38,9 +65,7 @@ $(document).ready(function(){
|
||||
layout: {
|
||||
topStart: {
|
||||
buttons: [
|
||||
{text:'Sync',className:'btn-sm',action: function ( e, dt, node, config ) {
|
||||
location.href = '/syncScheduled/';
|
||||
}},
|
||||
{text:'Sync',className:'btn-sm',action: syncScheduled},
|
||||
]
|
||||
},
|
||||
topEnd: 'search'
|
||||
|
||||
Reference in New Issue
Block a user