Skip to content

Commit

Permalink
Merge pull request #101 from arielfayol37/polishing
Browse files Browse the repository at this point in the history
Polishing
  • Loading branch information
arielfayol37 authored Nov 23, 2023
2 parents 9a16286 + bb426e5 commit 28ccf04
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Binary file added media/phobos/images/question_images/window.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions phobos/static/phobos/js/create_question.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

document.addEventListener('DOMContentLoaded', () => {
const preloader = document.querySelector('#preloader');
const form = document.querySelector('#question-form');
const allQuestionBlocks = form.querySelector("#all-question-blocks");
let currentAction = form.getAttribute('action');
Expand Down Expand Up @@ -92,6 +93,7 @@ document.addEventListener('DOMContentLoaded', () => {
return; // Exit the loop
}
}
preloader.classList.remove('hide');

var newAction = '';
// After all the tests have passed.
Expand Down
3 changes: 2 additions & 1 deletion phobos/static/phobos/js/search_question.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ document.addEventListener('DOMContentLoaded',()=>{
// Get the form and search field elements
const form = document.querySelector('.search-form');
const searchField = document.querySelector('.search-field');
const preloader = document.querySelector('#preloader');

// Add an event listener to the search field for the 'keydown' event
searchField.addEventListener('keydown', function(event) {
// Check if the pressed key is Enter (key code 13)
if (event.key === 'Enter') {
// Prevent the default form submission
event.preventDefault();

preloader.classList.remove('hide');
// Submit the form programmatically
form.submit();
}
Expand Down
3 changes: 2 additions & 1 deletion phobos/templates/phobos/create_question.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ion-icon name="settings"></ion-icon>
</div>
<!-- TODO: Include buttons and invent listeners to create subquestions.-->
<h3 class="original-size">Create a Question</h3>

<div class="page-container" id="create-question">

<div class="add-var-section" title="variables">
Expand Down Expand Up @@ -48,6 +48,7 @@ <h3 class="original-size">Create a Question</h3>

<div class="question">
<div id="topics-subtopics">
<h3 class="original-size suggestion">Create a Question</h3>
<div class="topics_dropdown option-section">
<label for="topic" class="option-label">Topic: </label>

Expand Down

0 comments on commit 28ccf04

Please sign in to comment.