Make dropdown button BLUE

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 ?

Hello, can you share current screenshot of the view

Thank you @ibrahim and welcome. I see its your first post.

I would have to see if I can hide some sensitive information. What is it that you
would want to see, then I can see if I can make a plan ?

Add the below line after the last ‘View Actions’ line

$('button:contains("View Actions")').removeClass('btn-default').addClass('btn-info');

Then reload Ctrl+Shift+R and check it.

Output:

thanks @NCP but he wants a blue so it think this works

$('button:contains("View Actions")').removeClass('btn-default').addClass('btn-primary');
1 Like

If v14 then go with @ibrahim :sweat_smile:.

if v15 then go with my code :wink:

because of theme :grinning:

Thank you @ncp and @ibrahim

I need to put it on both V14 and V15 actually !!! :blush:

I have already put the code from @ncp on my V15 server and it looks good.
Thank you @NCP . I am hoping that soon they will make dropdown button
in “row” ( of listview) available, as you explain in your video @NCP

https://www.youtube.com/watch?v=DiJzio7KYN0&t=2s

Let me do the changes on my V14 server as @ibrahim suggested !

Thank you both for taking the time.
And now I have to mark a post as the solution … !!! :upside_down_face:
I think I must mark the last post from @NCP, as it explains the two options.

Thank you both for taking the time.

:joy::joy: @NCP Noted

Anytime brother @trainingacademy