MDL-80259 theme_boost: Refactor badge helper classes for Bootstrap 5

This commit is contained in:
Mikel Martín 2023-12-01 10:54:22 +01:00
parent 810554ee83
commit a198884333
93 changed files with 218 additions and 209 deletions

View file

@ -436,7 +436,7 @@ M.core_availability.List = function(json, root, parentRoot) {
noneNode.appendChild(deleteIcon.span);
// Also if it's not the root, none is actually invalid, so add a label.
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge badge-warning">' +
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge bg-warning text-dark">' +
M.util.get_string('invalid', 'availability') + '</span>'));
}
@ -1002,7 +1002,7 @@ M.core_availability.Item = function(json, root) {
// Add the invalid marker (empty).
this.node.appendChild(document.createTextNode(' '));
this.node.appendChild(Y.Node.create('<span class="badge badge-warning"/>'));
this.node.appendChild(Y.Node.create('<span class="badge bg-warning text-dark"/>'));
};
Y.augment(M.core_availability.Item, Y.EventTarget, true, null, {emitFacade: true});
@ -1039,7 +1039,7 @@ M.core_availability.Item.prototype.fillErrors = function(errors) {
errors.push('core_availability:item_unknowntype');
}
// If any errors were added, add the marker to this item.
var errorLabel = this.node.one('> .badge-warning');
var errorLabel = this.node.one('> .bg-warning');
if (errors.length !== before && !errorLabel.get('firstChild')) {
var errorString = '';
// Fetch the last error code from the array of errors and split using the ':' delimiter.

File diff suppressed because one or more lines are too long

View file

@ -436,7 +436,7 @@ M.core_availability.List = function(json, root, parentRoot) {
noneNode.appendChild(deleteIcon.span);
// Also if it's not the root, none is actually invalid, so add a label.
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge badge-warning">' +
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge bg-warning text-dark">' +
M.util.get_string('invalid', 'availability') + '</span>'));
}
@ -1002,7 +1002,7 @@ M.core_availability.Item = function(json, root) {
// Add the invalid marker (empty).
this.node.appendChild(document.createTextNode(' '));
this.node.appendChild(Y.Node.create('<span class="badge badge-warning"/>'));
this.node.appendChild(Y.Node.create('<span class="badge bg-warning text-dark"/>'));
};
Y.augment(M.core_availability.Item, Y.EventTarget, true, null, {emitFacade: true});
@ -1039,7 +1039,7 @@ M.core_availability.Item.prototype.fillErrors = function(errors) {
errors.push('core_availability:item_unknowntype');
}
// If any errors were added, add the marker to this item.
var errorLabel = this.node.one('> .badge-warning');
var errorLabel = this.node.one('> .bg-warning');
if (errors.length !== before && !errorLabel.get('firstChild')) {
var errorString = '';
// Fetch the last error code from the array of errors and split using the ':' delimiter.

View file

@ -434,7 +434,7 @@ M.core_availability.List = function(json, root, parentRoot) {
noneNode.appendChild(deleteIcon.span);
// Also if it's not the root, none is actually invalid, so add a label.
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge badge-warning">' +
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge bg-warning text-dark">' +
M.util.get_string('invalid', 'availability') + '</span>'));
}
@ -1000,7 +1000,7 @@ M.core_availability.Item = function(json, root) {
// Add the invalid marker (empty).
this.node.appendChild(document.createTextNode(' '));
this.node.appendChild(Y.Node.create('<span class="badge badge-warning"/>'));
this.node.appendChild(Y.Node.create('<span class="badge bg-warning text-dark"/>'));
};
Y.augment(M.core_availability.Item, Y.EventTarget, true, null, {emitFacade: true});
@ -1037,7 +1037,7 @@ M.core_availability.Item.prototype.fillErrors = function(errors) {
errors.push('core_availability:item_unknowntype');
}
// If any errors were added, add the marker to this item.
var errorLabel = this.node.one('> .badge-warning');
var errorLabel = this.node.one('> .bg-warning');
if (errors.length !== before && !errorLabel.get('firstChild')) {
var errorString = '';
// Fetch the last error code from the array of errors and split using the ':' delimiter.