pccdavef
pccdavef

Reputation: 79

Oracle APEX 5.1.1 Hiding toolbar Actions button

I have a requirement to edit my IG, but the customer does not want to see the "Actions" button. I have been experimenting with a variety of methods to hide the Actions button using CSS (based on the StackOverflow article here) and using javascript based on John Snyders Hacking the IG article and the blog post here but have not been successful.

The CSS code I've used is

#load_sheet button[id="load_sheet_ig_actions_button"] {
  display: none !important
}

where #load_sheet is the static_id name the IG region. I'm using the button id as there is no data-action available as described in the article above.

I've also tried placing the following javascript code in the IG Advanced attribute:

function(config) {
  var $ = apex.jQuery;
  var toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();
  config.toolbarData = toolbarData;
  // toolbarData[3] is the actions1 (Action button) array
  toolbarData[3]['hide'] = true;
  return config;
}

Is there a way of hiding the "Actions" button while still showing the "Edit" and "Save" buttons?

Thanks for any assist or ideas.

Upvotes: 1

Views: 3319

Answers (2)

NPP
NPP

Reputation: 1

I just came across this question. Sorry for the late response.

This works fine for me:

#eng_req_ig_toolbar_actions_button {
    display: none !important;
}

where eng_req is the static_id name the IG region.

Upvotes: 0

romeuBraga
romeuBraga

Reputation: 2165

Maybe there is a propertie to set that button to be invisible, but I can't found.

But, toolbarData is an array, so you can remove that button from this array, in this case that button will not be rendered, your code should look like this:

function(config) {    
    var $ = apex.jQuery;
    var toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();
    toolbarData.splice(3,1); //remove actions button
    config.toolbarData = toolbarData;

    return config;
}

Upvotes: 1

Related Questions