Actions Menu Interactive Grid

独自空忆成欢 提交于 2021-02-10 18:02:38

问题


Is there any way to remove 'Chart' from Actions Menu in an Interactive Grid?


回答1:


So I posted a short answer that should have honestly probably been a comment with a link to https://hardlikesoftware.com/weblog/2017/01/24/how-to-hack-apex-interactive-grid-part-2/

Then I had some time and decided to try to actually execute this and got to a solution thanks to https://community.oracle.com/thread/4324589 where they also further reference https://community.oracle.com/thread/4319050

So you know where to go for more information on this topic.

As for your solution:

Go into the Attributes of the IG, Find Javascript Initialization Code under Advanced. Then paste the following code:

function(config) {

    var toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();
    config.toolbarData = toolbarData;
    toolbarData.toolbarRemove( "chart-view" );  
    return config;

}

Hope this works for you, it worked for me.

EDIT:

In response to you asking how to find the name to remove.

Well thats not exactly simple. See if perhaps its mentioned in one of the posts. Otherwise you will have to search through the js file.

How I went about it is that once on the page, I opened up the console and ran $.apex.interactiveGrid.copyDefaultToolbar(); , opened up the returned array, and jumped to the definition of ToolbarRemove. This opened up InteractiveGrid.min.js so I could search there. Then I Ctrl + F there to find "chart".

What you could also do so you arent just searching blindly until you find it is that these labels need to be referenced for translation. So if you go to http://translate-apex.com And you find what the label is called, you can just search for that. For the chart you could go to the translations and find the Chart item which is APEX.IG.CHART. Then in the js you find APEX.IG.CHART which only occurs once, instead of the 10 times "chart" occurs.

EDIT 2:

You asked about the Flashback dialog.

function(config) {

    var toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();
    config.toolbarData = toolbarData;
    toolbarData.toolbarRemove( "show-flashback-dialog" );  
    return config;

}

This works for me




回答2:


Check the attributes of the interactive grid and turn off the "Define chart view"

Check this image



来源:https://stackoverflow.com/questions/62301165/actions-menu-interactive-grid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!