fix: formatting

This commit is contained in:
Jannat Patel
2022-12-26 13:27:57 +05:30
parent 46075130ab
commit 263b3ec476

View File

@@ -11,10 +11,9 @@ frappe.ready(() => {
show_search_bar(e);
});
$('#search-modal').on('hidden.bs.modal', () => {
$("#search-modal").on("hidden.bs.modal", () => {
hide_search_bar();
});
});
const search_course = (e) => {
@@ -42,7 +41,7 @@ const render_course_list = (data) => {
let courses = data.message;
$(".result-row").remove();
if (! courses.length) {
if (!courses.length) {
let element = `<a class="result-row">
${__("No result found")}
</a>`;
@@ -50,7 +49,6 @@ const render_course_list = (data) => {
return;
}
for (let i in courses) {
let element = `<a class="result-row" href="/courses/${courses[i].name}">
${courses[i].title}
@@ -68,10 +66,10 @@ const show_search_bar = (e) => {
$("#search-modal").modal("show");
setTimeout(() => {
$("#search-course").focus();
}, 1000)
}
}, 1000);
};
const hide_search_bar = (e) => {
$("#search-course").val("");
$(".result-row").remove();
}
};