This topic is locked
[SOLVED]

 Additional WHERE tabs . Item-ID / Design

12/27/2018 5:41:19 AM
PHPRunner General questions
T
taumic author

If you create "additional WHERE tabs" in the "QUERY-Definition", these TABS are not displayed in the Designer?! So you don't just get the "ITEM-ID" and can't change the TABS appearance (background color, etc.).

[With the "ITEM-ID" I want to hide the TABS depending on the user group using (pageObj.toggleItem("ITEM-ID", false )).]
If I have overlooked something? Can I simply find this out elsewhere ("ITEM-ID") or change it (design)?
Many thanks for the effort
Michael

Sergey Kornilov admin 12/27/2018

It is correct that you cannot see WHERE tabs in Page Designer. Do you need to change style/background of the tab itself or something else?

T
taumic author 12/27/2018

Hello Sergey,
I need to change the background of the tabs itself.
Best regards
Michael

HJB 12/27/2018

http://asprunner.com/forums/topic/25112-additional-where-tabs-retrieve-active-tab-id/
Though v9.8, hence for inspiration purposes only, it seems to own worthy and useful information,
with best regards from Hamburg City area, Germany, to Bavaria.
Best wishes for a Happy New 2019 already by now. Stay tuned ...

Sergey Kornilov admin 12/27/2018

This code should go to Javascript OnLoad event of the List page in question:
Changing background color of all tabs:

$("ul[class='nav nav-tabs bsgrid_tabs']").find("a").css("background", "#f8f8f8");


Changing background color of active tab only:

$("li[class=active]").find("a").css("background", "#e0e0e0");
T
taumic author 12/28/2018

Many thanks to "Walk2fly" (deleteTab()) and our ADMIN (Javascript). With their help it was easy to implement. Why didn't I stumble over "deleteTab()" myself? - Sorry.
The solution:

  • Set background color for TABs (JavaScript OnLoad Event)


// Change background-color for all WHERE-TABs

$("ul[class='nav nav-tabs bsgrid_tabs']").find("a").css("background", "#98bdd3");
// Change background-color for the active WHERE-TAB

$("li[class=active]").find("a").css("background", "#178ACC");


  • Suppress additional WHERE-TABs if no ADMIN (List Page: Before Prosess)


if ( $_SESSION["administrator"] != "J" )

{

$pageObject->deleteTab("XY_1");

$pageObject->deleteTab("XY_2");

$pageObject->deleteTab("XY_3");

$pageObject->deleteTab("XY_4");

}


And so the new year can come <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=86643&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' /> !
Happy New Year
Especially to Hamburg - Herzlichen Dank!