mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Submit button disabled without video, bigger middle part and dropzone, button in dropzone
This commit is contained in:
@@ -21,10 +21,9 @@
|
|||||||
<div class="upload-container" id="uploadContainer">
|
<div class="upload-container" id="uploadContainer">
|
||||||
<p id="p1">Drag and drop video file</p>
|
<p id="p1">Drag and drop video file</p>
|
||||||
<div class="file-name" id="fileName">No video chosen</div>
|
<div class="file-name" id="fileName">No video chosen</div>
|
||||||
</div>
|
<button class="custom-btn" id="manualUploadBtn">Search video</button>
|
||||||
|
|
||||||
<button class="custom-btn" id="manualUploadBtn">Search video</button>
|
|
||||||
<input type="file" id="videoUpload" accept="video/*">
|
<input type="file" id="videoUpload" accept="video/*">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="checkbox-group">
|
<div class="checkbox-group">
|
||||||
<label id="checkbox_group" for="checkbox-group">Choose prefered document style:</label>
|
<label id="checkbox_group" for="checkbox-group">Choose prefered document style:</label>
|
||||||
@@ -39,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="submit-btn" id="submitButton" onclick="checkBoxes()">Submit</button>
|
<button class="submit-btn" id="submitButton" onclick="checkBoxes()" disabled>Submit</button>
|
||||||
|
|
||||||
<div class="progressbar">
|
<div class="progressbar">
|
||||||
<div class="progress_fill"></div>
|
<div class="progress_fill"></div>
|
||||||
|
|||||||
+18
-1
@@ -129,4 +129,21 @@ function loadLanguageOptions(){
|
|||||||
console.log("Error in script.js loadLanguageOptions function");
|
console.log("Error in script.js loadLanguageOptions function");
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function activateSubmitBtn(hasFile){
|
||||||
|
submitButton.disabled = !hasFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
videoUpload.addEventListener("change", () => {
|
||||||
|
activateSubmitBtn(videoUpload.files.length > 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
uploadContainer.addEventListener("drop", (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
const file = e.dataTransfer.files[0];
|
||||||
|
|
||||||
|
if(file){
|
||||||
|
activateSubmitBtn(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
+17
-2
@@ -5,7 +5,7 @@ body {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: #555;
|
background-color: #666;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,8 @@ body {
|
|||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
|
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 400px;
|
width: 350px;
|
||||||
|
height: 100px;
|
||||||
transition: border 0.3s, background-color 0.3s;
|
transition: border 0.3s, background-color 0.3s;
|
||||||
border: 2px dashed #ccc;
|
border: 2px dashed #ccc;
|
||||||
}
|
}
|
||||||
@@ -40,11 +41,15 @@ body {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.custom-btn {
|
.custom-btn {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
|
margin-top: 40px;
|
||||||
background-color: #007BFF;
|
background-color: #007BFF;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
@@ -84,6 +89,8 @@ gap: 5px;
|
|||||||
|
|
||||||
.submit-btn {
|
.submit-btn {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
background-color: #007BFF;
|
background-color: #007BFF;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
@@ -92,9 +99,16 @@ gap: 5px;
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.submit-btn:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.mitte {
|
.mitte {
|
||||||
background-color: #f2f3f4;
|
background-color: #f2f3f4;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 500px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 5% 50px;
|
padding: 5% 50px;
|
||||||
@@ -103,6 +117,7 @@ gap: 5px;
|
|||||||
border: 1px;
|
border: 1px;
|
||||||
border-color: black;
|
border-color: black;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
|||||||
Reference in New Issue
Block a user