const formSubmit = document.createElement("div");
formSubmit.className = "formSubmit";
- formSubmit.innerHTML = `<button class="buttonPrimary">${Language.get("wcf.global.button.next")}</button>`;
+ formSubmit.innerHTML = `<button class="button buttonPrimary">${Language.get("wcf.global.button.next")}</button>`;
content.appendChild(formSubmit);
UiDialog.rebuild(this);
</dd>
</dl>
<div class="formSubmit">
- <button class="buttonPrimary" data-type="submit">${Language.get("wcf.global.button.submit")}</button>
+ <button class="button buttonPrimary" data-type="submit">${Language.get("wcf.global.button.submit")}</button>
</div>`,
};
}
</dl>
</div>
<div class="formSubmit dialogFormSubmit">
- <button class="buttonPrimary formSubmitButton" accesskey="s">${Language.get("wcf.global.button.submit")}</button>
+ <button class="button buttonPrimary formSubmitButton" accesskey="s">${Language.get(
+ "wcf.global.button.submit",
+ )}</button>
</div>`,
};
}
const formSubmit = document.createElement("div");
formSubmit.className = "formSubmit";
- formSubmit.innerHTML = '<button class="buttonPrimary">' + Language.get("wcf.global.button.next") + "</button>";
+ formSubmit.innerHTML =
+ '<button class="button buttonPrimary">' + Language.get("wcf.global.button.next") + "</button>";
content.appendChild(formSubmit);
UiDialog.rebuild(this);
</dl>
</div>
<div class="formSubmit">
- <button class="buttonPrimary">${Language.get("wcf.global.button.insert")}</button>
+ <button class="button buttonPrimary">${Language.get("wcf.global.button.insert")}</button>
</div>`;
UiDialog.open({
this.confirmButton = document.createElement("button");
this.confirmButton.dataset.type = "submit";
- this.confirmButton.classList.add("buttonPrimary");
+ this.confirmButton.classList.add("button", "buttonPrimary");
this.confirmButton.textContent = Language.get("wcf.global.confirmation.confirm");
formSubmit.appendChild(this.confirmButton);
const cancelButton = document.createElement("button");
+ cancelButton.classList.add("button");
cancelButton.textContent = Language.get("wcf.global.confirmation.cancel");
cancelButton.addEventListener("click", () => {
UiDialog.close(this);
<dl>
<dt></dt>
<dd>
- <button class="shareDialogNativeButton" data-url="${StringUtil.escapeHTML(
+ <button class="button shareDialogNativeButton" data-url="${StringUtil.escapeHTML(
target.href,
)}" data-title="${StringUtil.escapeHTML(target.dataset.linkTitle || "")}">${Language.get(
"wcf.message.share.nativeShare",
</dl>
</div>
<div class="formSubmit">
- <button class="buttonPrimary" data-type="submit">${Language.get("wcf.global.button.save")}</button>
+ <button class="button buttonPrimary" data-type="submit">${Language.get("wcf.global.button.save")}</button>
</div>`,
};
}
const showMenuButton = document.createElement("button");
showMenuButton.className = "visuallyHidden";
- showMenuButton.tabIndex = 0;
- showMenuButton.setAttribute("role", "button");
showMenuButton.setAttribute("aria-label", Language.get("wcf.global.button.showMenu"));
element.insertBefore(showMenuButton, link.nextSibling);
</dd>
</dl>
<div class="formSubmit">
- <button class="buttonPrimary">${Language.get("wcf.global.button.submit")}</button>
+ <button class="button buttonPrimary">${Language.get("wcf.global.button.submit")}</button>
</div>`;
return {
loadButtonList.appendChild(this._noMoreEntries);
this._loadButton = document.createElement("button");
- this._loadButton.className = "small";
+ this._loadButton.classList.add("button", "small");
this._loadButton.innerHTML = Language.get("wcf.like.reaction.more");
this._loadButton.addEventListener("click", () => this._loadReactions());
this._loadButton.style.display = "none";
</dl>
</div>
<div class="formSubmit">
- <button id="${idButtonSave}" class="buttonPrimary" data-type="submit">${Language.get(
+ <button id="${idButtonSave}" class="button buttonPrimary" data-type="submit">${Language.get(
"wcf.global.button.save",
)}</button>
- <button id="${idButtonDelete}">${Language.get("wcf.global.button.delete")}</button>
+ <button id="${idButtonDelete}" class="button">${Language.get("wcf.global.button.delete")}</button>
</div>`,
};
}
</dd>
</dl>
<div class="formSubmit">
- <button id="redactor-modal-button-action" class="buttonPrimary"></button>
+ <button id="redactor-modal-button-action" class="button buttonPrimary"></button>
</div>`,
};
}
</dl>
</div>
<div class="formSubmit">
- <button id="${idButtonSave}" class="buttonPrimary" data-type="submit">${Language.get(
+ <button id="${idButtonSave}" class="button buttonPrimary" data-type="submit">${Language.get(
"wcf.global.button.save",
)}</button>
- <button id="${idButtonDelete}">${Language.get("wcf.global.button.delete")}</button>
+ <button id="${idButtonDelete}" class="button">${Language.get("wcf.global.button.delete")}</button>
</div>`,
};
}
</dl>
</div>
<div class="formSubmit">
- <button id="${idButtonSave}" class="buttonPrimary" data-type="submit">${Language.get(
+ <button id="${idButtonSave}" class="button buttonPrimary" data-type="submit">${Language.get(
"wcf.global.button.save",
)}</button>
- <button id="${idButtonDelete}">${Language.get("wcf.global.button.delete")}</button>
+ <button id="${idButtonDelete}" class="button">${Language.get("wcf.global.button.delete")}</button>
</div>`,
};
}
</dd>
</dl>
<div class="formSubmit">
- <button id="redactor-modal-button-action" class="buttonPrimary" data-type="submit">${Language.get(
+ <button id="redactor-modal-button-action" class="button buttonPrimary" data-type="submit">${Language.get(
"wcf.global.button.insert",
)}</button>
</div>`,
const showMoreItem = document.createElement("li");
showMoreItem.className = "showMore";
if (this.list.childElementCount) {
- showMoreItem.innerHTML = '<button class="small">' + Language.get("wcf.user.recentActivity.more") + "</button>";
+ showMoreItem.innerHTML =
+ '<button class="button small">' + Language.get("wcf.user.recentActivity.more") + "</button>";
const button = showMoreItem.children[0] as HTMLButtonElement;
button.addEventListener("click", (ev) => this.showMore(ev));
</dl>
</div>
<div class="formSubmit">
- <button class="buttonPrimary">${Language.get("wcf.global.button.submit")}</button>
+ <button class="button buttonPrimary">${Language.get("wcf.global.button.submit")}</button>
</div>`,
};
}
if (this._dialog !== null) {
this._purgeTemplateContent($.proxy(function() {
var $form = $('<div class="formSubmit" />').appendTo($('#packageInstallationInnerContent'));
- $('<button class="buttonPrimary">' + WCF.Language.get('wcf.acp.package.installation.rollback') + '</button>').appendTo($form).click($.proxy(this._rollback, this));
+ $('<button class="button buttonPrimary">' + WCF.Language.get('wcf.acp.package.installation.rollback') + '</button>').appendTo($form).click($.proxy(this._rollback, this));
$('#packageInstallationInnerContentContainer').show();
this._purgeTemplateContent($.proxy(function() {
var $form = $('<div class="formSubmit" />').appendTo($('#packageInstallationInnerContent'));
- var $button = $('<button class="buttonPrimary">' + WCF.Language.get('wcf.global.button.next') + '</button>').appendTo($form).click(function() {
+ var $button = $('<button class="button buttonPrimary">' + WCF.Language.get('wcf.global.button.next') + '</button>').appendTo($form).click(function() {
$(this).disable();
window.location = data.redirectLocation;
});
this._setIcon('question');
var $form = $('<div class="formSubmit" />').appendTo($('#packageInstallationInnerContent'));
- $('<button class="buttonPrimary">' + WCF.Language.get('wcf.global.button.next') + '</button>').appendTo($form).click($.proxy(function(event) {
+ $('<button class="button buttonPrimary">' + WCF.Language.get('wcf.global.button.next') + '</button>').appendTo($form).click($.proxy(function(event) {
$(event.currentTarget).disable();
this._submit(data);
// create dialog
this._dialog = $('<div />').hide().appendTo(document.body);
this._dialog.append($('<div class="section"><dl><dt><label for="userBanReason">' + WCF.Language.get('wcf.acp.user.banReason') + '</label></dt><dd><textarea id="userBanReason" cols="40" rows="3" /><small>' + WCF.Language.get('wcf.acp.user.banReason.description') + '</small></dd></dl><dl><dt></dt><dd><label for="userBanNeverExpires"><input type="checkbox" name="userBanNeverExpires" id="userBanNeverExpires" checked> ' + WCF.Language.get('wcf.acp.user.ban.neverExpires') + '</label></dd></dl><dl id="userBanExpiresSettings" style="display: none;"><dt><label for="userBanExpires">' + WCF.Language.get('wcf.acp.user.ban.expires') + '</label></dt><dd><input type="date" name="userBanExpires" id="userBanExpires" class="medium" min="' + new Date(TIME_NOW * 1000).toISOString() + '" data-ignore-timezone="true" /><small>' + WCF.Language.get('wcf.acp.user.ban.expires.description') + '</small></dd></dl></div>'));
- this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">' + WCF.Language.get('wcf.global.button.submit') + '</button></div>'));
+ this._dialog.append($('<div class="formSubmit"><button class="button buttonPrimary" accesskey="s">' + WCF.Language.get('wcf.global.button.submit') + '</button></div>'));
this._dialog.find('#userBanNeverExpires').change(function() {
$('#userBanExpiresSettings').toggle();
+ '<input id="redactor-image-title" style="display: none">' /* dummy because redactor expects it to be present */
+ '<input id="redactor-image-caption" style="display: none">' /* dummy because redactor expects it to be present */
+ '<div class="formSubmit">'
- + '<button id="redactor-modal-button-action" class="buttonPrimary">Insert</button>'
- + '<button id="redactor-modal-button-delete" class="redactor-modal-button-offset">Delete</button>'
+ + '<button id="redactor-modal-button-action" class="button buttonPrimary">Insert</button>'
+ + '<button id="redactor-modal-button-delete" class="button redactor-modal-button-offset">Delete</button>'
+ '</div>'
+ '</div>';
},
'link': String() + '<div class="redactor-modal-tab" data-title="General">' + '<section>' + '<label>URL</label>' + '<input type="url" id="redactor-link-url" aria-label="URL" />' + '</section>' + '<section>' + '<label>' + this.lang.get(
'text') + '</label>' + '<input type="text" id="redactor-link-url-text" aria-label="' + this.lang.get(
'text') + '" />' + '</section>' + '<section>' + '<label class="checkbox"><input type="checkbox" id="redactor-link-blank"> ' + this.lang.get(
- 'link-in-new-tab') + '</label>' + '</section>' + '<section>' + '<button id="redactor-modal-button-action">' + this.lang.get(
- 'insert') + '</button>' + '<button id="redactor-modal-button-cancel">' + this.lang.get(
+ 'link-in-new-tab') + '</label>' + '</section>' + '<section>' + '<button class="button" id="redactor-modal-button-action">' + this.lang.get(
+ 'insert') + '</button>' + '<button class="button" id="redactor-modal-button-cancel">' + this.lang.get(
'cancel') + '</button>' + '</section>' + '</div>'
};
this.$modal = $('<div id="redactor-modal" role="dialog" />');
this.$modalHeader = $('<div id="redactor-modal-header" />');
this.$modalClose = $(
- '<button type="button" id="redactor-modal-close" aria-label="' + this.lang.get(
+ '<button class="button" type="button" id="redactor-modal-close" aria-label="' + this.lang.get(
'close') + '" />').html('×');
this.$modalBody = $('<div id="redactor-modal-body" />');
_handleLoadNextComments: function() {
if (this._displayedComments < this._container.data('comments')) {
if (this._loadNextComments === null) {
- this._loadNextComments = $('<li class="commentLoadNext showMore"><button class="small">' + WCF.Language.get('wcf.comment.more') + '</button></li>').appendTo(this._container);
+ this._loadNextComments = $('<li class="commentLoadNext showMore"><button class="button small">' + WCF.Language.get('wcf.comment.more') + '</button></li>').appendTo(this._container);
this._loadNextComments.children('button').click($.proxy(this._loadComments, this));
}
// add 'insert' and 'delete' buttons
var $formSubmit = $('<div class="formSubmit" />').appendTo(this._dialog);
- if (this._supportPaste) this._buttons.insert = $('<button class="buttonPrimary">' + WCF.Language.get('wcf.message.quote.insertAllQuotes') + '</button>').click($.proxy(this._insertSelected, this)).appendTo($formSubmit);
- this._buttons.remove = $('<button>' + WCF.Language.get('wcf.message.quote.removeAllQuotes') + '</button>').click($.proxy(this._removeSelected, this)).appendTo($formSubmit);
+ if (this._supportPaste) this._buttons.insert = $('<button class="button buttonPrimary">' + WCF.Language.get('wcf.message.quote.insertAllQuotes') + '</button>').click($.proxy(this._insertSelected, this)).appendTo($formSubmit);
+ this._buttons.remove = $('<button class="button">' + WCF.Language.get('wcf.message.quote.removeAllQuotes') + '</button>').click($.proxy(this._removeSelected, this)).appendTo($formSubmit);
// show dialog
this._dialog.wcfDialog({
});
if (this._container.children('li').length) {
- this._loadButton = $('<li class="showMore"><button class="small">' + WCF.Language.get('wcf.user.recentActivity.more') + '</button></li>').appendTo(this._container);
+ this._loadButton = $('<li class="showMore"><button class="button small">' + WCF.Language.get('wcf.user.recentActivity.more') + '</button></li>').appendTo(this._container);
this._loadButton = this._loadButton.children('button').click($.proxy(this._click, this));
}
else {
success: $.proxy(this._success, this)
});
- var $container = $('<li class="likeListMore showMore"><button class="small">' + WCF.Language.get('wcf.like.likes.more') + '</button><small>' + WCF.Language.get('wcf.like.likes.noMoreEntries') + '</small></li>').appendTo(this._container);
+ var $container = $('<li class="likeListMore showMore"><button class="button small">' + WCF.Language.get('wcf.like.likes.more') + '</button><small>' + WCF.Language.get('wcf.like.likes.noMoreEntries') + '</small></li>').appendTo(this._container);
this._loadButton = $container.children('button').click($.proxy(this._click, this));
this._noMoreEntries = $container.children('small').hide();
// display continue button
var $formSubmit = $('<div class="formSubmit" />').appendTo(this._dialog);
- $('<button class="buttonPrimary">' + WCF.Language.get('wcf.global.button.next') + '</button>').appendTo(
+ $('<button class="button buttonPrimary">' + WCF.Language.get('wcf.global.button.next') + '</button>').appendTo(
$formSubmit).focus().click(function () {
if (data.returnValues.redirectURL) {
window.location = data.returnValues.redirectURL;
spinner.classList.add("fa-check", "green");
const formSubmit = document.createElement("div");
formSubmit.className = "formSubmit";
- formSubmit.innerHTML = `<button class="buttonPrimary">${Language.get("wcf.global.button.next")}</button>`;
+ formSubmit.innerHTML = `<button class="button buttonPrimary">${Language.get("wcf.global.button.next")}</button>`;
content.appendChild(formSubmit);
Dialog_1.default.rebuild(this);
const button = formSubmit.children[0];
</dd>
</dl>
<div class="formSubmit">
- <button class="buttonPrimary" data-type="submit">${Language.get("wcf.global.button.submit")}</button>
+ <button class="button buttonPrimary" data-type="submit">${Language.get("wcf.global.button.submit")}</button>
</div>`,
};
}
</dl>
</div>
<div class="formSubmit dialogFormSubmit">
- <button class="buttonPrimary formSubmitButton" accesskey="s">${Language.get("wcf.global.button.submit")}</button>
+ <button class="button buttonPrimary formSubmitButton" accesskey="s">${Language.get("wcf.global.button.submit")}</button>
</div>`,
};
}
spinner.classList.add("fa-check", "green");
const formSubmit = document.createElement("div");
formSubmit.className = "formSubmit";
- formSubmit.innerHTML = '<button class="buttonPrimary">' + Language.get("wcf.global.button.next") + "</button>";
+ formSubmit.innerHTML =
+ '<button class="button buttonPrimary">' + Language.get("wcf.global.button.next") + "</button>";
content.appendChild(formSubmit);
Dialog_1.default.rebuild(this);
const button = formSubmit.children[0];
</dl>
</div>
<div class="formSubmit">
- <button class="buttonPrimary">${Language.get("wcf.global.button.insert")}</button>
+ <button class="button buttonPrimary">${Language.get("wcf.global.button.insert")}</button>
</div>`;
UiDialog.open({
_dialogSetup: () => {
this.dialog.appendChild(formSubmit);
this.confirmButton = document.createElement("button");
this.confirmButton.dataset.type = "submit";
- this.confirmButton.classList.add("buttonPrimary");
+ this.confirmButton.classList.add("button", "buttonPrimary");
this.confirmButton.textContent = Language.get("wcf.global.confirmation.confirm");
formSubmit.appendChild(this.confirmButton);
const cancelButton = document.createElement("button");
+ cancelButton.classList.add("button");
cancelButton.textContent = Language.get("wcf.global.confirmation.cancel");
cancelButton.addEventListener("click", () => {
Dialog_1.default.close(this);
<dl>
<dt></dt>
<dd>
- <button class="shareDialogNativeButton" data-url="${StringUtil.escapeHTML(target.href)}" data-title="${StringUtil.escapeHTML(target.dataset.linkTitle || "")}">${Language.get("wcf.message.share.nativeShare")}</button>
+ <button class="button shareDialogNativeButton" data-url="${StringUtil.escapeHTML(target.href)}" data-title="${StringUtil.escapeHTML(target.dataset.linkTitle || "")}">${Language.get("wcf.message.share.nativeShare")}</button>
</dd>
</dl>
`;
</dl>
</div>
<div class="formSubmit">
- <button class="buttonPrimary" data-type="submit">${Language.get("wcf.global.button.save")}</button>
+ <button class="button buttonPrimary" data-type="submit">${Language.get("wcf.global.button.save")}</button>
</div>`,
};
}
link.setAttribute("aria-expanded", "false");
const showMenuButton = document.createElement("button");
showMenuButton.className = "visuallyHidden";
- showMenuButton.tabIndex = 0;
- showMenuButton.setAttribute("role", "button");
showMenuButton.setAttribute("aria-label", Language.get("wcf.global.button.showMenu"));
element.insertBefore(showMenuButton, link.nextSibling);
let showMenu = false;
</dd>
</dl>
<div class="formSubmit">
- <button class="buttonPrimary">${Language.get("wcf.global.button.submit")}</button>
+ <button class="button buttonPrimary">${Language.get("wcf.global.button.submit")}</button>
</div>`;
return {
id: "paginationOverlay",
this._noMoreEntries.style.display = "none";
loadButtonList.appendChild(this._noMoreEntries);
this._loadButton = document.createElement("button");
- this._loadButton.className = "small";
+ this._loadButton.classList.add("button", "small");
this._loadButton.innerHTML = Language.get("wcf.like.reaction.more");
this._loadButton.addEventListener("click", () => this._loadReactions());
this._loadButton.style.display = "none";
</dl>
</div>
<div class="formSubmit">
- <button id="${idButtonSave}" class="buttonPrimary" data-type="submit">${Language.get("wcf.global.button.save")}</button>
- <button id="${idButtonDelete}">${Language.get("wcf.global.button.delete")}</button>
+ <button id="${idButtonSave}" class="button buttonPrimary" data-type="submit">${Language.get("wcf.global.button.save")}</button>
+ <button id="${idButtonDelete}" class="button">${Language.get("wcf.global.button.delete")}</button>
</div>`,
};
}
</dd>
</dl>
<div class="formSubmit">
- <button id="redactor-modal-button-action" class="buttonPrimary"></button>
+ <button id="redactor-modal-button-action" class="button buttonPrimary"></button>
</div>`,
};
}
</dl>
</div>
<div class="formSubmit">
- <button id="${idButtonSave}" class="buttonPrimary" data-type="submit">${Language.get("wcf.global.button.save")}</button>
- <button id="${idButtonDelete}">${Language.get("wcf.global.button.delete")}</button>
+ <button id="${idButtonSave}" class="button buttonPrimary" data-type="submit">${Language.get("wcf.global.button.save")}</button>
+ <button id="${idButtonDelete}" class="button">${Language.get("wcf.global.button.delete")}</button>
</div>`,
};
}
</dl>
</div>
<div class="formSubmit">
- <button id="${idButtonSave}" class="buttonPrimary" data-type="submit">${Language.get("wcf.global.button.save")}</button>
- <button id="${idButtonDelete}">${Language.get("wcf.global.button.delete")}</button>
+ <button id="${idButtonSave}" class="button buttonPrimary" data-type="submit">${Language.get("wcf.global.button.save")}</button>
+ <button id="${idButtonDelete}" class="button">${Language.get("wcf.global.button.delete")}</button>
</div>`,
};
}
</dd>
</dl>
<div class="formSubmit">
- <button id="redactor-modal-button-action" class="buttonPrimary" data-type="submit">${Language.get("wcf.global.button.insert")}</button>
+ <button id="redactor-modal-button-action" class="button buttonPrimary" data-type="submit">${Language.get("wcf.global.button.insert")}</button>
</div>`,
};
}
const showMoreItem = document.createElement("li");
showMoreItem.className = "showMore";
if (this.list.childElementCount) {
- showMoreItem.innerHTML = '<button class="small">' + Language.get("wcf.user.recentActivity.more") + "</button>";
+ showMoreItem.innerHTML =
+ '<button class="button small">' + Language.get("wcf.user.recentActivity.more") + "</button>";
const button = showMoreItem.children[0];
button.addEventListener("click", (ev) => this.showMore(ev));
}
</dl>
</div>
<div class="formSubmit">
- <button class="buttonPrimary">${Language.get("wcf.global.button.submit")}</button>
+ <button class="button buttonPrimary">${Language.get("wcf.global.button.submit")}</button>
</div>`,
};
}