style: be able to return more color names from calender view
This commit is contained in:
parent
62f90cb81d
commit
76be4a6c84
1 changed files with 2 additions and 2 deletions
|
|
@ -120,7 +120,6 @@ frappe.views.Calendar = class Calendar {
|
|||
success: "green",
|
||||
warning: "orange",
|
||||
default: "blue",
|
||||
notice: "yellow",
|
||||
};
|
||||
this.get_default_options();
|
||||
}
|
||||
|
|
@ -421,7 +420,8 @@ frappe.views.Calendar = class Calendar {
|
|||
prepare_colors(d) {
|
||||
let color, color_name;
|
||||
if (this.get_css_class) {
|
||||
color_name = this.color_map[this.get_css_class(d)] || "blue";
|
||||
color_name = this.get_css_class(d);
|
||||
color_name = this.color_map[color_name] || color_name || "blue";
|
||||
|
||||
if (color_name.startsWith("#")) {
|
||||
color_name = frappe.ui.color.validate_hex(color_name) ? color_name : "blue";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue