瀏覽代碼

[fix] Calendar colors

- frappe/erpnext#8455
version-14
Faris Ansari 8 年之前
committed by Nabin Hait
父節點
當前提交
de59f01ff8
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. +4
    -4
      frappe/public/js/frappe/views/calendar/calendar.js

+ 4
- 4
frappe/public/js/frappe/views/calendar/calendar.js 查看文件

@@ -225,15 +225,15 @@ frappe.views.Calendar = Class.extend({
let color;
if(me.get_css_class) {
color = me.color_map[me.get_css_class(d)];
// if invalid, fallback to blue color
if(!Object.values(me.color_map).includes(color)) {
color = "blue";
}
} else {
// color field can be set in {doctype}_calendar.js
// see event_calendar.js
color = d.color;
}
// if invalid, fallback to blue color
if(!Object.values(me.color_map).includes(color)) {
color = "blue";
}
d.className = "fc-bg-" + color;
return d;
});


Loading…
取消
儲存