How to disable button link records of child table

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
soewandi
Posts: 17
Joined: 2019-11-20 14:00

How to disable button link records of child table

Post by soewandi » 2020-11-23 11:32

Table 1 = meeting (parent); Table 2=topics (child)
I want to disable updating of child table when in detail view of parent table. What I mean, how to disable button link (on the left side) of every children rows table? Please guide me and thanks in advance.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: How to disable button link records of child table

Post by pbottcher » 2020-11-26 22:38

Hi,
you need to check that the child table exists (as it is loaded after side creation). Once the table is available you can use js to remove the links.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

soewandi
Posts: 17
Joined: 2019-11-20 14:00

Re: How to disable button link records of child table

Post by soewandi » 2020-11-27 09:25

Thanks Pascal for your response. I've tried to inspect element but get nothing to find solution. Would you please give me some code. Actually my JS knowledge very little.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: How to disable button link records of child table

Post by pbottcher » 2020-11-28 20:47

Try

Code: Select all

$j(function() {
	function wait_for(data,callback,time=100) {
		if($j(data).length != 0) {
			callback();
			return;
		}
		else {
			setTimeout(function() {
				wait_for(data,callback, time);
			}, time);
		}
	}
	wait_for('.table-striped',function() {
		$j('th:first-child, td:first-child').remove()
	})
})
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

soewandi
Posts: 17
Joined: 2019-11-20 14:00

Re: How to disable button link records of child table

Post by soewandi » 2020-11-29 11:40

Many thanks Pascal. I put your code in meeting-dv.js and working perfect as I want to. Actually that code beyond my knowledge. So without your help, it is impossible I get the solution :) Thank you again.

Post Reply