diff options
author | Luiza Pagliari <lpagliari@gmail.com> | 2017-04-04 11:09:24 -0300 |
---|---|---|
committer | Luiza Pagliari <lpagliari@gmail.com> | 2017-04-04 11:09:24 -0300 |
commit | 009cd3124370d44a9c567332bf3be63826fd95b4 (patch) | |
tree | 233f9fe1f26a5188d42461139d862bd7ff30029f /src/static/js/pad_modals.js | |
parent | ed029b599ee83edefd37b14dc44275b24316bf91 (diff) | |
download | etherpad-lite-009cd3124370d44a9c567332bf3be63826fd95b4.zip |
[feature] Create option to automatically reconnect after a few seconds
On some erros that display a modal with "Force reconnect" button, allow
Etherpad to automatically reload pad after a few seconds. Amount of
seconds is defined on settings.json.
Still need to create tests for this feature, and implement i18n.
Diffstat (limited to 'src/static/js/pad_modals.js')
-rw-r--r-- | src/static/js/pad_modals.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/static/js/pad_modals.js b/src/static/js/pad_modals.js index 67b03662..af048875 100644 --- a/src/static/js/pad_modals.js +++ b/src/static/js/pad_modals.js @@ -1,5 +1,5 @@ /** - * This code is mostly from the old Etherpad. Please help us to comment this code. + * This code is mostly from the old Etherpad. Please help us to comment this code. * This helps other people to understand this code better and helps them to improve it. * TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED */ @@ -19,8 +19,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + var padeditbar = require('./pad_editbar').padeditbar; +var automaticReconnect = require('./pad_automatic_reconnect'); var padmodals = (function() { @@ -35,6 +36,9 @@ var padmodals = (function() padeditbar.toggleDropDown("none", function() { $("#connectivity .visible").removeClass('visible'); $("#connectivity ."+messageId).addClass('visible'); + + automaticReconnect.showCountDownTimerToReconnectOnModal($('#connectivity .' + messageId)); + padeditbar.toggleDropDown("connectivity"); }); }, |