feat: profile page and other issues

This commit is contained in:
pateljannat
2021-07-09 09:48:08 +05:30
parent 27c01b3b0c
commit b1de2481a8
15 changed files with 338 additions and 203 deletions

View File

@@ -1,7 +1,5 @@
frappe.ready(() => {
highlight_active_lesson();
save_current_lesson();
$("#progress").click((e) => {
@@ -18,15 +16,8 @@ frappe.ready(() => {
})
var highlight_active_lesson = () => {
var selector = $(`a[href="${decodeURIComponent(window.location.pathname)}"]`).parent();
if (selector.length) {
selector.addClass('active-lesson');
}
}
var save_current_lesson = () => {
if ($(".title").attr("data-membership")) {
if ($(".title").hasClass("is-member")) {
frappe.call("community.lms.api.save_current_lesson", {
course_name: $(".title").attr("data-course"),
lesson_name: $(".title").attr("data-lesson")