diff --git a/lms/public/js/common_functions.js b/lms/public/js/common_functions.js index 62ad81f3..2eeb43ae 100644 --- a/lms/public/js/common_functions.js +++ b/lms/public/js/common_functions.js @@ -1,7 +1,6 @@ frappe.ready(() => { setup_file_size(); pin_header(); - setup_router(); $(".join-batch").click((e) => { join_course(e); @@ -43,14 +42,6 @@ frappe.ready(() => { }); }); -const setup_router = () => { - frappe.router = { - slug(name) { - return name.toLowerCase().replace(/ /g, "-"); - }, - }; -}; - const pin_header = () => { const el = document.querySelector(".sticky"); if (el) { diff --git a/lms/public/js/website.bundle.js b/lms/public/js/website.bundle.js index 7d1dfd83..f24ab539 100644 --- a/lms/public/js/website.bundle.js +++ b/lms/public/js/website.bundle.js @@ -1,3 +1,4 @@ import "./profile.js"; import "./common_functions.js"; import "../../../../frappe/frappe/public/js/frappe/ui/chart.js"; +import "../../../../frappe/frappe/public/js/frappe/event_emitter.js"; diff --git a/lms/templates/lms_base.html b/lms/templates/lms_base.html index 73728239..311053d0 100644 --- a/lms/templates/lms_base.html +++ b/lms/templates/lms_base.html @@ -18,5 +18,14 @@ Object.assign(frappe.boot, telemetry_boot_info) {% endif %} - {{ include_script("telemetry.bundle.js") }} + + {{ include_script("telemetry.bundle.js") }} + {%- endblock -%} \ No newline at end of file diff --git a/lms/www/batch/edit.html b/lms/www/batch/edit.html index 44454396..6fa88e22 100644 --- a/lms/www/batch/edit.html +++ b/lms/www/batch/edit.html @@ -115,12 +115,6 @@ "can_select": ["LMS Quiz"], "can_read": ["LMS Quiz"] }; - - frappe.router = { - slug (name) { - return name.toLowerCase().replace(/ /g, "-"); - } - } {% endif %} {{ include_script('controls.bundle.js') }} diff --git a/lms/www/classes/class.html b/lms/www/classes/class.html index c81d56a1..fd264025 100644 --- a/lms/www/classes/class.html +++ b/lms/www/classes/class.html @@ -462,11 +462,6 @@ frappe.boot.single_types = [] - frappe.router = { - slug (name) { - return name.toLowerCase().replace(/ /g, "-"); - } - } let class_info = {{ class_info | json }}; {% endif %} diff --git a/lms/www/classes/index.html b/lms/www/classes/index.html index fed9ac46..081c8b09 100644 --- a/lms/www/classes/index.html +++ b/lms/www/classes/index.html @@ -157,12 +157,6 @@ "can_select": ["LMS Category"], "can_read": ["LMS Category"] }; - - frappe.router = { - slug (name) { - return name.toLowerCase().replace(/ /g, "-"); - } - } let class_info = null; {% endif %}