Skip to content

Commit

Permalink
[4.0] badge --> bg BS5 (joomla#32138)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman authored Jan 24, 2021
1 parent ae187e7 commit 9f2fc00
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<?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; ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<?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>
Expand Down Expand Up @@ -119,7 +119,7 @@
<?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>
Expand Down
2 changes: 1 addition & 1 deletion administrator/modules/mod_popular/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<?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')); ?>
Expand Down
22 changes: 11 additions & 11 deletions build/media_source/com_modules/js/admin-module-edit.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion installation/template/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</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) : ?>
Expand Down
2 changes: 1 addition & 1 deletion plugins/editors/tinymce/forms/setoptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>

Expand Down
2 changes: 1 addition & 1 deletion templates/cassiopeia/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<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>
Expand Down

0 comments on commit 9f2fc00

Please sign in to comment.