aboutsummaryrefslogtreecommitdiff
path: root/templates/longpolling.julius
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-30 16:11:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-30 16:11:16 -0400
commit2400c6faa34bc696c30253edb219a5ffad0b2a36 (patch)
treeff1b8dff395012f83f8629cf818de13b57d02ef4 /templates/longpolling.julius
parent703f24b83e1788955bf0a35525dc16fb2dbfb39a (diff)
insert modal dialog html from javascript
This avoids it being visible all the time in noscript
Diffstat (limited to 'templates/longpolling.julius')
-rw-r--r--templates/longpolling.julius15
1 files changed, 13 insertions, 2 deletions
diff --git a/templates/longpolling.julius b/templates/longpolling.julius
index a4077c3d5..0d18b8435 100644
--- a/templates/longpolling.julius
+++ b/templates/longpolling.julius
@@ -5,7 +5,17 @@
// Maximum update frequency is controlled by #{startdelay}
// and #{delay}, both in milliseconds.
-$dead=0;
+$dead = 0;
+
+$connfailed =
+ '<div id="modal" class="modal fade">' +
+ ' <div .modal-header>' +
+ ' <h3>git-annex has shut down</h2>' +
+ ' </div>' +
+ ' <div class="modal-body">' +
+ ' You can now close this browser window.' +
+ ' </div>' +
+ '</div>' ;
(function( $ ) {
@@ -25,7 +35,8 @@ $.LongPoll#{ident} = (function() {
$dead=1;
// blocked by many browsers
window.close();
- $('#lostconnection').modal('show');
+ $('#modal').replaceWith($connfailed);
+ $('#modal').modal('show');
}
},
});