fishished

This commit is contained in:
darthsandmann
2017-01-19 17:28:35 +01:00
parent 0f6cd32fa7
commit 2f677551bb
75 changed files with 322 additions and 230 deletions

View File

@ -105,6 +105,41 @@ APP.DetailView_cl = class {
}
}
break;
case "saven":
// Formularinhalt prüfen
if (this.checkContent_p()) {
// kein klassisches submit, es wird auch keine neue Anzeige vorgenommen
var path_s = this.path_s;
var data_s = $("#idForm").serialize();
console.log(data_s);
var type_s = 'PUT';
var id_s = $('#id_s').val();
if (id_s == '') {
type_s = 'POST';
}
$.ajax({
context: this,
dataType: "json",
data: data_s,
url: path_s,
type: type_s
})
.done(function (data_opl) {
// Umwandlung der JSON-Daten vom Server bereits erfolgt
$('#id_s').val(data_opl['id']);
// aktuellen Formularinhalt speichern
// (das Formular wird ja nicht mehr neu geladen!)
this.storeFormContent_p();
alert("Speichern ausgeführt!");
})
.fail(function(jqXHR_opl, textStatus_spl) {
alert( "Fehler bei Anforderung: " + textStatus_spl );
});
} else {
alert("Bitte prüfen Sie die Eingaben in den Formularfeldern!")
}
break;
case "saver":
// kein klassisches submit, es wird auch keine neue Anzeige vorgenommen
var path_s = this.path_s;