Edit Zusammenstellung
This commit is contained in:
@ -1,165 +1,266 @@
|
||||
function notenbuchsave(){
|
||||
var notenbuch = document.getElementById("notenbuchname").value;
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'notenbuchsave',
|
||||
'notenbuch': notenbuch
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
function notenbuchsave() {
|
||||
var notenbuch = document.getElementById("notenbuchname").value;
|
||||
var anz_lizenz = document.getElementById("notenbuchlizenz").value;
|
||||
var checkliz = document.getElementById("checkliz");
|
||||
|
||||
if (checkliz.checked == true) {
|
||||
var var_checkliz = 1;
|
||||
} else {
|
||||
var var_checkliz = 0;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'notenbuchsave',
|
||||
'notenbuch': notenbuch,
|
||||
'var_checkliz': var_checkliz,
|
||||
'anz_lizenz': anz_lizenz
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
setTimeout(function() {
|
||||
document.getElementById("notenbuchname").value ="";
|
||||
window.location = "?";
|
||||
}, 1000);
|
||||
if (a[1] == "success") {
|
||||
setTimeout(function() {
|
||||
document.getElementById("notenbuchname").value = "";
|
||||
window.location = "?";
|
||||
}, 1000);
|
||||
}
|
||||
$('#msg').show().delay(1000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function notenbuchupdate(zsid) {
|
||||
var notenbuch = document.getElementById("notenbuchname").value;
|
||||
var anz_lizenz = document.getElementById("notenbuchlizenz").value;
|
||||
var checkliz = document.getElementById("checkliz");
|
||||
|
||||
if (checkliz.checked == true) {
|
||||
var var_checkliz = 1;
|
||||
} else {
|
||||
var var_checkliz = 0;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'notenbuchupdate',
|
||||
'notenbuch': notenbuch,
|
||||
'var_checkliz': var_checkliz,
|
||||
'zsid': zsid,
|
||||
'anz_lizenz': anz_lizenz
|
||||
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if (a[1] == "success") {
|
||||
setTimeout(function() {
|
||||
document.getElementById("notenbuchname").value = "";
|
||||
window.location = "?";
|
||||
}, 1000);
|
||||
}
|
||||
$('#msg').show().delay(1000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function editNotenbuch(zsid) {
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'editNotenbuch',
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
const obj = JSON.parse(result);
|
||||
var bezeichnung = obj.bezeichnung;
|
||||
var lizenzpflicht = obj.lizenzpflicht;
|
||||
var anzahl_lizenz = obj.anzahl_lizenz;
|
||||
|
||||
document.getElementById('notenbuchname').value = bezeichnung;
|
||||
document.getElementById('save').onclick = function() {
|
||||
notenbuchupdate(zsid)
|
||||
};
|
||||
document.getElementById('save').innerText = 'Update';
|
||||
|
||||
if (lizenzpflicht == 1) {
|
||||
document.getElementById("checkliz").checked = true;
|
||||
document.getElementById('notenbuchlizenz').disabled = false;
|
||||
document.getElementById('notenbuchlizenz').value = anzahl_lizenz;
|
||||
} else {
|
||||
document.getElementById("checkliz").checked = false;
|
||||
document.getElementById('notenbuchlizenz').disabled = true;
|
||||
document.getElementById('notenbuchlizenz').value = '';
|
||||
}
|
||||
|
||||
// if(result!=''){
|
||||
// var a = result.split('|***|');
|
||||
// if(a[1]=="success"){
|
||||
// setTimeout(function() {
|
||||
// document.getElementById("notenbuchname").value ="";
|
||||
// window.location = "?";
|
||||
// }, 1000);
|
||||
// }
|
||||
// $('#msg').show().delay(1000).fadeOut(500);
|
||||
// $('#msg').html(a[0]);
|
||||
// }
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function erfzuordnung(jndid, zsid) {
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'erfzuordnung',
|
||||
'jndid': jndid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'erfzuordnung',
|
||||
'jndid': jndid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
setTimeout(function() {
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenbuchzuordnung.php?edit='+value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
}, 1000);
|
||||
if (a[1] == "success") {
|
||||
setTimeout(function() {
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenbuchzuordnung.php?edit=' + value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
$('#msg').show().delay(1000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delzuordnung(jndid, zsid) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'delzuordnung',
|
||||
'jndid': jndid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'delzuordnung',
|
||||
'jndid': jndid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
setTimeout(function() {
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenbuchzuordnung.php?edit='+value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
}, 2000);
|
||||
if (a[1] == "success") {
|
||||
setTimeout(function() {
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenbuchzuordnung.php?edit=' + value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
}, 2000);
|
||||
}
|
||||
$('#msg').show().delay(1000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function erfNotenUser(csid, zsid) {
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'erfNotenUser',
|
||||
'csid': csid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'erfNotenUser',
|
||||
'csid': csid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
$(document).ajaxStop(function(){
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenuserzuordnung.php?edit='+value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
});
|
||||
if (a[1] == "success") {
|
||||
$(document).ajaxStop(function() {
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenuserzuordnung.php?edit=' + value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
});
|
||||
}
|
||||
$('#msg').show().delay(5000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delNotenUser(csid, zsid) {
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'delNotenUser',
|
||||
'csid': csid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'delNotenUser',
|
||||
'csid': csid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
$(document).ajaxStop(function(){
|
||||
if (a[1] == "success") {
|
||||
$(document).ajaxStop(function() {
|
||||
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenuserzuordnung.php?edit='+value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
});
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenuserzuordnung.php?edit=' + value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
});
|
||||
}
|
||||
$('#msg').show().delay(10000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -174,20 +275,20 @@ function delZusammenstellung(zsid) {
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
$(document).ajaxStop(function(){
|
||||
window.location = "?";
|
||||
});
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if (a[1] == "success") {
|
||||
$(document).ajaxStop(function() {
|
||||
window.location = "?";
|
||||
});
|
||||
}
|
||||
$('#msg').show().delay(10000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
$('#msg').show().delay(10000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user