Hi
I have created a listview script. It is working but I would like to make the “View Actions” dropdown button a nice blue background ( black letters ).
My code…
frappe.listview_settings['Project'] = {
add_fields: ["status", "priority", "is_active", "percent_complete", "expected_end_date", "project_name"],
onload: function (listview,doc) {
listview.page.add_inner_button(__('View POs'), function () {
let selected_item = listview.get_checked_items();
if (selected_item.length == 1) {
frappe.set_route('List', 'Purchase Order', 'Kanban', 'Pur Ord 1', {
'project': selected_item[0].name
});
} else {
frappe.show_alert({
message: "Please select at least one Porject.",
indicator: "orange"
});
}
}, 'View Actions');
listview.page.add_inner_button(__('View Tsks'), function () {
let selected_item = listview.get_checked_items();
if (selected_item.length >= 1) {
frappe.set_route('List', 'Task', 'Kanban', 'Task 1', {
'project': selected_item[0].name
});
} else {
frappe.show_alert({
message: "Please select at least one Porject.",
indicator: "orange"
});
}
}, 'View Actions');
},
get_indicator: function (doc) {
if (doc.status == "Open" && doc.percent_complete) {
return [__("{0}%", [cint(doc.percent_complete)]), "orange", "pecent_complete,>,0|status,=,Open"];
} else {
return [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status];
}
}
};
Anyone perhaps have a suggestion ?