ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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()
$DIC
Definition: xapitoken.php:46