Table-Images for “child-link” buttons issue

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
iwilliams
Posts: 27
Joined: 2020-10-24 15:10

Table-Images for “child-link” buttons issue

Post by iwilliams » 2021-01-19 15:17

Hi I have just started using the Appgini Helper Javascript Library(version 2020.10.26.1) to smarten up my website. I am trying to use the above feature to a) use original icons on the child tables and b) move the buttons to the top left of the screen and in the order that they are defined in the AppGini app. Unfortunately, none of the above seem to be working. I have followed the code to the letter in the documentation by copying/pasting it into hooks/header-extras.php. The section that changes the title on all screen is working fine.

I don't appear to be receiving any error messages in inspect/console, only confirmation that it has recognised the AppGini Helper Jacascript library. When compared to the "before" situation the only difference seems to be that I have lost the icons that were there.

My hooks/header-extras.php currently looks like this (The company name has been redacted):-

Code: Select all

<script src="hooks/AppGiniHelper.min.js"></script>
<script>
//	Set header on all screen in the system
  new AppGiniCommon()
    .setIcon("time", "text-danger")
	.setTitle("<b>XXXXXXXX XXXX</b> Time Sheet System");
</script>
<script>
// new since 2020/10 - Tidy up Child Icons and move from top right to top left on all screens
  var dv = AppGiniHelper.DV;
  dv.getChildrenLinks().replaceIcons();
  // ...
</script>
<script>
  const currentMemberID = '<?=getLoggedMemberID()?>';
  const currentGroupID = '<?=get_group_id()?>'
  const currentGroupName = '<?php $mi = getMemberInfo(); echo $mi['group']; ?>';
</script>
This is the result of the change is shown in the screen image attached

I have cleared cache (several times) and am using AppGini 5.92. I'm obviously doing something wrong.

Can anyone help please?
Attachments
Screenshot 2021-01-19 at 15.08.21.png
Screenshot 2021-01-19 at 15.08.21.png (103.76 KiB) Viewed 7769 times

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2021-01-19 22:56

Do those tables exist in the main navbar?
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

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2021-01-19 22:59

https://appgini.bizzworxx.de/products/j ... k-buttons/

I'm asking because there are "known limitations" described in the documentation page.
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

iwilliams
Posts: 27
Joined: 2020-10-24 15:10

Re: Table-Images for “child-link” buttons issue

Post by iwilliams » 2021-01-20 11:57

Firstly, thanks for coming back to me so quickly.

You are correct, the parent table is in the navbar but the child tables are not. I did that as I did not want someone accessing the child table directly. Is there a way of having tables in the navbar but preventing them from accessing them directly?

However, I have tried it with tables that are in the navbar but unfortunately it doesn't seem to be fully working for me. As previously mentioned, I placed the code in the hooks/header-extras.php file (which didn't appear to work) and in addition have placed it into the parent table js file (hooks/Student-dv.js), without the script commands, which seems to work partially. The console log was clear of errors and I cleared cache beforehand. Just to clarify, I have the commands in both files now.

When I say partially working, an icon is now appearing in the button at the top right for one table but not the other. The buttons have not moved to the top left and displayed in the order set in the AppGini app.

Please see an image showing the situation and the list of tables in the navbar.
Attachments
Screenshot 2021-01-20 at 11.48.52.png
Screenshot 2021-01-20 at 11.48.52.png (129.98 KiB) Viewed 7737 times

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2021-01-20 12:51

Please send the following to [email protected]:

(1) your ordernumber
(2) your email addres which has been used on purchase

Gonna send a workaround by email.
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

iwilliams
Posts: 27
Joined: 2020-10-24 15:10

Re: Table-Images for “child-link” buttons issue

Post by iwilliams » 2021-01-20 16:04

Thank you. I have done that

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

Re: Table-Images for “child-link” buttons issue

Post by onoehring » 2021-01-21 05:46

Hi,

even though Jan is on it already, I am wondering if
You are correct, the parent table is in the navbar but the child tables are not. I did that as I did not want someone accessing the child table directly. Is there a way of having tables in the navbar but preventing them from accessing them directly?
is not simply done on AG by setting the appropriate checkbox:
l22.png
l22.png (111.71 KiB) Viewed 7707 times
Olaf

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2021-01-21 06:46

@Olaf: If we hide it from nav menu, then the table-image for that specific table will not be available in DOM after load.
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

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

Re: Table-Images for “child-link” buttons issue

Post by onoehring » 2021-01-21 07:11

Hi,

ok. As far as I understood, he want's no links in the navbar to the pages, but want's to show them as register-children.
Like in the image: Not show the one in the drop down menu, but the register. Of course, I might be wrong.
This idea does not seem to strange for me, so I wonder why this should not be possible.
l21.png
l21.png (30.3 KiB) Viewed 7697 times
Olaf

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2021-01-21 07:55

@Olaf:
We are talking about this icon ...

chrome_p0hvBmZUYG.png
chrome_p0hvBmZUYG.png (15.14 KiB) Viewed 7695 times

... which has not been replaced by .replaceIcons() function call due to the "known limitations" documented here: https://appgini.bizzworxx.de/products/j ... k-buttons/
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

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2021-01-21 07:56

Workaround which I have already added to the docs and already sent to him by email:

Code: Select all

<script>

    AppGiniHelper.Defaults.dv_childrenLinks_replaceIcons = true;
    AppGiniHelper.dv.getChildrenLinks().replaceIcons();
     
</script>
Docs: https://appgini.bizzworxx.de/products/j ... k-buttons/
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

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

Re: Table-Images for “child-link” buttons issue

Post by onoehring » 2021-01-21 08:02

Hi,

