diff --git a/src/static/css/pad.css b/src/static/css/pad.css index 19180ade..df9dde14 100644 --- a/src/static/css/pad.css +++ b/src/static/css/pad.css @@ -401,180 +401,36 @@ table#otheruserstable { color: #888; font-style: italic; } -.modaldialog.cboxreconnecting .modaldialog-inner, -.modaldialog.cboxconnecting .modaldialog-inner { - background: url(../../static/img/connectingbar.gif) no-repeat center 60px; - height: 100px; + +#connectivity { + z-index: 600 !important; } -.modaldialog.cboxreconnecting, -.modaldialog.cboxconnecting, -.modaldialog.cboxdisconnected { - background: #8FCDE0 -} -.cboxdisconnected #connectionboxinner div { - display: none -} -.cboxdisconnected_userdup #connectionboxinner #disconnected_userdup { - display: block -} -.cboxdisconnected_deleted #connectionboxinner #disconnected_deleted { - display: block -} -.cboxdisconnected_initsocketfail #connectionboxinner #disconnected_initsocketfail { - display: block -} -.cboxdisconnected_looping #connectionboxinner #disconnected_looping { - display: block -} -.cboxdisconnected_slowcommit #connectionboxinner #disconnected_slowcommit { - display: block -} -.cboxdisconnected_unauth #connectionboxinner #disconnected_unauth { - display: block -} -.cboxdisconnected_unknown #connectionboxinner #disconnected_unknown { - display: block -} -.cboxdisconnected_initsocketfail #connectionboxinner #reconnect_advise, -.cboxdisconnected_looping #connectionboxinner #reconnect_advise, -.cboxdisconnected_slowcommit #connectionboxinner #reconnect_advise, -.cboxdisconnected_unknown #connectionboxinner #reconnect_advise { - display: block -} -.cboxdisconnected div#reconnect_form { - display: block -} -.cboxdisconnected .disconnected h2 { - display: none -} -.cboxdisconnected .disconnected .h2_disconnect { - display: block -} -.cboxdisconnected_userdup .disconnected h2.h2_disconnect { - display: none -} -.cboxdisconnected_userdup .disconnected h2.h2_userdup { - display: block -} -.cboxdisconnected_unauth .disconnected h2.h2_disconnect { - display: none -} -.cboxdisconnected_unauth .disconnected h2.h2_unauth { - display: block -} -#connectionstatus { - position: absolute; - width: 37px; - height: 41px; - overflow: hidden; - right: 0; - z-index: 11; -} -#connectionboxinner .connecting { - margin-top: 20px; - font-size: 2.0em; - color: #555; - text-align: center; + +#connectivity * { display: none; } -.cboxconnecting #connectionboxinner .connecting { - display: block -} -#connectionboxinner .disconnected h2 { - font-size: 1.8em; - color: #333; - text-align: left; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; - margin-bottom: 10px; -} -#connectionboxinner .disconnected p { - margin: 10px 10px; - font-size: 1.2em; - line-height: 1.1; - color: #333; -} -#connectionboxinner .disconnected { - display: none -} -.cboxdisconnected #connectionboxinner .disconnected { - display: block -} -#connectionboxinner .reconnecting { - margin-top: 20px; - font-size: 1.6em; - color: #555; - text-align: center; - display: none; -} -.cboxreconnecting #connectionboxinner .reconnecting { - display: block + +#connectivity .visible, +#connectivity .visible * { + display: block; } + #reconnect_form button { font-size: 12pt; padding: 5px; } -#mainmodals { - z-index: 600; /* higher than the modals themselves: */ -} -.modalfield { - font-size: 1.2em; - padding: 1px; - border: 1px solid #bbb; -} -#mainmodals .editempty { - color: #aaa -} -.modaldialog { - position: absolute; - top: 100px; - left: 50%; - margin-left: -243px; - width: 485px; - display: none; - z-index: 501; - zoom: 1; - overflow: hidden; - background: white; - border: 1px solid #999; -} -.modaldialog .modaldialog-inner { - padding: 10pt -} -.modaldialog .modaldialog-hide { - float: right; - background-repeat: no-repeat; - background-image: url(static/img/sharebox4.gif); - display: block; - width: 22px; - height: 22px; - background-position: -454px -6px; - margin-right: -5px; - margin-top: -5px; -} -.modaldialog label, -.modaldialog h1 { - color: #222222; - font-size: 125%; - font-weight: bold; -} -.modaldialog th { - vertical-align: top; - text-align: left; -} -#modaloverlay { +.toolbar #overlay { z-index: 500; display: none; background-repeat: repeat-both; width: 100%; position: absolute; - height: 100%; + height: inherit; left: 0; top: 0; } -* html #modaloverlay { +* html #overlay { /* for IE 6+ */ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter: alpha(opacity=100); @@ -874,6 +730,10 @@ input[type=checkbox] { .popup input[type=text], #users input[type=text] { outline: none; } +.popup button { + padding: 5px; + font-size: 14px; +} .popup a { text-decoration: none } @@ -895,6 +755,7 @@ input[type=checkbox] { #settings, #importexport, #embed, +#connectivity, #users { position: absolute; top: 36px; @@ -914,15 +775,6 @@ input[type=checkbox] { border-left: 1px solid #ccc !important; width: 185px !important; } -@media screen and (max-width: 960px) { - .modaldialog { - position: relative; - margin: 0 auto; - width: 80%; - top: 40px; - left: 0; - } -} @media screen and (max-width: 600px) { .toolbar ul li.separator { display: none; @@ -986,6 +838,7 @@ input[type=checkbox] { } #settings, #importexport, + #connectivity, #embed { left: 0; top: 0; diff --git a/src/static/css/timeslider.css b/src/static/css/timeslider.css index 4c8913d3..5f24a4cf 100644 --- a/src/static/css/timeslider.css +++ b/src/static/css/timeslider.css @@ -150,6 +150,13 @@ margin-top: 0; padding-right: 6px; } +#settings, +#importexport, +#embed, +#connectivity, +#users { + top: 62px; +} #importexport .popup { width: 185px } diff --git a/src/static/img/connectingbar.gif b/src/static/img/connectingbar.gif index 34f54e90..5e54d694 100644 Binary files a/src/static/img/connectingbar.gif and b/src/static/img/connectingbar.gif differ diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index cc9f1288..490eee19 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3237,7 +3237,7 @@ function Ace2Inner(){ } //hide the dropdownso if(window.parent.parent.padeditbar){ // required in case its in an iframe should probably use parent.. See Issue 327 https://github.com/Pita/etherpad-lite/issues/327 - window.parent.parent.padeditbar.toogleDropDown("none"); + window.parent.parent.padeditbar.toggleDropDown("none"); } } diff --git a/src/static/js/broadcast_slider.js b/src/static/js/broadcast_slider.js index 33953e33..fed9f2e7 100644 --- a/src/static/js/broadcast_slider.js +++ b/src/static/js/broadcast_slider.js @@ -155,9 +155,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) function showReconnectUI() { - var cls = 'modaldialog cboxdisconnected cboxdisconnected_unknown'; - $("#connectionbox").get(0).className = cls; - padmodals.showModal("#connectionbox", 500); + padmodals.showModal("disconnected"); } var fixPadHeight = _.throttle(function(){ diff --git a/src/static/js/pad_connectionstatus.js b/src/static/js/pad_connectionstatus.js index bb0f0521..c592afbd 100644 --- a/src/static/js/pad_connectionstatus.js +++ b/src/static/js/pad_connectionstatus.js @@ -21,6 +21,7 @@ */ var padmodals = require('./pad_modals').padmodals; +var padeditbar = require('./pad_editbar').padeditbar; var padconnectionstatus = (function() { @@ -42,15 +43,18 @@ var padconnectionstatus = (function() status = { what: 'connected' }; - padmodals.hideModal(500); + + padmodals.showModal('connected'); + padmodals.hideOverlay(500); }, reconnecting: function() { status = { what: 'reconnecting' }; - $("#connectionbox").get(0).className = 'modaldialog cboxreconnecting'; - padmodals.showModal("#connectionbox", 500); + + padmodals.showModal('reconnecting'); + padmodals.showOverlay(500); }, disconnected: function(msg) { @@ -61,20 +65,15 @@ var padconnectionstatus = (function() what: 'disconnected', why: msg }; + var k = String(msg).toLowerCase(); // known reason why if (!(k == 'userdup' || k == 'deleted' || k == 'looping' || k == 'slowcommit' || k == 'initsocketfail' || k == 'unauth')) { - k = 'unknown'; + k = 'disconnected'; } - var cls = 'modaldialog cboxdisconnected cboxdisconnected_' + k; - $("#connectionbox").get(0).className = cls; - padmodals.showModal("#connectionbox", 500); - - $('button#forcereconnect').click(function() - { - window.location.reload(); - }); + padmodals.showModal(k); + padmodals.showOverlay(500); }, isFullyConnected: function() { diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js index af2bc40a..59658a04 100644 --- a/src/static/js/pad_editbar.js +++ b/src/static/js/pad_editbar.js @@ -122,21 +122,25 @@ var padeditbar = (function() { if(cmd == "showusers") { - self.toogleDropDown("users"); + self.toggleDropDown("users"); } else if (cmd == 'settings') { - self.toogleDropDown("settings"); + self.toggleDropDown("settings"); + } + else if (cmd == 'connectivity') + { + self.toggleDropDown("connectivity"); } else if (cmd == 'embed') { self.setEmbedLinks(); $('#linkinput').focus().select(); - self.toogleDropDown("embed"); + self.toggleDropDown("embed"); } else if (cmd == 'import_export') { - self.toogleDropDown("importexport"); + self.toggleDropDown("importexport"); } else if (cmd == 'savedRevision') { @@ -182,13 +186,14 @@ var padeditbar = (function() } if(padeditor.ace) padeditor.ace.focus(); }, - toogleDropDown: function(moduleName) + toggleDropDown: function(moduleName, cb) { - var modules = ["settings", "importexport", "embed", "users"]; + var modules = ["settings", "connectivity", "importexport", "embed", "users"]; // hide all modules and remove highlighting of all buttons if(moduleName == "none") { + var returned = false for(var i=0;i
+
+
+
+ + <% e.end_block(); %> + +
+
+
Loading...
+
@@ -262,57 +324,6 @@
 
