Webseite ausgebaut und QR-Codes werden für Ordner erzeugt
This commit is contained in:
@ -16,11 +16,19 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
ShowHomePage();
|
||||
|
||||
});
|
||||
|
||||
function ShowHomePage() {
|
||||
|
||||
$("#Ordner").empty();
|
||||
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
contentType:'application/json; charset=utf-8',
|
||||
url: ServerAPI+'/folder/2019-11-15',
|
||||
url: ServerAPI+'/folder/',
|
||||
dataType: "json",
|
||||
data: "",
|
||||
success: function(content){
|
||||
@ -28,15 +36,43 @@
|
||||
//http://127.0.0.1:8000/img/2019-11-15/IMG_4186.JPG
|
||||
for ( var i = 0, l = content.length; i < l; i++ ) {
|
||||
var ObjInhalt = content[i];
|
||||
$("#Ordner").append("<li>"+
|
||||
"<img src=\""+ServerAPI+"/img/2019-11-15/"+ObjInhalt+"\" width=100 height=100>"+
|
||||
"<a href=\"#\" onclick=\"ShowFolder('"+ObjInhalt+"')\">"+
|
||||
ObjInhalt+"</a></li>");
|
||||
$("#Ordner").append(""+
|
||||
"<img src=\""+ServerAPI+"/qr/"+ServerAPI+"/dir/"+ObjInhalt+"\" width=150 height=150>"+
|
||||
"<a href=\"#\" onclick=\"ShowFolderPics('"+ObjInhalt+"')\">"+
|
||||
ObjInhalt+"</a><hr>");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function ShowFolderPics(folder) {
|
||||
|
||||
// Ordner div leeren
|
||||
$("#Ordner").empty();
|
||||
$("#Ordner").append('<a href="#" onclick=ShowHomePage()>Zurück</a><hr>');
|
||||
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
contentType:'application/json; charset=utf-8',
|
||||
url: ServerAPI+'/folder/'+folder,
|
||||
dataType: "json",
|
||||
data: "",
|
||||
success: function(content){
|
||||
|
||||
//http://127.0.0.1:8000/img/2019-11-15/IMG_4186.JPG
|
||||
for ( var i = 0, l = content.length; i < l; i++ ) {
|
||||
var ObjInhalt = content[i];
|
||||
$("#Ordner").append(""+
|
||||
"<img src=\""+ServerAPI+"/img/"+folder+"/"+ObjInhalt+"\" width=100 height=100>"+
|
||||
"<a href=\""+ServerAPI+"/img/"+folder+"/"+ObjInhalt+"\">"+
|
||||
ObjInhalt+"</a><hr>");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user