ILIAS  release_7 Revision v7.30-3-g800a261c036
with_load_anim.php
Go to the documentation of this file.
1 <?php
2 function with_load_anim()
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 }
with_load_anim()
global $DIC
Definition: goto.php:24