From d968b2afe5bd346cb241e2ef4a3d16fbb16ac374 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Thu, 14 Nov 2013 19:02:46 +0300 Subject: [PATCH] UI for connection is lost --- css/style.css | 23 +++++++++++++++++++++++ js/documents.js | 13 +++++++++++++ 2 files changed, 36 insertions(+) diff --git a/css/style.css b/css/style.css index f72224e2..811866c9 100755 --- a/css/style.css +++ b/css/style.css @@ -190,6 +190,29 @@ z-index:20; } +#warning-connection-lost{ + padding: 6px 0; + text-align: center; + color: #ffffff; + background-color: #CE7070; + font-size: 16px; + font-weight: bold; +} + +#warning-connection-lost img { + margin-right: 4px; + float: right; + height: 20px; +} + +#connection-lost{ + right: 5px; + background: #fff; + width: 95%; + position: absolute; + top: 87px; +} + /* override WebODF styling here */ diff --git a/js/documents.js b/js/documents.js index 1fca8e53..0c8e579d 100644 --- a/js/documents.js +++ b/js/documents.js @@ -93,6 +93,19 @@ var documentsMain = { hideProgress : function(){ $('.documentslist .progress').hide(); + }, + + showLostConnection : function(){ + $('#memberList .memberListButton').css({opacity : 0.3}); + $('#odf-toolbar').children(':not(#document-title)').hide(); + $('
').prependTo('#memberList'); + $('
' + t('documents', 'No connection to server. Trying to reconnect.') +'
').appendTo('#odf-toolbar'); + }, + + hideLostConnection : function() { + $('#connection-lost,#warning-connection-lost').remove(); + $('#odf-toolbar').children(':not(#document-title)').show(); + $('#memberList .memberListButton').css({opacity : 1}); } },