diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/longpolling.julius | 7 | ||||
-rw-r--r-- | templates/page.julius | 17 |
2 files changed, 21 insertions, 3 deletions
diff --git a/templates/longpolling.julius b/templates/longpolling.julius index d34d5b47d..520699cd7 100644 --- a/templates/longpolling.julius +++ b/templates/longpolling.julius @@ -1,8 +1,9 @@ // longpolling for #{ident} function poller#{ident}() { - longpoll('@{gethtml}', '#{ident}', function() { - setTimeout(poller#{ident}, #{delay}); - }); + longpoll('@{gethtml}', '#{ident}' + , function() { setTimeout(poller#{ident}, #{delay}); } + , function() { webapp_disconnected(); } + ); } $(function() { setTimeout(poller#{ident}, #{startdelay}); diff --git a/templates/page.julius b/templates/page.julius new file mode 100644 index 000000000..a9d0b4223 --- /dev/null +++ b/templates/page.julius @@ -0,0 +1,17 @@ +connfailed = + '<div id="modal" class="modal fade">' + + ' <div class="modal-header">' + + ' <h3>git-annex has shut down</h3>' + + ' </div>' + + ' <div class="modal-body">' + + ' You can now close this browser window.' + + ' </div>' + + '</div>' ; + +function webapp_disconnected () { + $('#modal').replaceWith(connfailed); + $('#modal').modal('show'); + + // ideal, but blocked by many browsers + window.close(); +} |