Page 1 of 1

Arranging custom links to save space on home page

Posted: 2022-07-22 17:34
by rpierce
Is there a way to rearrange home links so that custom links appear in the same row on the home page as table links?? If you look at the image you see the large blank space created in the link section. I want to eliminate this. The "Open Audits" link is to a PHP page, not an AppGini table. It would be nice to see it on the same row as the link above it.

Thanks, Ray
Capture.JPG
Capture.JPG (29.64 KiB) Viewed 1989 times

Re: Arranging custom links to save space on home page

Posted: 2022-07-23 09:55
by pbottcher
Hi,

you can try this in your hooks/footer-extras.php

Code: Select all

<script>
$j(function() {
	$j('.custom_links').prev().last().append($j('.custom_links div:first'));
	$j('.panel-body-description').css('height','auto')	
})
</script>

Re: Arranging custom links to save space on home page

Posted: 2022-07-28 23:16
by rpierce
That didn't do it Pascal.

Re: Arranging custom links to save space on home page

Posted: 2022-07-28 23:24
by AhmedBR
try this instead (a small variation), by the way thanks to pböttcher :D

Code: Select all

<script>
$j(function() {
$j('.custom_links').prev().first().append($j('.custom_links div:first'));
})
</script>
Take a look at this link, might help:
viewtopic.php?f=4&t=4837

Re: Arranging custom links to save space on home page

Posted: 2022-07-29 20:43
by rpierce
Well, when I use that variation the link in question goes into the first Table Group, ignoring the setting in the links-home.php file. Do I need to create the fake table as you talk about in the link you provided also?

Re: Arranging custom links to save space on home page

Posted: 2022-07-29 21:32
by AhmedBR
The easiest way to get full control is creating fake table that act as redirection, since it is automated via Appgini, no coding is required.
This is what I personally use.

Re: Arranging custom links to save space on home page

Posted: 2022-07-30 08:06
by pbottcher
Hi,

thanks for testing. As you may have multiple table-groups you can try

Code: Select all

<script>
$j(function() {
	$j('.custom_links').prev().each(function() {
		$j(this).append($j(this).next().find('div:first'))
	})
	$j('.panel-body-description').css('height','auto')		
})
</script>
This shall append your custom entry to the end of existing tablelist within your table-group.

If you want to add your custom entry to the beginning try

Code: Select all

<script>
$j(function() {
	$j('.custom_links').prev().each(function() {
		$j(this).prepend($j(this).next().find('div:first'))
	})
	$j('.panel-body-description').css('height','auto')		
})
</script>

Re: Arranging custom links to save space on home page

Posted: 2022-08-02 18:21
by mcvaidas
Hi, script is working just everything (custom-links) disappears in mobilemenu (vertical)

Re: Arranging custom links to save space on home page

Posted: 2022-08-06 11:48
by mcvaidas
append is ok, just prepend disappears in mobilemenu
mcvaidas wrote:
2022-08-02 18:21
Hi, script is working just everything (custom-links) disappears in mobilemenu (vertical)

Re: Arranging custom links to save space on home page

Posted: 2022-08-17 12:47
by fdissait
Yes, it works, but only once, if you have two custom links, one is on the first row (that of table f.i.), but the second is on the second row, even is the is place on the first row ....