Colored tabs

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
claudiu111
Posts: 12
Joined: 2014-02-03 12:20

Colored tabs

Post by claudiu111 » 2021-03-19 16:11

Hello everyone.
I added some tabs to my detail view and I was wondering if there is a way to color the tab(like green) when all the fields in that tab are filled in.
Thank you.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Colored tabs

Post by onoehring » 2021-03-20 07:09

Hi,

well, if you are talking about regular tabs which occur when you have lookup fields and are shown in the bottom of the details page, I see two different problems:
a) color
b) "when all the fields in that tab are filled in"

In my opinion b) is the much bigger problem. As child-tabs can contain have unlimited records, how should be defined "all fields are filled in"? Either you force the user to enter something into a field or not (AG: required field flag). Even if: What, if in child record 1 something is missing, but in child record 2 all fields are filled? You will need to make up your mind how you want to handle this.

The other a) can probably be done using JS/jquery. I quickly tried using the debug view and it seems pretty doable. See screenshots. Of course, in "real live" you will need some code that probably attaches some CSS class to the a-href
colored_tab.png
colored_tab.png (2.79 KiB) Viewed 1052 times
Code:
code.png
code.png (6.47 KiB) Viewed 1052 times

So, if you have made up your mind for b), you can probably design some jquery that checks at some interval if your criteria is met and if, it colors the tab.

Olaf

Post Reply