diff options
Diffstat (limited to 'src/index.html')
-rw-r--r-- | src/index.html | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/index.html b/src/index.html index c6ab63a..4372efa 100644 --- a/src/index.html +++ b/src/index.html @@ -7,14 +7,38 @@ <script src="/web/jquery-ui.js"></script> <script> + function sleep(milliseconds) { + var start = new Date().getTime(); + for (var i = 0; i < 1e7; i++) { + if ((new Date().getTime() - start) > milliseconds){ + break; + } + } + } + $( function( ) { - $( "#tabs" ).tabs( ); + $( "#tabs" ).tabs({ + cache: false, + beforeLoad: function( event, ui ) { + ui.panel.html( "Loading, please wait..." ); + ui.jqXHR.fail( function( ) { + ui.panel.html( + "Couldn't load status of biruda. Check if biruda is running and the webserver is enabled." ); + }); + } + }); }); $(document).ready( function( ) { refresh_status( ); }); + //~ $('#tabs').tabs({ + //~ beforeLoad: function( event, ui ) { + //~ + //~ } + //~ }); + function refresh_status( ) { $('#tabs').tabs( 'load', 0 ); } |