I am sorry, I put in a little confusion. Pleas appoligize.
Great, the problem is solved and you posted a workaround.

Olaf

iwilliams
Posts: 27
Joined: 2020-10-24 15:10

Re: Table-Images for “child-link” buttons issue

Post by iwilliams » 2021-01-21 11:40

Many thanks. My problem has been solved.

rpierce
Veteran Member
Posts: 271
Joined: 2018-11-26 13:55
Location: Washington State

Re: Table-Images for “child-link” buttons issue

Post by rpierce » 2023-03-27 04:13

Is there a way to show tool tips when a use hovers over the button?

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2023-03-27 06:43

Well, there is no tooltip by default. At least I don't have tooltips...

chrome_cY1ZyngPIF.png
chrome_cY1ZyngPIF.png (3.26 KiB) Viewed 5652 times

...nor can I see any title-attribute in generated HTML code:

Code: Select all

<a class="hidden-xs btn btn-default btn-lg pull-right hspacer-sm vspacer-sm" href="notes_view.php?filterer_project_id=1&amp;" id="notes_link"><img src="resources/table_icons/note.png"> Notes</a>
But if you know the link's id, you can use Javascript and easily add a title-attribute:

Code: Select all

jQuery('#notes_link').attr("title", "My custom tooltip");
chrome_6PssEpLANF.png
chrome_6PssEpLANF.png (9.34 KiB) Viewed 5652 times
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

rpierce
Veteran Member
Posts: 271
Joined: 2018-11-26 13:55
Location: Washington State

Re: Table-Images for “child-link” buttons issue

Post by rpierce » 2023-03-27 14:54

Thank you for the quick reply Jan! Can you tell me which file I need to add the above code to?

Thanks for your help. I love the Appgini Helper by the way.

Ray

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2023-03-27 15:13

Can you tell me which file I need to add the above code to?
Any auto-loaded file which can execute javascript should work.

For example inside a <script>-tag on document.ready in hooks/header-extras.php or in hooks/TABLENAME-dv.js. Both should work. I've tested with hooks/header-extras.php

Remember to change the selector #notes_link to your needs. In my example 'notes' is the table name.
I love the Appgini Helper by the way.
Thank you! I appreciate your feedback!
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

rpierce
Veteran Member
Posts: 271
Joined: 2018-11-26 13:55
Location: Washington State

Re: Table-Images for “child-link” buttons issue

Post by rpierce » 2023-03-27 16:41

Hi again Jan,

I'm doing something wrong. Can you let me know what I need to do differently?

I have entered the following (two separate attempts at getting the ID correct) code into the header-extras.php file:

Code: Select all

<script>

jQuery('#audit_hclink').attr("title", "Workplace Audits");

</script>

Code: Select all

<script>

jQuery('#xs_audit_link').attr("title", "Workplace Audits");

</script>
I based the button ID on the console clip below:
console1.JPG
console1.JPG (31.83 KiB) Viewed 5633 times

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2023-03-27 17:00

Code: Select all

<script>
// file: hooks/header-extras php
jQuery(function() {
  jQuery('#xs_audit_link').attr("title", "Workplace Audits");
});
</script>
Assuming the id of the button equals "xs_audit_link"
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

rpierce
Veteran Member
Posts: 271
Joined: 2018-11-26 13:55
Location: Washington State

Re: Table-Images for “child-link” buttons issue

Post by rpierce » 2023-03-27 17:19

Jan,

Still no luck. Thanks for your efforts.

Ray

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2023-03-27 17:26

Check for errors in console!

It should work. It is working in my example app.
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

rpierce
Veteran Member
Posts: 271
Joined: 2018-11-26 13:55
Location: Washington State

Re: Table-Images for “child-link” buttons issue

Post by rpierce » 2023-03-27 17:29

Maybe there is a way to include text on the buttons?

rpierce
Veteran Member
Posts: 271
Joined: 2018-11-26 13:55
Location: Washington State

Re: Table-Images for “child-link” buttons issue

Post by rpierce » 2023-03-27 17:32

This console error makes no sense considering the Appgini Helper is working on my app??

Capture.JPG
Capture.JPG (35.07 KiB) Viewed 5624 times

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

Re: Table-Images for “child-link” buttons issue

Post by jsetzer » 2023-03-27 19:08

That error has nothing to do with AG Helper lib.

There is a picture missing.
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

rpierce
Veteran Member
Posts: 271
Joined: 2018-11-26 13:55
Location: Washington State

Re: Table-Images for “child-link” buttons issue

Post by rpierce » 2023-03-27 20:39

Jan,

My bad on the screen shot. I fixed the reference to a PNG file.

Now my console looks like this when I load my app along with the code modifications to header-extras.php for adding tooltips which you provided earlier. I've tried every button ID that seems appropriate based on the results of the inspect tool in Chrome:
Capture.JPG
Capture.JPG (58.86 KiB) Viewed 5608 times
I've tried the following code to get Tooltips. Chrome Inspect element tool shows 3 different ID's to choose from. Since I'm not certain which is which, I tried all of them The only change in the three snippets is the button id name:

Code: Select all

<script>
// file: hooks/header-extras php
jQuery(function() {
  jQuery('#xs_audit_link').attr("title", "Workplace Audits");
});
</script>
And

Code: Select all

<script>
// file: hooks/header-extras php
jQuery(function() {
  jQuery('#audit_hclink').attr("title", "Workplace Audits");
});
</script>

And

Code: Select all

<script>
// file: hooks/header-extras php
jQuery(function() {
  jQuery('#audit__link').attr("title", "Workplace Audits");
});
</script>
One thing I've learned, it's usually something I did. But figuring out what I did (or didn't do) is the hard part.

Post Reply