mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Use jQuery methods to build DOM elements
This commit is contained in:
parent
a2554fff22
commit
734fe9c297
1 changed files with 15 additions and 5 deletions
|
@ -21,11 +21,21 @@ var createCountDownElementsIfNecessary = function($modal) {
|
|||
var $reconnectButton = $modal.find('#forcereconnect');
|
||||
|
||||
// create extra DOM elements, if they don't exist
|
||||
var $reconnectTimerMessage = $('<p class="reconnecttimer"> \
|
||||
<span data-l10n-id="pad.modals.reconnecttimer">Trying to reconnect in </span> \
|
||||
<span class="timetoexpire"></span> \
|
||||
</p>');
|
||||
var $cancelReconnect = $('<button id="cancelreconnect" data-l10n-id="pad.modals.cancel">Cancel</button>');
|
||||
const $reconnectTimerMessage =
|
||||
$('<p>')
|
||||
.addClass('reconnecttimer')
|
||||
.append(
|
||||
$('<span>')
|
||||
.attr('data-l10n-id', 'pad.modals.reconnecttimer')
|
||||
.text('Trying to reconnect in '))
|
||||
.append(
|
||||
$('<span>')
|
||||
.addClass('timetoexpire'));
|
||||
const $cancelReconnect =
|
||||
$('<button>')
|
||||
.attr('id', 'cancelreconnect')
|
||||
.attr('data-l10n-id', 'pad.modals.cancel')
|
||||
.text('Cancel');
|
||||
|
||||
localize($reconnectTimerMessage);
|
||||
localize($cancelReconnect);
|
||||
|
|
Loading…
Reference in a new issue