-
-
-
- -
- <% e.begin_block("modals"); %> -
-
-
Connecting...
-
Reestablishing connection...
-
-

Disconnected.

-

Opened in another window.

-

No Authorization.

-
-

We're having trouble talking to the EtherPad lite synchronization server. You may be connecting through an incompatible firewall or proxy server.

-
-
-

We were unable to connect to the EtherPad lite synchronization server. This may be due to an incompatibility with your web browser or internet connection.

-
-
-

You seem to have opened this pad in another browser window. If you'd like to use this window instead, you can reconnect.

-
-
-

Lost connection with the EtherPad lite synchronization server. This may be due to a loss of network connectivity.

-
-
-

Server not responding. This may be due to network connectivity issues or high load on the server.

-
-
-

Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting.

-
-
-

This pad was deleted.

-
-
-

If this continues to happen, please let us know

-
-
- -
-
-
- -
- <% e.end_block(); %> -
<% e.end_block(); %> <% e.begin_block("scripts"); %> diff --git a/src/templates/timeslider.html b/src/templates/timeslider.html index 88bfa4e7..02af9f6c 100644 --- a/src/templates/timeslider.html +++ b/src/templates/timeslider.html @@ -33,6 +33,12 @@
+ +
+
+ +
+
@@ -70,54 +76,59 @@
-
-
- + - -
- <% e.begin_block("modals"); %> -
-
-
Connecting...
-
Reestablishing connection...
-
-

