This topic is locked

Hide custom buttons in aditional where tabs.

3/1/2022 3:24:21 AM
PHPRunner General questions
V
Vova Zlo author

Hi, I tried to hide custom buttons in additional where tabs in different ways, but anyways works only for original buttons like "delete", "Add new".

I tried:

  1. In before displayif( $pageObject->getCurrentTabId() == "2")
    {
    $pageObject->hideItem("unpaid");
    $pageObject->hideItem("paid");
    }

  2. In in the JavaScript OnLoad event
    var ActiveTABID = $("li[class=active]").find("a").attr("data-tabid");


alert(ActiveTABID);
if (ActiveTABID == 2) {
$("a[id^=paid]").hide();
$("a[id^=unpaid]").hide();
$("a[id^=delete]").hide();
}


Nothing heps.
Guru, Please help me. Tell me what I do wrong?
V
Vova Zlo author 3/1/2022

Sorry, not formatted my post right.
Hi, I tried to hide custom buttons in additional where tabs in different ways, but anyways works only for original buttons like "delete", "Add new".

I tried:

  1. In before displayif( $pageObject->getCurrentTabId() == "2")
    {
    $pageObject->hideItem("unpaid");
    $pageObject->hideItem("paid");
    }

  2. In in the JavaScript OnLoad event

    var ActiveTABID = $("li[class=active]").find("a").attr("data-tabid");
    alert(ActiveTABID);
    if (ActiveTABID == 2) {
    $("a[id^=paid]").hide();
    $("a[id^=unpaid]").hide();
    $("a[id^=delete]").hide();
    }


Nothing heps.
Guru, Please help me. Tell me what I do wrong?