ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
with_load_anim.php
Go to the documentation of this file.
1
<?php
9
function
with_load_anim
()
10
{
11
global
$DIC
;
12
$f
= $DIC->ui()->factory();
13
$renderer = $DIC->ui()->renderer();
14
15
return
$renderer->render(
16
//Create a button with the LoadingAnimation on click and some additional JS-Magic.
17
$f
->button()->standard(
"Do Something"
,
""
)
18
->withLoadingAnimationOnClick(
true
)
19
->withOnLoadCode(
function
($id) {
20
return
21
"$('#$id').click(function(e) {
22
$('#$id').html('Working...');
23
setInterval(
24
function(){
25
$('#$id').html('Done');
26
il.UI.button.deactivateLoadingAnimation('$id');
27
}
28
,3000);
29
});"
;
30
})
31
);
32
}
with_load_anim
with_load_anim()
Definition:
with_load_anim.php:2
Vendor\Package\$f
$f
Definition:
example_cleaned.php:31
$DIC
global $DIC
Definition:
goto.php:24
src
UI
examples
Button
Standard
with_load_anim.php
Generated on Wed Sep 3 2025 21:01:46 for ILIAS by
1.8.13 (using
Doxyfile
)