Page 1 of 1

Edit an icon in children-form ??

Posted: 2021-06-15 18:07
by lramirez
Good morning to the appgini community
I want to change an edit icon of the child-forms like
show the example in the picture ... ;)
my problem is that this is how it looks, when reloading another change
to the application, it is modified in the folder: /.../templates/children-f.php
Question: can you put some code in "hooks/" to keep this modification without changing it when re-generating the appgini.
Thanks ;)
1.png
1.png (32.64 KiB) Viewed 1694 times
2.png
2.png (31.74 KiB) Viewed 1694 times
3.png
3.png (29.85 KiB) Viewed 1694 times

Re: Edit an icon in children-form ??

Posted: 2021-06-15 18:32
by pbottcher
Hi,

you can try to put the code into the hooks/TABLENAME-dv.js file

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() {
			var a=$j('.glyphicon-new-window')
			a.after('YOURBUTTONCODEHERE')
			$j('.glyphicon-new-window').remove()
	})
})

Re: Edit an icon in children-form ??

Posted: 2021-06-16 01:58
by lramirez
Thanks, I'll do some tests