From a162248f3242e4a549fef04af92c68e3145e0b41 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Fri, 28 Aug 2020 15:16:39 +0200 Subject: [PATCH] fix: use hook for website theme scss --- erpnext/hooks.py | 2 +- erpnext/public/js/website_theme.js | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 erpnext/public/js/website_theme.js diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 463ad6c94b..79a640e39d 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -19,11 +19,11 @@ app_include_js = "assets/js/erpnext.min.js" app_include_css = "assets/css/erpnext.css" web_include_js = "assets/js/erpnext-web.min.js" web_include_css = "assets/css/erpnext-web.css" +website_theme_scss = "erpnext/public/scss/website" doctype_js = { "Communication": "public/js/communication.js", "Event": "public/js/event.js", - "Website Theme": "public/js/website_theme.js", "Newsletter": "public/js/newsletter.js" } diff --git a/erpnext/public/js/website_theme.js b/erpnext/public/js/website_theme.js deleted file mode 100644 index 9662f78538..0000000000 --- a/erpnext/public/js/website_theme.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors -// MIT License. See license.txt - -frappe.ui.form.on('Website Theme', { - validate(frm) { - let theme_scss = frm.doc.theme_scss; - if (theme_scss && (theme_scss.includes('frappe/public/scss/website') - && !theme_scss.includes('erpnext/public/scss/website')) - ) { - frm.set_value('theme_scss', - `${frm.doc.theme_scss}\n@import "erpnext/public/scss/website";`); - } - } -});