Skip to content

Commit 28ccf04

Browse files
authored
Merge pull request #101 from arielfayol37/polishing
Polishing
2 parents 9a16286 + bb426e5 commit 28ccf04

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed
135 KB
Loading

phobos/static/phobos/js/create_question.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
document.addEventListener('DOMContentLoaded', () => {
3+
const preloader = document.querySelector('#preloader');
34
const form = document.querySelector('#question-form');
45
const allQuestionBlocks = form.querySelector("#all-question-blocks");
56
let currentAction = form.getAttribute('action');
@@ -92,6 +93,7 @@ document.addEventListener('DOMContentLoaded', () => {
9293
return; // Exit the loop
9394
}
9495
}
96+
preloader.classList.remove('hide');
9597

9698
var newAction = '';
9799
// After all the tests have passed.

phobos/static/phobos/js/search_question.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ document.addEventListener('DOMContentLoaded',()=>{
22
// Get the form and search field elements
33
const form = document.querySelector('.search-form');
44
const searchField = document.querySelector('.search-field');
5+
const preloader = document.querySelector('#preloader');
56

67
// Add an event listener to the search field for the 'keydown' event
78
searchField.addEventListener('keydown', function(event) {
89
// Check if the pressed key is Enter (key code 13)
910
if (event.key === 'Enter') {
1011
// Prevent the default form submission
1112
event.preventDefault();
12-
13+
preloader.classList.remove('hide');
1314
// Submit the form programmatically
1415
form.submit();
1516
}

phobos/templates/phobos/create_question.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<ion-icon name="settings"></ion-icon>
1919
</div>
2020
<!-- TODO: Include buttons and invent listeners to create subquestions.-->
21-
<h3 class="original-size">Create a Question</h3>
21+
2222
<div class="page-container" id="create-question">
2323

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

4949
<div class="question">
5050
<div id="topics-subtopics">
51+
<h3 class="original-size suggestion">Create a Question</h3>
5152
<div class="topics_dropdown option-section">
5253
<label for="topic" class="option-label">Topic: </label>
5354

0 commit comments

Comments
 (0)