This commit is contained in:
Sebastian Titz 2021-11-24 09:55:50 +01:00
commit 79d82d7550
2 changed files with 78 additions and 0 deletions

View File

@ -22,6 +22,76 @@ function ajaxFeedback(e,url,css) {
return false;
}
function formFeedback(e,f,url,css) {
var formData = {}
//TODO form erkennen und auslesen und disablen
$(f).each(function(i, obj) {
console.log(obj);
formData[obj.name] = obj.value
obj.disabled = true;
});
e.disabled = true;
$.ajax({
url: url,
data: formData,
method: "POST",
success: function(res) {
if(res =='success') {
successMarker(e,css);
setTimeout(function() {
$(f).each(function(i, obj) {
obj.disabled = false;
if($(obj).attr('type') != 'hidden') {
obj.value = '';
}
});
e.disabled = false;
},5000)
return;
}else{
if(res =='warn') {
warnMarker(e,css);
setTimeout(function() {
$(f).each(function(i, obj) {
obj.disabled = false;
if($(obj).attr('type') != 'hidden') {
obj.value = '';
}
});
e.disabled = false;
},5000)
return;
}else{
errorMarker(e,css);
setTimeout(function() {
$(f).each(function(i, obj) {
obj.disabled = false;
if($(obj).attr('type') != 'hidden') {
obj.value = '';
}
});
e.disabled = false;
},5000)
return;
}
}
},
error: function (res,err) {
errorMarker(e,css);
setTimeout(function() {
$(f).each(function(i, obj) {
obj.disabled = false;
if($(obj).attr('type') != 'hidden') {
obj.value = '';
}
});
e.disabled = false;
},5000)
}
});
return false;
}
function getCoords(e) {
var p = {};
p.x = e.offsetLeft;

8
sitemap.css Normal file
View File

@ -0,0 +1,8 @@
ARTICLE { font-family: sans-serif;
background: white; color: black }
AUTHOR { margin: 1em; color: red }
HEADLINE { text-align: right;
margin-bottom: 2em }
PARA { line-height: 1.5;
margin-left: 15% }
INSTRUMENT { color: blue }