1 image only
This commit is contained in:
		
							parent
							
								
									e8be1ed470
								
							
						
					
					
						commit
						2a3c708291
					
				@ -55,7 +55,7 @@ $(document).ready(function(){
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
})
 | 
			
		||||
@ -68,7 +68,7 @@ function openOverlay(){
 | 
			
		||||
  $("#cancel").click(function() {
 | 
			
		||||
    document.getElementById("overlay_container").innerHTML = "";
 | 
			
		||||
    $("#overlay").removeClass("show").addClass("hidden")
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -145,13 +145,13 @@ function ideeAnzeigen(data) {
 | 
			
		||||
      let img = $("<img>").addClass("previewImage");
 | 
			
		||||
      img.attr("src", imgUrlArr[i]);
 | 
			
		||||
      img.appendTo(bildContainer);
 | 
			
		||||
      
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
    bildContainer.prependTo($("#overlay_container"))
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  /*
 | 
			
		||||
  let bild = document.createElement("img");
 | 
			
		||||
@ -373,7 +373,7 @@ function formularErstellen(koordianten) {
 | 
			
		||||
  titel_input.setAttribute("name", "titel");
 | 
			
		||||
  titel_input.setAttribute("placeholder", "titel");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  let text_input = document.createElement("input");
 | 
			
		||||
  text_input.setAttribute("type", "textarea");
 | 
			
		||||
@ -389,7 +389,7 @@ function formularErstellen(koordianten) {
 | 
			
		||||
  submit_input.setAttribute("value", "Formular Absenden");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  document.getElementById("form").appendChild(titel_input); 
 | 
			
		||||
  document.getElementById("form").appendChild(titel_input);
 | 
			
		||||
  document.getElementById("form").appendChild(text_input);
 | 
			
		||||
  document.getElementById("form").appendChild(submit_input);
 | 
			
		||||
  document.getElementById("form").appendChild(koordinaten_lat);
 | 
			
		||||
@ -397,16 +397,16 @@ function formularErstellen(koordianten) {
 | 
			
		||||
  document.getElementById("form").appendChild(image_links);
 | 
			
		||||
 | 
			
		||||
  let imageUpload = $('<div class="image-preview" id="image-upload">')
 | 
			
		||||
  imageUpload.html('<input type="hidden" role="uploadcare-uploader" data-public-key="3a3c37e85850c6cfe077" data-multiple="true" data-images-only data-public- data-clearable data-tabs="file camera" data-image-shrink: "1024x1024" data-system-dialog="false"/>')
 | 
			
		||||
  imageUpload.html('<input type="hidden" role="uploadcare-uploader" data-public-key="3a3c37e85850c6cfe077" data-multiple="false" data-images-only data-public- data-clearable data-tabs="file camera" data-image-shrink: "1024x1024" data-system-dialog="true"/>')
 | 
			
		||||
  imageUpload.appendTo("#overlay_container");
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  // get a widget reference
 | 
			
		||||
  const widget = uploadcare.Widget("[role=uploadcare-uploader]", { multiple: true});
 | 
			
		||||
  const widget = uploadcare.Widget("[role=uploadcare-uploader]", { multiple: false});
 | 
			
		||||
 | 
			
		||||
  // listen to the "upload completed" event
 | 
			
		||||
  widget.onUploadComplete(fileGroupInfo => {
 | 
			
		||||
  widget.onUploadComplete(fileInfo => {
 | 
			
		||||
    // get a information about uploaded group
 | 
			
		||||
    // check https://uploadcare.com/docs/file-uploader-api/file-groups/#file-group-info
 | 
			
		||||
 | 
			
		||||
@ -415,19 +415,15 @@ function formularErstellen(koordianten) {
 | 
			
		||||
 | 
			
		||||
    $("<div>").addClass("ImgPrevContainer").appendTo($("div.image-preview"));
 | 
			
		||||
 | 
			
		||||
    for (var i = 0; i < fileGroupInfo.count; i++) {
 | 
			
		||||
 | 
			
		||||
      ImgUrl = "https://ucarecdn.com/" + fileGroupInfo.uuid + "/nth/" + i + "/-/preview/-/quality/smart/-/format/auto/";
 | 
			
		||||
      
 | 
			
		||||
      ImgUrl = "https://ucarecdn.com/" + fileInfo.uuid + "/-/preview/-/quality/smart/-/format/auto/";
 | 
			
		||||
      console.log(fileInfo);
 | 
			
		||||
      linkArr.push(ImgUrl);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      createImgPrev(ImgUrl + "-/resize/x100/"); //img Preview 100 pixels high
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    let linkArrString = JSON.stringify(linkArr);
 | 
			
		||||
    console.log(linkArrString);
 | 
			
		||||
    image_links.value = linkArrString;
 | 
			
		||||
@ -518,7 +514,7 @@ function kommentareAnzeigen(idee_id){
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user