Skip to content

Commit

Permalink
browser: accessibility: replace jquery 'addClass' function
Browse files Browse the repository at this point in the history
Change-Id: Id9bc9e24a2152705696b4dd77d50d72c6a74ada7
Signed-off-by: Henry Castro <[email protected]>
  • Loading branch information
hcvcastro committed Oct 22, 2024
1 parent d9bf4b5 commit bfec81c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions browser/src/control/Control.JSDialogBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2345,11 +2345,11 @@ L.Control.JSDialogBuilder = L.Control.extend({
label.textContent = builder._cleanText(data.text);
builder._stressAccessKey(label, button.accessKey);
controls['label'] = label;
$(button).addClass('has-label');
L.DomUtil.addClass(button, 'has-label');
} else if (builder.options.useInLineLabelsForUnoButtons === true) {
$(button).addClass('no-label');
L.DomUtil.addClass(button, 'no-label');
} else {
$(button).addClass('no-label');
L.DomUtil.addClass(button, 'no-label');
}

if (buttonImage !== false) {
Expand All @@ -2363,7 +2363,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
button.setAttribute('data-cooltip', builder._cleanText(data.text));

if (builder.options.useInLineLabelsForUnoButtons === true) {
$(button).addClass('inline');
L.DomUtil.addClass(button, 'inline');
inline = L.DomUtil.create('span', 'ui-content unolabel');
inline.htmlFor = buttonId;
inline.textContent = builder._cleanText(data.text);
Expand All @@ -2377,10 +2377,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
var state = items.getItemValue(data.command);

if (state && state === 'true') {
$(button).addClass('selected');
L.DomUtil.addClass(button, 'selected');
}
else {
$(button).removeClass('selected');
L.DomUtil.removeClass(button, 'selected');
}

if (disabled)
Expand Down Expand Up @@ -2430,10 +2430,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
if (builder.wizard && window.mode.isMobile()) {
controls['arrow'] = false;
} else if (options && options.hasDropdownArrow) {
$(button).addClass('dropdown');
L.DomUtil.addClass(button, 'dropdown');
controls['arrow'] = true;
} else if (data.dropdown === true) {
$(button).addClass('dropdown');
L.DomUtil.addClass(button, 'dropdown');
controls['arrow'] = true;
button.closeDropdown = function() {
builder.callback('toolbox', 'closemenu', parentContainer, data.command, builder);
Expand Down

0 comments on commit bfec81c

Please sign in to comment.