Merge branch 'develop' into non_negative
This commit is contained in:
commit
d2fc84623a
6 changed files with 36 additions and 39 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue