Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions public/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ $(document).ready(function() {
//Prevent normal browser behavior
event.preventDefault();

// Clear the email search field and display the loading icon.
loader();

// Trim and store value entered by user in the search field
let emailInput = $("#emailSearch")
.val()
Expand All @@ -23,9 +26,6 @@ $(document).ready(function() {
$("#warningMessage").text(response);
$("#warningModal").modal("show");
} else {
// Clear the email search field and display the loading icon.
loader();

// Convert the renderedPartial String to a jQuery object.
let newTarget = $(response.renderedPartial);

Expand Down Expand Up @@ -58,6 +58,8 @@ $(document).ready(function() {
event.stopPropagation();
// Prevent click on <a> from navigating to a new page
event.preventDefault();
// Clear the email search field and display the loading icon.
loader();
// Remove the active class from any li.active
$(".nav-pf-vertical .list-group-item.active").removeClass("active");
// Find the closest li.list-group-item to the click and add the active class
Expand Down Expand Up @@ -182,6 +184,7 @@ $(document).ready(function() {
function loader() {
$("emailSearch").val("");
$("#contact-area").html("");
console.log("Hello");
$("#contact-area").html(
`
<div class="loader">
Expand Down