29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-25 23:02:55 +00:00

[4.0] badge --> bg BS5 (#32138)

This commit is contained in:
Brian Teeman 2021-01-24 17:19:13 +00:00 committed by GitHub
parent ae187e7325
commit 9f2fc00eb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 21 additions and 21 deletions

View File

@ -92,7 +92,7 @@ $listDirection = $this->escape($this->state->get('list.direction'));
<?php echo $extension->type_translated; ?>
</td>
<td class="d-none d-md-table-cell">
<span class="badge badge-<?php echo count($item['results']['error']) ? 'danger' : ($item['errorsCount'] ? 'warning' : 'success'); ?>" tabindex="0">
<span class="badge bg-<?php echo count($item['results']['error']) ? 'danger' : ($item['errorsCount'] ? 'warning' : 'success'); ?>" tabindex="0">
<?php echo Text::plural('COM_INSTALLER_MSG_DATABASE_ERRORS', $item['errorsCount']); ?>
</span>
<div role="tooltip" id="tip<?php echo $i; ?>">

View File

@ -73,7 +73,7 @@ $compatibilityTypes = array(
<?php echo $option->label; ?>
</th>
<td>
<span class="badge badge-<?php echo $option->state ? 'success' : 'danger'; ?>">
<span class="badge bg-<?php echo $option->state ? 'success' : 'danger'; ?>">
<?php echo Text::_($option->state ? 'JYES' : 'JNO'); ?>
<?php if ($option->notice) : ?>
<span class="icon-info-circle icon-white" title="<?php echo $option->notice; ?>"></span>
@ -119,7 +119,7 @@ $compatibilityTypes = array(
<?php echo Text::_($setting->recommended ? 'JON' : 'JOFF'); ?>
</td>
<td>
<span class="badge badge-<?php echo ($setting->state === $setting->recommended) ? 'success' : 'warning'; ?>">
<span class="badge bg-<?php echo ($setting->state === $setting->recommended) ? 'success' : 'warning'; ?>">
<?php echo Text::_($setting->state ? 'JON' : 'JOFF'); ?>
</span>
</td>

View File

@ -44,7 +44,7 @@ $moduleId = str_replace(' ', '', $module->title) . $module->id;
<?php endif; ?>
</th>
<td>
<span class="badge badge-<?php echo $hits_class; ?>"><?php echo $item->hits; ?></span>
<span class="badge bg-<?php echo $hits_class; ?>"><?php echo $item->hits; ?></span>
</td>
<td>
<?php echo HTMLHelper::_('date', $item->publish_up, Text::_('DATE_FORMAT_LC4')); ?>

View File

@ -39,53 +39,53 @@ Joomla = window.Joomla || {};
}
});
if (updMenus === '-') {
tmpMenu.innerHTML = `<span class="badge badge-danger">${Joomla.JText._('JNO')}</span>`;
tmpMenu.innerHTML = `<span class="badge bg-danger">${Joomla.JText._('JNO')}</span>`;
if (!tmpRow.classList.contains('no') || tmpRow.classList.length === 0) { tmpRow.classList.add('no'); }
}
if (parseInt(updMenus, 10) === 0) {
tmpMenu.innerHTML = `<span class="badge badge-info">${Joomla.JText._('JALL')}</span>`;
tmpMenu.innerHTML = `<span class="badge bg-info">${Joomla.JText._('JALL')}</span>`;
if (tmpRow.classList.contains('no')) { tmpRow.classList.remove('no'); }
}
if (parseInt(updMenus, 10) > 0) {
if (window.parent.inMenus.indexOf(window.parent.menuId) >= 0) {
if (window.parent.numMenus === window.parent.inMenus.length) {
tmpMenu.innerHTML = `<span class="badge badge-info">${Joomla.JText._('JALL')}</span>`;
tmpMenu.innerHTML = `<span class="badge bg-info">${Joomla.JText._('JALL')}</span>`;
if (tmpRow.classList.contains('no') || tmpRow.classList.length === 0) { tmpRow.classList.remove('no'); }
} else {
tmpMenu.innerHTML = `<span class="badge badge-success">${Joomla.JText._('JYES')}</span>`;
tmpMenu.innerHTML = `<span class="badge bg-success">${Joomla.JText._('JYES')}</span>`;
if (tmpRow.classList.contains('no')) { tmpRow.classList.remove('no'); }
}
}
if (window.parent.inMenus.indexOf(window.parent.menuId) < 0) {
tmpMenu.innerHTML = `<span class="badge badge-danger">${Joomla.JText._('JNO')}</span>`;
tmpMenu.innerHTML = `<span class="badge bg-danger">${Joomla.JText._('JNO')}</span>`;
if (!tmpRow.classList.contains('no')) { tmpRow.classList.add('no'); }
}
}
if (parseInt(updMenus, 10) < 0) {
if (window.parent.inMenus.indexOf(window.parent.menuId) >= 0) {
if (window.parent.numMenus === window.parent.inMenus.length) {
tmpMenu.innerHTML = `<span class="badge badge-info">${Joomla.JText._('JALL')}</span>`;
tmpMenu.innerHTML = `<span class="badge bg-info">${Joomla.JText._('JALL')}</span>`;
if (tmpRow.classList.contains('no')) { tmpRow.classList.remove('no'); }
} else {
tmpMenu.innerHTML = `<span class="badge badge-success">${Joomla.JText._('JYES')}</span>`;
tmpMenu.innerHTML = `<span class="badge bg-success">${Joomla.JText._('JYES')}</span>`;
if (tmpRow.classList.contains('no')) { tmpRow.classList.remove('no'); }
}
}
if (window.parent.inMenus.indexOf(window.parent.menuId) < 0) {
tmpMenu.innerHTML = `<span class="badge badge-danger">${Joomla.JText._('JNO')}</span>`;
tmpMenu.innerHTML = `<span class="badge bg-danger">${Joomla.JText._('JNO')}</span>`;
if (!tmpRow.classList.contains('no') || tmpRow.classList.length === 0) { tmpRow.classList.add('no'); }
}
}
if (parseInt(updStatus, 10) === 1) {
tmpStatus.innerHTML = `<span class="badge badge-success">${Joomla.JText._('JYES')}</span>`;
tmpStatus.innerHTML = `<span class="badge bg-success">${Joomla.JText._('JYES')}</span>`;
if (tmpRow.classList.contains('unpublished')) { tmpRow.classList.remove('unpublished'); }
}
if (parseInt(updStatus, 10) === 0) {
tmpStatus.innerHTML = `<span class="badge badge-danger">${Joomla.JText._('JNO')}</span>`;
tmpStatus.innerHTML = `<span class="badge bg-danger">${Joomla.JText._('JNO')}</span>`;
if (!tmpRow.classList.contains('unpublished') || tmpRow.classList.length === 0) { tmpRow.classList.add('unpublished'); }
}
if (parseInt(updStatus, 10) === -2) {
tmpStatus.innerHTML = `<span class="badge badge-default">${Joomla.JText._('JTRASHED')}</span>`;
tmpStatus.innerHTML = `<span class="badge bg-secondary">${Joomla.JText._('JTRASHED')}</span>`;
if (!tmpRow.classList.contains('unpublished') || tmpRow.classList.length === 0) { tmpRow.classList.add('unpublished'); }
}
if (document.formvalidator.isValid(document.getElementById('module-form'))) {

View File

@ -39,7 +39,7 @@
// No updates
update('success', Joomla.Text._('PLG_QUICKICON_EXTENSIONUPDATE_UPTODATE'));
} else {
update('danger', Joomla.Text._('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND').replace('%s', `<span class="badge badge-light">${updateInfoList.length}</span>`));
update('danger', Joomla.Text._('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND').replace('%s', `<span class="badge bg-light">${updateInfoList.length}</span>`));
}
} else {
// An error occurred

View File

@ -42,7 +42,7 @@
const updateInfo = updateInfoList.shift();
if (updateInfo.version !== options.version) {
update('danger', Joomla.Text._('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND').replace('%s', `<span class="badge badge-light"> \u200E ${updateInfo.version}</span>`));
update('danger', Joomla.Text._('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND').replace('%s', `<span class="badge bg-light"> \u200E ${updateInfo.version}</span>`));
} else {
update('success', Joomla.Text._('PLG_QUICKICON_JOOMLAUPDATE_UPTODATE'));
}

View File

@ -46,7 +46,7 @@
// Scroll to page top
window.scrollTo(0, 0);
update('danger', Joomla.JText._('PLG_QUICKICON_OVERRIDECHECK_OVERRIDEFOUND').replace('%s', `<span class="badge badge-light">${updateInfoList.length}</span>`), '');
update('danger', Joomla.JText._('PLG_QUICKICON_OVERRIDECHECK_OVERRIDEFOUND').replace('%s', `<span class="badge bg-light">${updateInfoList.length}</span>`), '');
}
} else {
// An error occurred

View File

@ -72,7 +72,7 @@ $this->setMetaData('viewport', 'width=device-width, initial-scale=1');
</div>
<div class="alert-text">
<h2><?php echo Text::_('JERROR_LAYOUT_ERROR_HAS_OCCURRED_WHILE_PROCESSING_YOUR_REQUEST'); ?></h2>
<p class="form-text text-muted small"><span class="badge badge-default"><?php echo $this->error->getCode(); ?></span> <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></p>
<p class="form-text text-muted small"><span class="badge bg-secondary"><?php echo $this->error->getCode(); ?></span> <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></p>
</div>
</div>
<?php if ($this->debug) : ?>

View File

@ -6,7 +6,7 @@
label="PLG_TINY_FIELD_SETACCESS_LABEL"
multiple="true"
class="access-select"
labelclass="badge badge-success"
labelclass="badge bg-success"
layout="joomla.form.field.list-fancy-select"
/>

View File

@ -152,7 +152,7 @@ $this->setMetaData('viewport', 'width=device-width, initial-scale=1');
<hr>
<p><?php echo Text::_('JERROR_LAYOUT_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR'); ?></p>
<blockquote>
<span class="badge badge-secondary"><?php echo $this->error->getCode(); ?></span> <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
<span class="badge bg-secondary"><?php echo $this->error->getCode(); ?></span> <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
</blockquote>
<?php if ($this->debug) : ?>
<div>