From fc086fdbc359206f88488749cc4a4435d3e51308 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Thu, 8 Jun 2023 11:02:42 +0530 Subject: [PATCH] fix: misc issues --- lms/www/courses/create.html | 6 +++--- lms/www/courses/create.js | 19 +++++++++++-------- lms/www/courses/outline.js | 1 + 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/lms/www/courses/create.html b/lms/www/courses/create.html index d8a88c65..8abc4353 100644 --- a/lms/www/courses/create.html +++ b/lms/www/courses/create.html @@ -78,7 +78,7 @@ {{ _("Course Description") }}
- {{ _("Add a detailed description") }} + {{ _("Add a detailed description to provide more information about your course.") }}
@@ -109,7 +109,7 @@ {{ _("Tags") }}
- {{ _("Add suitable tags") }} + {{ _("Tags act as search keywords. They also appear on the Course Card and Course Detail page") }}
@@ -146,7 +146,7 @@ {{ _("Course Image") }}
- {{ _("Add an appropriate image") }} + {{ _("Image will appear on the Course Card") }}
diff --git a/lms/www/courses/create.js b/lms/www/courses/create.js index 67897866..76dc1809 100644 --- a/lms/www/courses/create.js +++ b/lms/www/courses/create.js @@ -9,6 +9,17 @@ frappe.ready(() => { create_tag(e); }); + $("#tags-input").focus((e) => { + $(e.target).keypress((e) => { + if (e.which == 13 || e.which == 44) { + create_tag(e); + setTimeout(() => { + $("#tags-input").val(""); + }, 0); + } + }); + }); + $(document).on("click", ".btn-remove", (e) => { $(e.target).parent().parent().remove(); }); @@ -27,14 +38,6 @@ frappe.ready(() => { } }); - $("#tags-input").focus((e) => { - $(e.target).keypress((e) => { - if (e.which == 13) { - create_tag(e); - } - }); - }); - $(".btn-upload").click((e) => { upload_file(e); }); diff --git a/lms/www/courses/outline.js b/lms/www/courses/outline.js index cb70c48a..eaf9fc6c 100644 --- a/lms/www/courses/outline.js +++ b/lms/www/courses/outline.js @@ -49,6 +49,7 @@ const save_chapter = (e) => { chapter: parent.data("chapter") || null, }, callback: (data) => { + $("#chapter-modal").modal("hide"); frappe.show_alert({ message: __("Saved"), indicator: "green",