Implemented the visibility regulation of the custom document section

This commit is contained in:
Verena Schulz
2026-01-10 19:51:29 +01:00
parent 7bce7c8d36
commit d21bbbce12
2 changed files with 48 additions and 31 deletions
+30 -31
View File
@@ -20,7 +20,7 @@
</label> </label>
<nav class="menu1"> <nav class="menu1">
<a href="custom_document.html" class="li1">Manage document types</a> <button id="customDocBtn" onclick="showCD()">Manage document types</button>
<a href="help_page.html" class="li1">Help</a> <a href="help_page.html" class="li1">Help</a>
</nav> </nav>
</nav> </nav>
@@ -49,6 +49,35 @@
<!-- Visible middle part--> <!-- Visible middle part-->
<div class="mitte" id="mitte"> <div class="mitte" id="mitte">
<!--Costum document section-->
<div class="container" id="cdContainer" style="display:none;">
<h1>Manage document types</h1>
<label for="existingDocs">Vorhandene Dokumente auswählen (optional):</label>
<!--Drop Down-->
<select name="existingDocs" id="existingDocs">
<option value="newDoc">-- Neues Dokument erstellen --</option>
</select>
<div id="docNameWrapper">
<label for="docName">Dokumentname:</label>
<input type="text" id="docName" placeholder="Gib hier den Dokumentnamen ein">
</div>
<label for="prompt">Dein Prompt:</label>
<textarea id="prompt" placeholder="Schreibe hier den Prompt für dein Dokument..."></textarea>
<div class="buttons">
<a href="index.html">
<button id="goBackBtn">Abbrechen</button>
</a>
<button id="deleteBtn">Dokument löschen</button>
<button id="generateBtn">Dokument speichern</button>
</div>
<div id="result"></div>
</div>
<!-- Here starts code from step 1--> <!-- Here starts code from step 1-->
<div class="step" id="step1"> <div class="step" id="step1">
<h2 class="h2">Upload your video here:</h2> <h2 class="h2">Upload your video here:</h2>
@@ -176,36 +205,6 @@
<button class="download-btn" id="downloadButton" onclick="fileDownload()">Download</button> <button class="download-btn" id="downloadButton" onclick="fileDownload()">Download</button>
</div> </div>
</div> </div>
<!--Costum document section-->
<div class="container" style="display:none;">
<h1>Manage document types</h1>
<label for="existingDocs">Vorhandene Dokumente auswählen (optional):</label>
<!--Drop Down-->
<select name="existingDocs" id="existingDocs">
<option value="newDoc">-- Neues Dokument erstellen --</option>
</select>
<div id="docNameWrapper">
<label for="docName">Dokumentname:</label>
<input type="text" id="docName" placeholder="Gib hier den Dokumentnamen ein">
</div>
<label for="prompt">Dein Prompt:</label>
<textarea id="prompt" placeholder="Schreibe hier den Prompt für dein Dokument..."></textarea>
<div class="buttons">
<a href="index.html">
<button id="goBackBtn">Abbrechen</button>
</a>
<button id="deleteBtn">Dokument löschen</button>
<button id="generateBtn">Dokument speichern</button>
</div>
<div id="result"></div>
</div>
<button id ="nextBtn" class="navBtn">&rarr;</button> <button id ="nextBtn" class="navBtn">&rarr;</button>
+18
View File
@@ -5,6 +5,24 @@ let currentVideoPath = null;
Functions used in the setup or affect most of the gui Functions used in the setup or affect most of the gui
*/ */
var showCDValue = 0;
function showCD() {
if(showCDValue == 0){
document.getElementById('cdContainer').style.display = "block";
document.getElementById('step1').style.display ="none";
document.getElementById('step2').style.display ="none";
document.getElementById('step3').style.display ="none";
document.getElementById('step4').style.display ="none";
document.getElementById('step5').style.display ="none";
document.getElementById('step6').style.display ="none";
showCDValue = 1;
} else {
currentStep = 1;
showCDValue = 0;
document.getElementById('cdContainer').style.display = "none";
showStep(1);
}
}
//language changing feature => changes the language of every displayed text //language changing feature => changes the language of every displayed text
function changeLanguage(language) { function changeLanguage(language) {