ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

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

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 }
global $DIC
Definition: goto.php:24