ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
with_load_anim.php File Reference

Go to the source code of this file.

Functions

 with_load_anim ()
 

Function Documentation

◆ with_load_anim()

with_load_anim ( )

Definition at line 2 of file with_load_anim.php.

3{
4 global $DIC;
5 $f = $DIC->ui()->factory();
6 $renderer = $DIC->ui()->renderer();
7
8 return $renderer->render(
9 $f->button()->primary("Goto ILIAS", "")
10 ->withLoadingAnimationOnClick(true)
11 ->withOnLoadCode(function ($id) {
12 return
13 "$('#$id').click(function(e) {
14 $('#$id').html('Working...');
15 setInterval(
16 function(){
17 $('#$id').html('Done');
18 il.UI.button.deactivateLoadingAnimation('$id');
19 }
20 ,3000);
21 });";
22 })
23 );
24}
$DIC
Definition: xapitoken.php:46

References $DIC, and Vendor\Package\$f.