How to make Custom Tab work?

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
Post Reply
ppfoong
Veteran Member
Posts: 52
Joined: 2021-07-13 16:46

How to make Custom Tab work?

Post by ppfoong » 2024-09-04 08:44

I have a table m_title containing the following fields which I want to put in a Custom Tab: created_by, created_on, edited_by, edited_on.

I have put AppGiniHelper.min.js in the hooks directory.

I have added the following in hooks/header-extras.php

Code: Select all

<script src="hooks/AppGiniHelper.min.js"></script>
and I have created a new file hooks/m_title-dv.js with this content

Code: Select all

var dv = AppGiniHelper.DV;
var tab = dv.addTab( "tabMeta", "Metadata", "cog", ["created_by","created_on","edited_by","edited_on"]);
dv.getTabs().setPosition(TabPosition.Bottom);
tabMeta.activate();
but nothing happen.

What step is missing?

ppfoong
Veteran Member
Posts: 52
Joined: 2021-07-13 16:46

Re: How to make Custom Tab work?

Post by ppfoong » 2024-09-04 08:52

Additional info...
Snipaste_2024-09-04_16-50-59.png
Snipaste_2024-09-04_16-50-59.png (12.73 KiB) Viewed 215 times

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1891
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: How to make Custom Tab work?

Post by jsetzer » 2024-09-04 09:59

(1) As always: any errors in console?
According to the error message in console, there is an unexpected dot character in line 3. But according to your code, I cannot see any in line 3. So, this leads me to some cache problem, please see below.

(2) error in your code:
tabMeta.activate();
You have named the variable tab but later on you try to access a variable tabMeta. I'm pretty sure there is an error message in console.

(3) Could be a caching problem of your browser. Are you sure your browser loads the latest script version? Always reload without cache after changing .js or .css files.
There is a troubleshooting guide which also handles caching.

(4) Please try with the first two lines, first, to see if it works at all.

That is what I can see at the moment.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

ppfoong
Veteran Member
Posts: 52
Joined: 2021-07-13 16:46

Re: How to make Custom Tab work?

Post by ppfoong » 2024-09-04 12:30

Thanks.

It works after changing the variable name to be the same at line 2 and line 4.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1891
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: How to make Custom Tab work?

Post by jsetzer » 2024-09-04 16:10

I'm happy I could help and I'm glad it works as expected.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

ppfoong
Veteran Member
Posts: 52
Joined: 2021-07-13 16:46

Re: How to make Custom Tab work?

Post by ppfoong » 2024-09-05 07:16

Hi jsetzer,

May I know what is the effective method to clear cache for one site in MS Edge?

I tried Developer Mode > Network > Disable cache, but it seems not working well.

Currently I'm using Incognito/InPrivate mode as workaround.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1891
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: How to make Custom Tab work?

Post by jsetzer » 2024-09-05 07:34

what is the effective method to clear cache for one site in MS Edge
chrome_eXHNXajPhR.png
chrome_eXHNXajPhR.png (45.21 KiB) Viewed 190 times

tl;dr
CTRL + F5

See also
My troubleshooting guide here:
https://appgini.bizzworxx.de/support/troubleshooting/

Tip
In dev-tools (F12) I always have that option [X] Disable cache checked:
chrome_zzbCX21YYR.png
chrome_zzbCX21YYR.png (20.46 KiB) Viewed 190 times
So, whenever opening dev-tools, I can be pretty sure, latest CSS and JS files are loaded.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

ppfoong
Veteran Member
Posts: 52
Joined: 2021-07-13 16:46

Re: How to make Custom Tab work?

Post by ppfoong » 2024-09-06 05:09

Thanks a lot.

Post Reply