diff --git a/frappe/core/doctype/report/report.js b/frappe/core/doctype/report/report.js index 14e9b3a901..f78fd3e812 100644 --- a/frappe/core/doctype/report/report.js +++ b/frappe/core/doctype/report/report.js @@ -2,7 +2,9 @@ frappe.ui.form.on('Report', { refresh: function(frm) { if (frm.doc.is_standard === "Yes" && !frappe.boot.developer_mode) { // make the document read-only - frm.set_read_only(); + frm.disable_form(); + } else { + frm.enable_save(); } let doc = frm.doc; @@ -32,8 +34,6 @@ frappe.ui.form.on('Report', { }); }, doc.disabled ? "fa fa-check" : "fa fa-off"); } - - frm.events.report_type(frm); }, ref_doctype: function(frm) { diff --git a/frappe/desk/doctype/notification_settings/notification_settings.js b/frappe/desk/doctype/notification_settings/notification_settings.js index b8b7f37a4f..88dc145be2 100644 --- a/frappe/desk/doctype/notification_settings/notification_settings.js +++ b/frappe/desk/doctype/notification_settings/notification_settings.js @@ -2,12 +2,19 @@ // For license information, please see license.txt frappe.ui.form.on('Notification Settings', { - onload: () => { + onload: (frm) => { frappe.breadcrumbs.add({ label: __('Settings'), route: '#modules/Settings', type: 'Custom' }); + frm.set_query('subscribed_documents', () => { + return { + filters: { + istable: 0 + } + }; + }); }, refresh: (frm) => { diff --git a/frappe/desk/doctype/notification_settings/notification_settings.json b/frappe/desk/doctype/notification_settings/notification_settings.json index 85f93e156e..fc12022e89 100644 --- a/frappe/desk/doctype/notification_settings/notification_settings.json +++ b/frappe/desk/doctype/notification_settings/notification_settings.json @@ -22,68 +22,52 @@ "default": "1", "fieldname": "enabled", "fieldtype": "Check", - "label": "Enabled", - "show_days": 1, - "show_seconds": 1 + "label": "Enabled" }, { "fieldname": "subscribed_documents", "fieldtype": "Table MultiSelect", - "label": "Subscribed Documents", - "options": "Notification Subscribed Document", - "show_days": 1, - "show_seconds": 1 + "label": "Open Documents", + "options": "Notification Subscribed Document" }, { "fieldname": "column_break_3", "fieldtype": "Section Break", - "label": "Email Settings", - "show_days": 1, - "show_seconds": 1 + "label": "Email Settings" }, { "default": "1", "fieldname": "enable_email_notifications", "fieldtype": "Check", - "label": "Enable Email Notifications", - "show_days": 1, - "show_seconds": 1 + "label": "Enable Email Notifications" }, { "default": "1", "depends_on": "enable_email_notifications", "fieldname": "enable_email_mention", "fieldtype": "Check", - "label": "Mentions", - "show_days": 1, - "show_seconds": 1 + "label": "Mentions" }, { "default": "1", "depends_on": "enable_email_notifications", "fieldname": "enable_email_assignment", "fieldtype": "Check", - "label": "Assignments", - "show_days": 1, - "show_seconds": 1 + "label": "Assignments" }, { "default": "1", "depends_on": "enable_email_notifications", "fieldname": "enable_email_energy_point", "fieldtype": "Check", - "label": "Energy Points", - "show_days": 1, - "show_seconds": 1 + "label": "Energy Points" }, { "default": "1", "depends_on": "enable_email_notifications", "fieldname": "enable_email_share", "fieldtype": "Check", - "label": "Document Share", - "show_days": 1, - "show_seconds": 1 + "label": "Document Share" }, { "default": "__user", @@ -92,23 +76,20 @@ "hidden": 1, "label": "User", "options": "User", - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "default": "0", "fieldname": "seen", "fieldtype": "Check", "hidden": 1, - "label": "Seen", - "show_days": 1, - "show_seconds": 1 + "label": "Seen" } ], "in_create": 1, + "index_web_pages_for_search": 1, "links": [], - "modified": "2020-05-31 22:16:40.798019", + "modified": "2020-11-04 12:54:57.989317", "modified_by": "Administrator", "module": "Desk", "name": "Notification Settings", diff --git a/frappe/public/js/frappe/form/form.js b/frappe/public/js/frappe/form/form.js index 1c1c7b1f01..bb9e8c22d1 100644 --- a/frappe/public/js/frappe/form/form.js +++ b/frappe/public/js/frappe/form/form.js @@ -261,7 +261,7 @@ frappe.ui.form.Form = class FrappeForm { cur_frm = this; if(this.docname) { // document to show - + this.save_disabled = false; // set the doc this.doc = frappe.get_doc(this.doctype, this.docname); diff --git a/frappe/public/js/frappe/views/gantt/gantt_view.js b/frappe/public/js/frappe/views/gantt/gantt_view.js index 6fb4688a48..6ab05be96f 100644 --- a/frappe/public/js/frappe/views/gantt/gantt_view.js +++ b/frappe/public/js/frappe/views/gantt/gantt_view.js @@ -10,7 +10,12 @@ frappe.views.GanttView = class GanttView extends frappe.views.ListView { .then(() => { this.page_title = this.page_title + ' ' + __('Gantt'); this.calendar_settings = frappe.views.calendar[this.doctype] || {}; - if(this.calendar_settings.order_by) { + + if (typeof this.calendar_settings.gantt == 'object') { + Object.assign(this.calendar_settings, this.calendar_settings.gantt); + } + + if (this.calendar_settings.order_by) { this.sort_by = this.calendar_settings.order_by; this.sort_order = 'asc'; } else { diff --git a/frappe/public/js/frappe/views/reports/query_report.js b/frappe/public/js/frappe/views/reports/query_report.js index 53cee5b348..f8bd1cdea8 100644 --- a/frappe/public/js/frappe/views/reports/query_report.js +++ b/frappe/public/js/frappe/views/reports/query_report.js @@ -1043,7 +1043,11 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList { // applied to Float, Currency fields, needed only for currency formatting. // make first data column have value 'Total' let index = 1; - if (this.datatable && this.datatable.options.checkboxColumn) index = 2; + + if (this.report_settings.get_datatable_options) { + let datatable = this.report_settings.get_datatable_options({}); + if (datatable && datatable.checkboxColumn) index = 2; + } if (column.colIndex === index && !value) { value = "Total";