Oracle Apex默认添加行IG按钮

huangapple go评论49阅读模式
英文:

Oracle Apex Color DefaultAdd Row IG Button

问题

有没有办法为交互式网格中的“添加行/编辑”按钮着色?

基本上,就像我们可以对页面按钮做的那样,将其更改为热按钮。

英文:

Is there a way to colour the Add Row/Edit buttons which are part of the Interactive Grid?

Basically change it to Hot button, what we can do with the page buttons.

答案1

得分: 1

以下是翻译好的内容:

在您的 IG 区域 > 属性 > 初始化 JavaScript 函数中,可以添加用于 IG 的配置 JavaScript。在网上有很多关于这方面的示例,这里是一个示例:

function (config)
{
    var $ = apex.jQuery,
        toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();

    saveAction = toolbarData.toolbarFind("save");
    // 仅图标,没有标签
    // saveAction.iconOnly = true;
    // 图标位置
    saveAction.iconBeforeLabel = true;
    // 使用 Apex 图标字体,前缀为 "fa"
    saveAction.icon = "icon-ig-save";
    // 自定义标签
    saveAction.label = "保存";
    // 热键
    saveAction.hot = false;
    config.toolbarData = toolbarData;

  return config;
}

官方文档 对这个主题也有很好的说明。

英文:

In your IG region > Attributes > Initialization Javascript Function it's possible to add config javascript for the IG. There are plenty of examples on the web of this, here is one example.

function (config)
{
    var $ = apex.jQuery,
        toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();

    saveAction    = toolbarData.toolbarFind("save");
    // only icon, no label
    // saveAction.iconOnly = true;
    // icon location
    saveAction.iconBeforeLabel = true;
    // to use font apex icons, prefix with "fa"
    saveAction.icon ="icon-ig-save";
    // custom label
    saveAction.label = "Save it baby !";
    // hot or not
    saveAction.hot = false;
    config.toolbarData = toolbarData;

  return config;
}


Official docs are also pretty good on this subject

huangapple
  • 本文由 发表于 2023年6月29日 14:53:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/76578669.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定