Disconnected.

-

Opened in another window.

-

No Authorization.

-
-

We're having trouble talking to the EtherPad lite synchronization server. You may be connecting through an incompatible firewall or proxy server.

-
-
-

We were unable to connect to the EtherPad lite synchronization server. This may be due to an incompatibility with your web browser or internet connection.

-
-
-

You seem to have opened this pad in another browser window. If you'd like to use this window instead, you can reconnect.

-
-
-

Lost connection with the EtherPad lite synchronization server. This may be due to a loss of network connectivity.

-
-
-

Server not responding. This may be due to network connectivity issues or high load on the server.

-
-
-

Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting.

-
-
-

This pad was deleted.

-
-
-

If this continues to happen, please let us know

-
-
- -
-
-
-
- <% e.end_block(); %> -
+
+

Reestablishing connection...

+

+
+
+

Opened in another window.

+

You seem to have opened this pad in another browser window.

+

If you'd like to use this window instead, you can reconnect.

+ +
+
+

No Authorization.

+

Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting.

+ +
+
+

Disconnected.

+

We're having trouble talking to the EtherPad lite synchronization server.

+

You may be connecting through an incompatible firewall or proxy server.

+
+
+

Disconnected.

+

We were unable to connect to the EtherPad lite synchronization server.

+

This may be due to an incompatibility with your web browser or internet connection.

+
+
+

Disconnected.

+

Server not responding.

+

This may be due to network connectivity issues or high load on the server.

+ +
+
+

Disconnected.

+

This pad was deleted.

+
+
+

Disconnected.

+

Lost connection with the EtherPad lite synchronization server.

+

This may be due to a loss of network connectivity. If this continues to happen, please let us know

+ +
+ + <% e.end_block(); %> +