Skip to content

Commit

Permalink
Fix renamed Bootstrap 5 classes
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Dec 21, 2020
1 parent 7127284 commit 6408b71
Show file tree
Hide file tree
Showing 53 changed files with 322 additions and 275 deletions.
4 changes: 2 additions & 2 deletions js/src/menu_resizer.js
Expand Up @@ -35,7 +35,7 @@
'class': 'nav-link dropdown-toggle',
'id': 'navbarDropdown',
'role': 'button',
'data-toggle': 'dropdown',
'data-bs-toggle': 'dropdown',
'aria-haspopup': 'true',
'aria-expanded': 'false'
}).text(Messages.strMore);
Expand All @@ -47,7 +47,7 @@
var $submenu = $('<li></li>', { 'class': 'nav-item dropdown d-none' })
.append(link)
.append($('<ul></ul>', {
'class': 'dropdown-menu dropdown-menu-right',
'class': 'dropdown-menu dropdown-menu-end',
'aria-labelledby': 'navbarDropdown'
}));
$container.append($submenu);
Expand Down
2 changes: 1 addition & 1 deletion js/src/sql.js
Expand Up @@ -496,7 +496,7 @@ AJAX.registerOnload('sql.js', function () {
var $varDiv = $('#bookmarkVariables');
$varDiv.empty();
for (var i = 1; i <= varCount; i++) {
$varDiv.append($('<div class="form-group">'));
$varDiv.append($('<div class="mb-3">'));
$varDiv.append($('<label for="bookmarkVariable' + i + '">' + Functions.sprintf(Messages.strBookmarkVariable, i) + '</label>'));
$varDiv.append($('<input class="form-control" type="text" size="10" name="bookmark_variable[' + i + ']" id="bookmarkVariable' + i + '">'));
$varDiv.append($('</div>'));
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/Display/Results.php
Expand Up @@ -1343,7 +1343,7 @@ private function getFieldVisibilityParams(
$display_params = $this->properties['display_params'];

// 1. Displays the full/partial text button (part 1)...
$button_html .= '<thead class="thead-light"><tr>' . "\n";
$button_html .= '<thead class="table-light"><tr>' . "\n";

$emptyPreCondition = $displayParts['edit_lnk'] != self::NO_EDIT_OR_DELETE
&& $displayParts['del_lnk'] != self::NO_EDIT_OR_DELETE;
Expand Down
30 changes: 15 additions & 15 deletions libraries/classes/Engines/Innodb.php
Expand Up @@ -131,11 +131,11 @@ public function getPageBufferpool()
. ' OR Variable_name = \'Innodb_page_size\';';
$status = $dbi->fetchResult($sql, 0, 1);

$output = '<table class="table table-light table-striped table-hover w-auto float-left">' . "\n"
$output = '<table class="table table-light table-striped table-hover w-auto float-start caption-top">' . "\n"
. ' <caption>' . "\n"
. ' ' . __('Buffer Pool Usage') . "\n"
. ' </caption>' . "\n"
. ' <tfoot class="thead-light">' . "\n"
. ' <tfoot class="table-light">' . "\n"
. ' <tr>' . "\n"
. ' <th colspan="2">' . "\n"
. ' ' . __('Total:') . ' '
Expand All @@ -158,7 +158,7 @@ public function getPageBufferpool()
. ' <tbody>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Free pages') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. Util::formatNumber(
$status['Innodb_buffer_pool_pages_free'],
0
Expand All @@ -167,7 +167,7 @@ public function getPageBufferpool()
. ' </tr>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Dirty pages') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. Util::formatNumber(
$status['Innodb_buffer_pool_pages_dirty'],
0
Expand All @@ -176,7 +176,7 @@ public function getPageBufferpool()
. ' </tr>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Pages containing data') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. Util::formatNumber(
$status['Innodb_buffer_pool_pages_data'],
0
Expand All @@ -185,7 +185,7 @@ public function getPageBufferpool()
. ' </tr>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Pages to be flushed') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. Util::formatNumber(
$status['Innodb_buffer_pool_pages_flushed'],
0
Expand All @@ -194,7 +194,7 @@ public function getPageBufferpool()
. ' </tr>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Busy pages') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. Util::formatNumber(
$status['Innodb_buffer_pool_pages_misc'],
0
Expand All @@ -206,7 +206,7 @@ public function getPageBufferpool()
if (isset($status['Innodb_buffer_pool_pages_latched'])) {
$output .= ' <tr>'
. ' <th scope="row">' . __('Latched pages') . '</th>'
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. Util::formatNumber(
$status['Innodb_buffer_pool_pages_latched'],
0
Expand All @@ -217,14 +217,14 @@ public function getPageBufferpool()

$output .= ' </tbody>' . "\n"
. '</table>' . "\n\n"
. '<table class="table table-light table-striped table-hover w-auto ml-4 float-left">' . "\n"
. '<table class="table table-light table-striped table-hover w-auto ms-4 float-start caption-top">' . "\n"
. ' <caption>' . "\n"
. ' ' . __('Buffer Pool Activity') . "\n"
. ' </caption>' . "\n"
. ' <tbody>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Read requests') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. Util::formatNumber(
$status['Innodb_buffer_pool_read_requests'],
0
Expand All @@ -233,7 +233,7 @@ public function getPageBufferpool()
. ' </tr>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Write requests') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. Util::formatNumber(
$status['Innodb_buffer_pool_write_requests'],
0
Expand All @@ -242,7 +242,7 @@ public function getPageBufferpool()
. ' </tr>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Read misses') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. Util::formatNumber(
$status['Innodb_buffer_pool_reads'],
0
Expand All @@ -251,7 +251,7 @@ public function getPageBufferpool()
. ' </tr>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Write waits') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. Util::formatNumber(
$status['Innodb_buffer_pool_wait_free'],
0
Expand All @@ -260,7 +260,7 @@ public function getPageBufferpool()
. ' </tr>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Read misses in %') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. ($status['Innodb_buffer_pool_read_requests'] == 0
? '---'
: htmlspecialchars(
Expand All @@ -275,7 +275,7 @@ public function getPageBufferpool()
. ' </tr>' . "\n"
. ' <tr>' . "\n"
. ' <th scope="row">' . __('Write waits in %') . '</th>' . "\n"
. ' <td class="text-monospace text-right">'
. ' <td class="font-monospace text-end">'
. ($status['Innodb_buffer_pool_write_requests'] == 0
? '---'
: htmlspecialchars(
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/StorageEngine.php
Expand Up @@ -235,7 +235,7 @@ public function getHtmlVariables()
$ret .= ' </td>' . "\n"
. ' <th scope="row">' . htmlspecialchars($details['title']) . '</th>'
. "\n"
. ' <td class="text-monospace text-right">';
. ' <td class="font-monospace text-end">';
switch ($details['type']) {
case PMA_ENGINE_DETAILS_TYPE_SIZE:
$parsed_size = $this->resolveTypeSize($details['value']);
Expand Down
4 changes: 2 additions & 2 deletions templates/database/central_columns/main.twig
Expand Up @@ -9,7 +9,7 @@
<input type="hidden" name="add_new_column" value="add_new_column">
<div class="table-responsive">
<table class="table table-light">
<thead class="thead-light">
<thead class="table-light">
<tr>
<th></th>
<th class="" title="" data-column="name">
Expand Down Expand Up @@ -213,7 +213,7 @@
<table id="table_columns" class="table table-light table-striped table-hover tablesorter">
{% set class = 'column_heading' %}
{% set title = 'Click to sort.' | trans %}
<thead class="thead-light">
<thead class="table-light">
<tr>
<th class="{{ class }}"></th>
<th class="hide"></th>
Expand Down
2 changes: 1 addition & 1 deletion templates/database/events/index.twig
Expand Up @@ -12,7 +12,7 @@
</div>

<table class="table table-light table-striped table-hover{{ items is empty ? ' hide' }}">
<thead class="thead-light">
<thead class="table-light">
<tr>
<th></th>
<th>{% trans 'Name' %}</th>
Expand Down
30 changes: 15 additions & 15 deletions templates/database/operations/index.twig
Expand Up @@ -8,14 +8,14 @@
<div class="card mb-2">
<div class="card-header">{{ get_icon('b_comment', 'Database comment'|trans, true) }}</div>
<div class="card-body">
<div class="form-row">
<div class="row g-3">
<div class="col-auto">
<label class="sr-only" for="databaseCommentInput">{% trans 'Database comment' %}</label>
<label class="visually-hidden" for="databaseCommentInput">{% trans 'Database comment' %}</label>
<input class="form-control textfield" id="databaseCommentInput" type="text" name="comment" value="{{ db_comment }}">
</div>
</div>
</div>
<div class="card-footer text-right">
<div class="card-footer text-end">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</div>
</div>
Expand All @@ -28,7 +28,7 @@
<div class="card mb-2">
<div class="card-header">{{ get_icon('b_table_add', 'Create table'|trans, true) }}</div>
<div class="card-body">
<div class="form-row">
<div class="row g-3">
<div class="col-auto">
<label for="exampleInputEmail1">{% trans 'Name' %}</label>
<input class="form-control" type="text" id="exampleInputEmail1" name="table" required>
Expand All @@ -40,7 +40,7 @@
</div>
</div>

<div class="card-footer text-right">
<div class="card-footer text-end">
<input class="btn btn-primary" type="submit" value="{% trans "Go" %}">
</div>
</div>
Expand All @@ -59,9 +59,9 @@
<div class="card mb-2">
<div class="card-header">{{ get_icon('b_edit', 'Rename database to'|trans, true) }}</div>
<div class="card-body">
<div class="form-group form-row">
<div class="mb-3 row g-3">
<div class="col-auto">
<label class="sr-only" for="new_db_name">{% trans 'New database name' %}</label>
<label class="visually-hidden" for="new_db_name">{% trans 'New database name' %}</label>
<input class="form-control textfield" id="new_db_name" type="text" name="newname" maxlength="64" required>
</div>
</div>
Expand All @@ -77,7 +77,7 @@
</div>
</div>

<div class="card-footer text-right">
<div class="card-footer text-end">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</div>
</div>
Expand Down Expand Up @@ -122,14 +122,14 @@
<div class="card mb-2">
<div class="card-header">{{ get_icon('b_edit', 'Copy database to'|trans, true) }}</div>
<div class="card-body">
<div class="form-group form-row">
<div class="mb-3 row g-3">
<div class="col-auto">
<label class="sr-only" for="renameDbNameInput">{% trans 'Database name' %}</label>
<label class="visually-hidden" for="renameDbNameInput">{% trans 'Database name' %}</label>
<input class="form-control textfield" id="renameDbNameInput" type="text" maxlength="64" name="newname" required>
</div>
</div>

<div class="form-group">
<div class="mb-3">
<div class="form-check">
<input class="form-check-input" type="radio" name="what" id="whatRadio1" value="structure">
<label class="form-check-label" for="whatRadio1">
Expand Down Expand Up @@ -186,7 +186,7 @@
</div>
</div>

<div class="card-footer text-right">
<div class="card-footer text-end">
<input class="btn btn-primary" type="submit" name="submit_copy" value="{% trans 'Go' %}">
</div>
</div>
Expand All @@ -198,9 +198,9 @@
<div class="card mb-2">
<div class="card-header">{{ get_icon('s_asci', 'Collation'|trans, true) }}</div>
<div class="card-body">
<div class="form-group form-row">
<div class="mb-3 row g-3">
<div class="col-auto">
<label class="sr-only" for="select_db_collation">{% trans 'Collation' %}</label>
<label class="visually-hidden" for="select_db_collation">{% trans 'Collation' %}</label>
<select class="form-control" lang="en" dir="ltr" name="db_collation" id="select_db_collation">
<option value=""></option>
{% for charset in charsets %}
Expand All @@ -226,7 +226,7 @@
</div>
</div>

<div class="card-footer text-right">
<div class="card-footer text-end">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/database/privileges/index.twig
Expand Up @@ -11,7 +11,7 @@

<div class="table-responsive jsresponsive">
<table class="table table-light table-striped table-hover">
<thead class="thead-light">
<thead class="table-light">
<tr>
<th></th>
<th scope="col">{% trans 'User name' %}</th>
Expand Down
2 changes: 1 addition & 1 deletion templates/database/routines/index.twig
Expand Up @@ -24,7 +24,7 @@
</div>

<table class="table table-light table-striped table-hover{{ items is empty ? ' hide' }}">
<thead class="thead-light">
<thead class="table-light">
<tr>
<th></th>
<th>{% trans 'Name' %}</th>
Expand Down
14 changes: 7 additions & 7 deletions templates/database/structure/body_for_table_summary.twig
@@ -1,4 +1,4 @@
<tfoot id="tbl_summary_row" class="thead-light">
<tfoot id="tbl_summary_row" class="table-light">
<tr>
<th class="d-print-none"></th>
<th class="tbl_num text-nowrap">
Expand Down Expand Up @@ -34,7 +34,7 @@
{% else %}
{% set cell_text = row_count_sum %}
{% endif %}
<th class="value tbl_rows text-monospace text-right">{{ cell_text }}</th>
<th class="value tbl_rows font-monospace text-end">{{ cell_text }}</th>
{% if not (properties_num_columns > 1) %}
{# MySQL <= 5.5.2 #}
{% set default_engine = dbi.fetchValue('SELECT @@storage_engine;') %}
Expand All @@ -60,12 +60,12 @@
{% set sum = format_byte_down(sum_size, 3, 1) %}
{% set sum_formatted = sum[0] %}
{% set sum_unit = sum[1] %}
<th class="value tbl_size text-monospace text-right">{{ sum_formatted }} {{ sum_unit }}</th>
<th class="value tbl_size font-monospace text-end">{{ sum_formatted }} {{ sum_unit }}</th>

{% set overhead = format_byte_down(overhead_size, 3, 1) %}
{% set overhead_formatted = overhead[0] %}
{% set overhead_unit = overhead[1] %}
<th class="value tbl_overhead text-monospace text-right">{{ overhead_formatted }} {{ overhead_unit }}</th>
<th class="value tbl_overhead font-monospace text-end">{{ overhead_formatted }} {{ overhead_unit }}</th>
{% endif %}

{% if show_charset %}
Expand All @@ -75,17 +75,17 @@
<th></th>
{% endif %}
{% if show_creation %}
<th class="value tbl_creation text-monospace text-right">
<th class="value tbl_creation font-monospace text-end">
{{ create_time_all }}
</th>
{% endif %}
{% if show_last_update %}
<th class="value tbl_last_update text-monospace text-right">
<th class="value tbl_last_update font-monospace text-end">
{{ update_time_all }}
</th>
{% endif %}
{% if show_last_check %}
<th class="value tbl_last_check text-monospace text-right">
<th class="value tbl_last_check font-monospace text-end">
{{ check_time_all }}
</th>
{% endif %}
Expand Down

0 comments on commit 6408b71

Please sign in to comment.