diff --git a/frappe/email/email_body.py b/frappe/email/email_body.py
index e12b3d78d9..7aa70830e7 100755
--- a/frappe/email/email_body.py
+++ b/frappe/email/email_body.py
@@ -13,8 +13,6 @@ from email.mime.multipart import MIMEMultipart
from email.header import Header
from email import policy
-from frappe.core.doctype.navbar_settings.navbar_settings import get_app_logo
-
def get_email(recipients, sender='', msg='', subject='[No Subject]',
text_content = None, footer=None, print_html=None, formatted=None, attachments=None,
content=None, reply_to=None, cc=[], bcc=[], email_account=None, expose_recipients=None,
diff --git a/frappe/public/js/frappe/ui/iconbar.js b/frappe/public/js/frappe/ui/iconbar.js
index 200b54bfef..a642636758 100644
--- a/frappe/public/js/frappe/ui/iconbar.js
+++ b/frappe/public/js/frappe/ui/iconbar.js
@@ -31,7 +31,7 @@ frappe.ui.IconBar = Class.extend({
return false;
});
- $li.find("i").attr("title", label).tooltip({ delay: { "show": 600, "hide": 100 }, trigger : "hover" });
+ $li.find("i").attr("title", label).tooltip({ delay: { "show": 600, "hide": 100 }, trigger: "hover" });
this.$wrapper.find(".iconbar-" + group).removeClass("hide")
diff --git a/frappe/public/js/frappe/ui/like.js b/frappe/public/js/frappe/ui/like.js
index b93421fd77..6716f5174c 100644
--- a/frappe/public/js/frappe/ui/like.js
+++ b/frappe/public/js/frappe/ui/like.js
@@ -96,7 +96,7 @@ frappe.ui.setup_like_popover = ($parent, selector, check_not_liked=true) => {
animation: true,
placement: 'bottom',
trigger: 'manual',
- template:`
+ template: `
`,
diff --git a/frappe/public/js/frappe/ui/messages.js b/frappe/public/js/frappe/ui/messages.js
index 6ab5395e8d..36bd5dd42d 100644
--- a/frappe/public/js/frappe/ui/messages.js
+++ b/frappe/public/js/frappe/ui/messages.js
@@ -374,7 +374,7 @@ frappe.show_alert = function(message, seconds=7, actions={}) {
if (message.indicator) {
icon = indicator_icon_map[message.indicator.toLowerCase()] || 'solid-' + message.indicator;
} else {
- icon = 'solid-info'
+ icon = 'solid-info';
}
const div = $(`
@@ -397,7 +397,7 @@ frappe.show_alert = function(message, seconds=7, actions={}) {
}
div.find('.close, button').click(function() {
- div.addClass('out')
+ div.addClass('out');
setTimeout(() => div.remove(), 800);
return false;
});
@@ -408,14 +408,14 @@ frappe.show_alert = function(message, seconds=7, actions={}) {
if (seconds > 2) {
// Delay for animation
- seconds = seconds - 0.8
+ seconds = seconds - 0.8;
}
setTimeout(() => {
- div.addClass('out')
+ div.addClass('out');
setTimeout(() => div.remove(), 800);
return false;
- }, seconds * 1000)
+ }, seconds * 1000);
return div;
}
diff --git a/frappe/public/js/frappe/ui/notifications/notifications.js b/frappe/public/js/frappe/ui/notifications/notifications.js
index ed762fde6d..b68577ae40 100644
--- a/frappe/public/js/frappe/ui/notifications/notifications.js
+++ b/frappe/public/js/frappe/ui/notifications/notifications.js
@@ -38,7 +38,7 @@ frappe.ui.Notifications = class Notifications {
frappe.set_route('Form', 'Notification Settings', frappe.session.user);
}).appendTo(this.header_actions)
.attr('title', __("Notification Settings"))
- .tooltip({ delay: { "show": 600, "hide": 100}, trigger : "hover" });
+ .tooltip({ delay: { "show": 600, "hide": 100}, trigger: "hover" });
$(`
${frappe.utils.icon('mark-as-read')}
@@ -46,7 +46,7 @@ frappe.ui.Notifications = class Notifications {
.on('click', (e) => this.mark_all_as_read(e))
.appendTo(this.header_actions)
.attr('title', __("Mark all as read"))
- .tooltip({ delay: { "show": 600, "hide": 100 }, trigger : "hover" });
+ .tooltip({ delay: { "show": 600, "hide": 100 }, trigger: "hover" });
this.categories = [
{
@@ -64,7 +64,7 @@ frappe.ui.Notifications = class Notifications {
];
let get_headers_html = (item) => {
- let active = item.id == "notifications" ? 'active' : ''
+ let active = item.id == "notifications" ? 'active' : '';
let html = ` {
e.stopImmediatePropagation();
this.switch_tab(item);
- })
+ });
navitem.append(item.$tab);
- return item
- })
+ return item;
+ });
navitem.appendTo(this.header_items);
this.categories.forEach(category => {
this.make_tab_view(category);
- })
+ });
this.switch_tab(this.categories[0]);
}
@@ -178,11 +178,11 @@ class BaseNotificaitonsView {
}
show() {
- this.container.show()
+ this.container.show();
}
hide() {
- this.container.hide()
+ this.container.hide();
}
}
@@ -190,7 +190,7 @@ class NotificationsView extends BaseNotificaitonsView {
make() {
this.notifications_icon = this.parent.find('.notifications-icon');
this.notifications_icon.attr("title", __('Notifications')).tooltip(
- { delay: { "show": 600, "hide": 100}, trigger : "hover" }
+ { delay: { "show": 600, "hide": 100}, trigger: "hover" }
);
this.setup_notification_listeners();
@@ -281,15 +281,15 @@ class NotificationsView extends BaseNotificaitonsView {
`);
if (!field.read) {
- let mark_btn = item_html.find(".mark-as-read")
- mark_btn.tooltip({ delay: { "show": 600, "hide": 100 }, trigger : "hover" });
+ let mark_btn = item_html.find(".mark-as-read");
+ mark_btn.tooltip({ delay: { "show": 600, "hide": 100 }, trigger: "hover" });
mark_btn.on('click', (e) => {
e.preventDefault();
e.stopImmediatePropagation();
this.mark_as_read(field.name, item_html);
});
- item_html.on('click', (e) => {
+ item_html.on('click', () => {
this.mark_as_read(field.name, item_html);
});
}
@@ -361,12 +361,12 @@ class NotificationsView extends BaseNotificaitonsView {
setup_notification_listeners() {
frappe.realtime.on('notification', () => {
- this.toggle_notification_icon(false)
+ this.toggle_notification_icon(false);
this.update_dropdown();
});
frappe.realtime.on('indicator_hide', () => {
- this.toggle_notification_icon(true)
+ this.toggle_notification_icon(true);
});
this.parent.on('show.bs.dropdown', () => {
@@ -400,7 +400,7 @@ class EventsView extends BaseNotificaitonsView {
let time = __("All Day");
if (!event.all_day) {
let start_time = frappe.datetime.get_time(event.starts_on);
- let days_diff = frappe.datetime.get_day_diff(event.ends_on, event.starts_on)
+ let days_diff = frappe.datetime.get_day_diff(event.ends_on, event.starts_on);
let end_time = frappe.datetime.get_time(event.ends_on);
if (days_diff > 1) {
end_time = __("Rest of the day");
diff --git a/frappe/public/js/frappe/ui/page.js b/frappe/public/js/frappe/ui/page.js
index acdfa736a9..9b4b0b9122 100644
--- a/frappe/public/js/frappe/ui/page.js
+++ b/frappe/public/js/frappe/ui/page.js
@@ -187,19 +187,19 @@ frappe.ui.Page = Class.extend({
this.sidebar.find(".close-sidebar").on('click', (e) => close_sidebar(e));
this.sidebar.on("click", "button:not(.dropdown-toggle)", (e) => close_sidebar(e));
- let close_sidebar = (e) => {
+ let close_sidebar = () => {
scroll_container.css("overflow-y", "");
this.sidebar.find("div.close-sidebar").fadeOut(() => {
overlay_sidebar.removeClass('opened')
.find('.dropdown-toggle')
.removeClass('text-muted');
});
- }
+ };
},
update_sidebar_icon() {
let sidebar_toggle = $('.page-head').find('.sidebar-toggle-btn');
- let sidebar_toggle_icon = sidebar_toggle.find('.sidebar-toggle-icon')
+ let sidebar_toggle_icon = sidebar_toggle.find('.sidebar-toggle-icon');
let sidebar_wrapper = this.wrapper.find('.layout-side-section');
let is_sidebar_visible = $(sidebar_wrapper).is(":visible");
sidebar_toggle_icon.html(frappe.utils.icon(is_sidebar_visible ? 'sidebar-collapse' : 'sidebar-expand', 'md'));
@@ -214,14 +214,14 @@ frappe.ui.Page = Class.extend({
- `)
+ `);
button.appendTo(this.icon_group.removeClass("hide"));
button.click(click);
button.attr("title", __(tooltip_label || frappe.unscrub(icon)))
- .tooltip({ delay: { "show": 600, "hide": 100 }, trigger : "hover" });
+ .tooltip({ delay: { "show": 600, "hide": 100 }, trigger: "hover" });
- return button
+ return button;
},
clear_indicator: function() {
@@ -789,7 +789,7 @@ frappe.ui.Page = Class.extend({
}
if(df.fieldtype=="Button") {
- $(f.wrapper).find(".page-control-label").html(" ")
+ $(f.wrapper).find(".page-control-label").html(" ");
f.$input.addClass("btn-xs").css({"width": "100%", "margin-top": "-1px"});
}
diff --git a/frappe/public/js/frappe/ui/theme_switcher.js b/frappe/public/js/frappe/ui/theme_switcher.js
index 5e54b5fa8a..cfd6c9baaa 100644
--- a/frappe/public/js/frappe/ui/theme_switcher.js
+++ b/frappe/public/js/frappe/ui/theme_switcher.js
@@ -9,7 +9,7 @@ frappe.ui.ThemeSwitcher = class ThemeSwitcher {
setup_dialog() {
this.dialog = new frappe.ui.Dialog({
title: __("Switch Theme")
- })
+ });
this.body = $(``).appendTo(this.dialog.$body);
}
@@ -17,7 +17,7 @@ frappe.ui.ThemeSwitcher = class ThemeSwitcher {
this.current_theme = document.body.dataset.theme;
this.fetch_themes().then(() => {
this.render();
- })
+ });
}
fetch_themes() {
@@ -31,7 +31,7 @@ frappe.ui.ThemeSwitcher = class ThemeSwitcher {
name: "dark",
label: __("Timeless Night"),
}
- ]
+ ];
resolve(this.themes);
});
@@ -42,7 +42,7 @@ frappe.ui.ThemeSwitcher = class ThemeSwitcher {
let html = this.get_preview_html(theme);
html.appendTo(this.body);
theme.$html = html;
- })
+ });
}
@@ -80,13 +80,13 @@ frappe.ui.ThemeSwitcher = class ThemeSwitcher {
preview.on('click', () => {
this.themes.forEach((th) => {
th.$html.removeClass("selected");
- })
+ });
- preview.addClass("selected")
- this.toggle_theme(theme.name)
+ preview.addClass("selected");
+ this.toggle_theme(theme.name);
})
- return preview
+ return preview;
}
toggle_theme(theme, preview=false) {
@@ -96,7 +96,7 @@ frappe.ui.ThemeSwitcher = class ThemeSwitcher {
frappe.call('frappe.core.doctype.user.user.switch_theme', {
theme: toTitle(theme)
- })
+ });
} else {
document.body.dataset.theme = theme.toLowerCase();
}
diff --git a/frappe/public/js/frappe/ui/toolbar/search.js b/frappe/public/js/frappe/ui/toolbar/search.js
index 1a7fec9d90..ca5ea84666 100644
--- a/frappe/public/js/frappe/ui/toolbar/search.js
+++ b/frappe/public/js/frappe/ui/toolbar/search.js
@@ -403,7 +403,7 @@ frappe.search.SearchDialog = class {
if (result.route_options) {
frappe.route_options = result.route_options;
}
- $result.on("click", e => {
+ $result.on("click", () => {
// this.toggle_minimize();
if (result.onclick) {
result.onclick(result.match);
diff --git a/frappe/public/js/frappe/ui/toolbar/toolbar.js b/frappe/public/js/frappe/ui/toolbar/toolbar.js
index 72665bb0e4..72959d706b 100644
--- a/frappe/public/js/frappe/ui/toolbar/toolbar.js
+++ b/frappe/public/js/frappe/ui/toolbar/toolbar.js
@@ -135,7 +135,7 @@ frappe.ui.toolbar.Toolbar = class {
}
}
-}
+};
$.extend(frappe.ui.toolbar, {
add_dropdown_button: function(parent, label, click, icon) {
diff --git a/frappe/public/js/frappe/ui/tree.js b/frappe/public/js/frappe/ui/tree.js
index 23eb01b28b..1308c3931c 100644
--- a/frappe/public/js/frappe/ui/tree.js
+++ b/frappe/public/js/frappe/ui/tree.js
@@ -274,12 +274,12 @@ frappe.ui.Tree = class {
node.$tree_link.hover(
function() {
- $(this).parent().addClass('hover-active')
+ $(this).parent().addClass('hover-active');
},
function() {
- $(this).parent().removeClass('hover-active')
+ $(this).parent().removeClass('hover-active');
},
- )
+ );
}
get_toolbar(node) {
diff --git a/frappe/public/js/frappe/utils/common.js b/frappe/public/js/frappe/utils/common.js
index d8142c43ab..f0be6bbc3d 100644
--- a/frappe/public/js/frappe/utils/common.js
+++ b/frappe/public/js/frappe/utils/common.js
@@ -49,7 +49,7 @@ frappe.get_avatar = function(user, css_class, title, image_url=null, remove_colo
let style = '';
if (!remove_color) {
let color = frappe.get_palette(title);
- style = `background-color: var(${color[0]}); color: var(${color[1]})`
+ style = `background-color: var(${color[0]}); color: var(${color[1]})`;
}
if (css_class === 'avatar-small' || css_class == 'avatar-xs') {
@@ -61,7 +61,7 @@ frappe.get_avatar = function(user, css_class, title, image_url=null, remove_colo
${abbr}
`;
- }
+ };
}
frappe.avatar_group = function (users, limit=4, options = {}) {
@@ -127,7 +127,7 @@ frappe.palette = [
['--yellow-avatar-bg', '--yellow-avatar-color'],
['--purple-avatar-bg', '--purple-avatar-color'],
['--gray-avatar-bg', '--gray-avatar-color0']
-]
+];
frappe.get_palette = function (txt) {
var idx = cint((parseInt(md5(txt).substr(4, 2), 16) + 1) / 5.33);
@@ -182,7 +182,7 @@ window.strip_html = function(txt) {
window.strip = function (s, chars) {
if (s) {
- var s = lstrip(s, chars)
+ var s = lstrip(s, chars);
s = rstrip(s, chars);
return s;
}
diff --git a/frappe/public/js/frappe/utils/dashboard_utils.js b/frappe/public/js/frappe/utils/dashboard_utils.js
index c10dee35b0..85a4048a47 100644
--- a/frappe/public/js/frappe/utils/dashboard_utils.js
+++ b/frappe/public/js/frappe/utils/dashboard_utils.js
@@ -4,7 +4,7 @@ frappe.dashboard_utils = {
let icon_html = '', filter_class = '';
if (filter.icon) {
- icon_html = frappe.utils.icon(filter.icon)
+ icon_html = frappe.utils.icon(filter.icon);
}
if (filter.class) {
diff --git a/frappe/public/js/frappe/utils/utils.js b/frappe/public/js/frappe/utils/utils.js
index 098ae2a400..2bf71dfd54 100644
--- a/frappe/public/js/frappe/utils/utils.js
+++ b/frappe/public/js/frappe/utils/utils.js
@@ -1102,7 +1102,7 @@ Object.assign(frappe.utils, {
for (let key in custom_options) {
if (typeof chart_args[key] === 'object' && typeof custom_options[key] === 'object') {
- chart_args[key] = Object.assign(chart_args[key], custom_options[key])
+ chart_args[key] = Object.assign(chart_args[key], custom_options[key]);
} else {
chart_args[key] = custom_options[key];
}
@@ -1112,7 +1112,7 @@ Object.assign(frappe.utils, {
},
generate_route(item) {
- const type = item.type.toLowerCase()
+ const type = item.type.toLowerCase();
if (type === "doctype") {
item.doctype = item.name;
}
diff --git a/frappe/public/js/frappe/views/breadcrumbs.js b/frappe/public/js/frappe/views/breadcrumbs.js
index 4f2a9d2163..a5aef70591 100644
--- a/frappe/public/js/frappe/views/breadcrumbs.js
+++ b/frappe/public/js/frappe/views/breadcrumbs.js
@@ -54,7 +54,7 @@ frappe.breadcrumbs = {
var breadcrumbs = this.all[frappe.breadcrumbs.current_page()];
this.clear();
- if(!breadcrumbs) return this.toggle(false);
+ if (!breadcrumbs) return this.toggle(false);
if (breadcrumbs.type === 'Custom') {
this.set_custom_breadcrumbs(breadcrumbs);
@@ -87,7 +87,7 @@ frappe.breadcrumbs = {
}
if (breadcrumbs.workspace) {
- if(!breadcrumbs.module_info.blocked && frappe.visible_modules.includes(breadcrumbs.module_info.module)) {
+ if (!breadcrumbs.module_info.blocked && frappe.visible_modules.includes(breadcrumbs.module_info.module)) {
$(`${__(breadcrumbs.workspace)}`)
.appendTo(this.$breadcrumbs);
}
@@ -104,7 +104,7 @@ frappe.breadcrumbs = {
if (from_module) {
breadcrumbs.module = from_module;
- } else if(this.preferred[breadcrumbs.doctype]!==undefined) {
+ } else if (this.preferred[breadcrumbs.doctype]!==undefined) {
// get preferred module for breadcrumbs
breadcrumbs.module = this.preferred[breadcrumbs.doctype];
}
@@ -138,7 +138,7 @@ frappe.breadcrumbs = {
route = doctype_route;
}
$(`${doctype}`)
- .appendTo(this.$breadcrumbs)
+ .appendTo(this.$breadcrumbs);
}
},
@@ -162,7 +162,7 @@ frappe.breadcrumbs = {
},
setup_modules() {
- if(!frappe.visible_modules) {
+ if (!frappe.visible_modules) {
frappe.visible_modules = $.map(frappe.boot.allowed_workspaces, (m) => {
return m.module;
});
diff --git a/frappe/public/js/frappe/views/calendar/calendar.js b/frappe/public/js/frappe/views/calendar/calendar.js
index dd6fa0f4eb..3d7d1a0bf6 100644
--- a/frappe/public/js/frappe/views/calendar/calendar.js
+++ b/frappe/public/js/frappe/views/calendar/calendar.js
@@ -7,7 +7,6 @@ frappe.provide("frappe.views.calendars");
frappe.views.CalendarView = class CalendarView extends frappe.views.ListView {
static load_last_view() {
const route = frappe.get_route();
- console.log(route);
if (route.length === 3) {
const doctype = route[1];
const user_settings = frappe.get_user_settings(doctype)['Calendar'] || {};
@@ -198,7 +197,7 @@ frappe.views.Calendar = Class.extend({
this.$wrapper.find('.fc-today-button')
.prepend(frappe.utils.icon('today'));
- this.$wrapper.find('.fc-day-number').wrap('')
+ this.$wrapper.find('.fc-day-number').wrap('');
var btn_group = this.$wrapper.find(".fc-button-group");
btn_group.find(".fc-state-active").addClass("active");
@@ -206,7 +205,7 @@ frappe.views.Calendar = Class.extend({
btn_group.find(".btn").on("click", function() {
btn_group.find(".btn").removeClass("active");
$(this).addClass("active");
- })
+ });
},
field_map: {
"id": "name",
diff --git a/frappe/public/js/frappe/views/factory.js b/frappe/public/js/frappe/views/factory.js
index 34dab6aad8..ef7f403541 100644
--- a/frappe/public/js/frappe/views/factory.js
+++ b/frappe/public/js/frappe/views/factory.js
@@ -13,7 +13,7 @@ frappe.views.Factory = class Factory {
var page_name = frappe.get_route_str(),
me = this;
- if(frappe.pages[page_name]) {
+ if (frappe.pages[page_name]) {
frappe.container.change_to(page_name);
if(me.on_show) {
me.on_show();
diff --git a/frappe/public/js/frappe/views/formview.js b/frappe/public/js/frappe/views/formview.js
index 87ec67650c..5d2d4ec303 100644
--- a/frappe/public/js/frappe/views/formview.js
+++ b/frappe/public/js/frappe/views/formview.js
@@ -26,7 +26,7 @@ frappe.views.FormFactory = class FormFactory extends frappe.views.Factory {
frappe.model.with_doc('DocType Layout', frappe.router.doctype_layout, () => {
this.make_form(doctype);
this.show_doc(route);
- })
+ });
} else {
this.make_form(doctype);
this.show_doc(route);
diff --git a/frappe/public/js/frappe/views/kanban/kanban_board.js b/frappe/public/js/frappe/views/kanban/kanban_board.js
index c23993f3f2..66ae842ae7 100644
--- a/frappe/public/js/frappe/views/kanban/kanban_board.js
+++ b/frappe/public/js/frappe/views/kanban/kanban_board.js
@@ -605,7 +605,7 @@ frappe.provide("frappe.views");
doctype: card.doctype,
docname: card.name,
callback: function() {
- const users = self.assign_to_dialog.get_values().assign_to;;
+ const users = self.assign_to_dialog.get_values().assign_to;
card.assigned_list = [...new Set(card.assigned_list.concat(users))];
fluxify.doAction('update_card', card);
}
diff --git a/frappe/public/js/frappe/views/kanban/kanban_view.js b/frappe/public/js/frappe/views/kanban/kanban_view.js
index 58b8314a49..52f2803e3d 100644
--- a/frappe/public/js/frappe/views/kanban/kanban_view.js
+++ b/frappe/public/js/frappe/views/kanban/kanban_view.js
@@ -216,7 +216,7 @@ frappe.views.KanbanView.get_kanbans = function (doctype) {
function get_kanban_boards() {
return frappe.call('frappe.desk.doctype.kanban_board.kanban_board.get_kanban_boards', { doctype })
.then(r => r.message);
- }
+ };
}
@@ -263,7 +263,7 @@ frappe.views.KanbanView.show_kanban_dialog = function (doctype, show_existing) {
} else {
frappe.set_route(kanbans.find(kanban => kanban.name == values.selected_kanban).route);
}
- }
+ };
dialog = new frappe.ui.Dialog({
title: __('New Kanban Board'),
diff --git a/frappe/public/js/frappe/views/reports/query_report.js b/frappe/public/js/frappe/views/reports/query_report.js
index 8d9831b158..834946b437 100644
--- a/frappe/public/js/frappe/views/reports/query_report.js
+++ b/frappe/public/js/frappe/views/reports/query_report.js
@@ -152,20 +152,20 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
add_chart_buttons_to_toolbar(show) {
if (show) {
- this.create_chart_button && this.create_chart_button.remove()
+ this.create_chart_button && this.create_chart_button.remove();
this.create_chart_button = this.page.add_button(__("Set Chart"), () => {
this.open_create_chart_dialog();
});
if (this.chart_fields || this.chart_options) {
- this.add_to_dashboard_button && this.add_to_dashboard_button.remove()
+ this.add_to_dashboard_button && this.add_to_dashboard_button.remove();
this.add_to_dashboard_button = this.page.add_button(__("Add Chart to Dashboard"), () => {
this.add_chart_to_dashboard();
});
}
} else {
- this.create_chart_button && this.create_chart_button.remove()
- this.add_to_dashboard_button && this.add_to_dashboard_button.remove()
+ this.create_chart_button && this.create_chart_button.remove();
+ this.add_to_dashboard_button && this.add_to_dashboard_button.remove();
}
}
@@ -465,7 +465,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
this.clear_filters();
const { filters = [] } = this.report_settings;
- let filter_area = this.page.page_form;s
+ let filter_area = this.page.page_form;
this.filters = filters.map(df => {
if (df.fieldtype === 'Break') return;
@@ -660,7 +660,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
}
add_prepared_report_buttons(doc) {
- if(doc){
+ if (doc) {
this.page.add_inner_button(__("Download Report"), function (){
window.open(
frappe.urllib.get_full_url(
@@ -791,7 +791,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
this.toggle_primary_button_disabled(true);
let mandatory = this.filters.filter(f => f.df.reqd);
let missing_mandatory = mandatory.filter(f => !f.get_value());
- if (!missing_mandatory.length){
+ if (!missing_mandatory.length) {
let filters = this.get_filter_values(true);
return new Promise(resolve => frappe.call({
method: 'frappe.desk.query_report.background_enqueue_run',
diff --git a/frappe/public/js/frappe/views/reports/report_view.js b/frappe/public/js/frappe/views/reports/report_view.js
index ee43b6a437..5f96a8841b 100644
--- a/frappe/public/js/frappe/views/reports/report_view.js
+++ b/frappe/public/js/frappe/views/reports/report_view.js
@@ -727,8 +727,8 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
let fields_to_add = this.fields.filter(df => {
return !table_fields.find((field) => {
return df[0] == field[0] && df[1] == field[1]
- })
- })
+ });
+ });
// rebuild fields
this.fields = [...fields_already_in_table, ...fields_to_add];
diff --git a/frappe/public/js/frappe/views/treeview.js b/frappe/public/js/frappe/views/treeview.js
index ff9c2a05c2..dd17e17942 100644
--- a/frappe/public/js/frappe/views/treeview.js
+++ b/frappe/public/js/frappe/views/treeview.js
@@ -365,7 +365,7 @@ frappe.views.TreeView = Class.extend({
if (!this.opts.disable_add_node && this.can_create) {
me.page.set_primary_action(__("New"), function() {
me.new_node();
- }, "add")
+ }, "add");
}
},
set_menu_item: function(){
diff --git a/frappe/public/js/frappe/views/workspace/workspace.js b/frappe/public/js/frappe/views/workspace/workspace.js
index 3b78bf9c4c..0aa1e9b361 100644
--- a/frappe/public/js/frappe/views/workspace/workspace.js
+++ b/frappe/public/js/frappe/views/workspace/workspace.js
@@ -85,8 +85,7 @@ frappe.views.Workspace = class Workspace {
}
build_sidebar_section(title, items) {
- let sidebar_section = $(`
-
`)
+ let sidebar_section = $(``);
// DO NOT REMOVE: Comment to load translation
// __("Modules") __("Domains") __("Places") __("Administration")
@@ -119,7 +118,7 @@ frappe.views.Workspace = class Workspace {
items.forEach(item => make_sidebar_category_item(item));
- sidebar_section.appendTo(this.sidebar)
+ sidebar_section.appendTo(this.sidebar);
}
show_page(page) {
@@ -151,7 +150,7 @@ frappe.views.Workspace = class Workspace {
customize() {
if (this.current_page && this.current_page.allow_customization) {
- this.page.clear_menu()
+ this.page.clear_menu();
this.current_page.customize();
this.page.set_primary_action(
@@ -164,7 +163,7 @@ frappe.views.Workspace = class Workspace {
},
null,
__("Saving")
- )
+ );
this.page.set_secondary_action(
__("Discard"),
@@ -175,7 +174,7 @@ frappe.views.Workspace = class Workspace {
this.page.clear_secondary_action();
this.setup_dropdown();
}
- )
+ );
}
}
@@ -317,10 +316,10 @@ class DesktopPage {
reset_customization() {
frappe.call('frappe.desk.desktop.reset_customization', {
page: this.page_name
- }).then(res => {
+ }).then(() => {
frappe.show_alert({ message: __("Removed page customizations"), indicator: "green" });
this.reload();
- })
+ });
}
make_onboarding() {
diff --git a/frappe/public/js/frappe/widgets/base_widget.js b/frappe/public/js/frappe/widgets/base_widget.js
index f37b6d9f1f..9bbfb916e5 100644
--- a/frappe/public/js/frappe/widgets/base_widget.js
+++ b/frappe/public/js/frappe/widgets/base_widget.js
@@ -118,10 +118,10 @@ export default class Widget {
let title = max_chars ? frappe.ellipsis(base, max_chars) : base;
if (this.icon) {
- let icon = frappe.utils.icon(this.icon)
+ let icon = frappe.utils.icon(this.icon);
this.title_field[0].innerHTML = `${icon} ${title}`;
} else {
- this.title_field[0].innerHTML = title
+ this.title_field[0].innerHTML = title;
if (max_chars) {
this.title_field[0].setAttribute('title', this.label);
}
diff --git a/frappe/public/js/frappe/widgets/chart_widget.js b/frappe/public/js/frappe/widgets/chart_widget.js
index ffba0ad6ed..361a135555 100644
--- a/frappe/public/js/frappe/widgets/chart_widget.js
+++ b/frappe/public/js/frappe/widgets/chart_widget.js
@@ -244,7 +244,6 @@ export default class ChartWidget extends Widget {
reqd: 1,
change: () => {
let selected_date_range = this.date_range_field.get_value();
- console.log('selected', selected_date_range);
this.selected_from_date = selected_date_range[0];
this.selected_to_date = selected_date_range[1];
@@ -585,7 +584,7 @@ export default class ChartWidget extends Widget {
let custom_options = JSON.parse(options);
for (let key in custom_options) {
if (typeof chart_args[key] === 'object' && typeof custom_options[key] === 'object') {
- chart_args[key] = Object.assign(chart_args[key], custom_options[key])
+ chart_args[key] = Object.assign(chart_args[key], custom_options[key]);
} else {
chart_args[key] = custom_options[key];
}
diff --git a/frappe/public/js/frappe/widgets/links_widget.js b/frappe/public/js/frappe/widgets/links_widget.js
index e137bdc425..05280a22c8 100644
--- a/frappe/public/js/frappe/widgets/links_widget.js
+++ b/frappe/public/js/frappe/widgets/links_widget.js
@@ -65,7 +65,7 @@ export default class LinksWidget extends Widget {
name: item.link_to,
type: item.link_type,
is_query_report: item.is_query_report
- })
+ });
return $(`${step.title}`
- )
+ );
if (step.intro_video_url) {
$(``)
@@ -99,14 +99,14 @@ export default class OnboardingWidget extends Widget {
.appendTo(this.step_footer)
.on('click', () => actions[step.action](step));
}
- }
+ };
const toggle_video = () => {
this.step_body.empty();
this.step_footer.empty();
const video = $(``);
- video.appendTo(this.step_body)
+ video.appendTo(this.step_body);
let plyr = new frappe.Plyr(video[0], {
hideControls: true,
resetOnEnd: true,
@@ -122,12 +122,12 @@ export default class OnboardingWidget extends Widget {
// Fire only once, on hashchange
$(window).one('hashchange', () => {
plyr.pause();
- })
+ });
$(``)
.appendTo(this.step_footer)
.on('click', toggle_content);
- }
+ };
toggle_content();
// toggle_video();
@@ -136,8 +136,8 @@ export default class OnboardingWidget extends Widget {
go_to_page(step) {
this.mark_complete(step);
frappe.set_route(step.path).then(() => {
- let message = step.callback_message || __("You can continue with the onboarding after exploring this page")
- let title = step.callback_title || __("Awesome Work")
+ let message = step.callback_message || __("You can continue with the onboarding after exploring this page");
+ let title = step.callback_title || __("Awesome Work");s
let msg_dialog = frappe.msgprint({
message: message,
diff --git a/frappe/public/js/frappe/widgets/widget_group.js b/frappe/public/js/frappe/widgets/widget_group.js
index 057b3abdfc..20a8e14540 100644
--- a/frappe/public/js/frappe/widgets/widget_group.js
+++ b/frappe/public/js/frappe/widgets/widget_group.js
@@ -39,7 +39,7 @@ export default class WidgetGroup {
make() {
this.make_container();
if (this.title) {
- this.set_title()
+ this.set_title();
} else {
this.title_area.remove();
}