From 2625e0e1f6794de1b82b7882a97644d9129b40a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Wed, 23 Dec 2020 19:37:52 -0300 Subject: [PATCH] Replace .caution and .success CSS classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces with .text-danger and .text-success. Signed-off-by: Maurício Meneghini Fauth --- libraries/classes/Html/Generator.php | 2 +- libraries/classes/Query/Utilities.php | 2 +- libraries/classes/Relation.php | 8 ++--- test/classes/Html/GeneratorTest.php | 6 ++-- test/classes/RelationTest.php | 10 +++--- themes/bootstrap/scss/_common.scss | 23 ------------ themes/metro/scss/_common.scss | 52 --------------------------- themes/original/scss/_common.scss | 23 ------------ themes/pmahomme/scss/_common.scss | 23 ------------ 9 files changed, 14 insertions(+), 135 deletions(-) diff --git a/libraries/classes/Html/Generator.php b/libraries/classes/Html/Generator.php index 3bbeec49bb..ac40a71ccd 100644 --- a/libraries/classes/Html/Generator.php +++ b/libraries/classes/Html/Generator.php @@ -239,7 +239,7 @@ class Generator public static function getServerSSL(): string { $server = $GLOBALS['cfg']['Server']; - $class = 'caution'; + $class = 'text-danger'; if (! $server['ssl']) { $message = __('SSL is not being used'); if (! empty($server['socket']) || in_array($server['host'], $GLOBALS['cfg']['MysqlSslWarningSafeHosts'])) { diff --git a/libraries/classes/Query/Utilities.php b/libraries/classes/Query/Utilities.php index 247e8cb6cc..1f446ece2e 100644 --- a/libraries/classes/Query/Utilities.php +++ b/libraries/classes/Query/Utilities.php @@ -185,7 +185,7 @@ class Utilities if ($result === false && $errorMessage !== null) { $dbgInfo['error'] - = '' + = '' . htmlspecialchars($errorMessage) . ''; } $dbgInfo['query'] = htmlspecialchars($query); diff --git a/libraries/classes/Relation.php b/libraries/classes/Relation.php index 15e772dc74..cdba2f2218 100644 --- a/libraries/classes/Relation.php +++ b/libraries/classes/Relation.php @@ -138,16 +138,16 @@ class Relation $retval = '
'; $messages = []; - $messages['error'] = '' + $messages['error'] = '' . __('not OK') . ''; - $messages['ok'] = '' + $messages['ok'] = '' . _pgettext('Correctly working', 'OK') . ''; - $messages['enabled'] = '' . __('Enabled') . ''; - $messages['disabled'] = '' . __('Disabled') . ''; + $messages['enabled'] = '' . __('Enabled') . ''; + $messages['disabled'] = '' . __('Disabled') . ''; if (strlen((string) $cfgRelation['db']) == 0) { $retval .= __('Configuration of pmadb…') . ' ' diff --git a/test/classes/Html/GeneratorTest.php b/test/classes/Html/GeneratorTest.php index 5fd5cdb273..a5f373add8 100644 --- a/test/classes/Html/GeneratorTest.php +++ b/test/classes/Html/GeneratorTest.php @@ -295,7 +295,7 @@ class GeneratorTest extends AbstractTestCase . ' target="documentation">Documentation'; - $sslNotUsedCaution = 'SSL is not being used' + $sslNotUsedCaution = 'SSL is not being used' . ' Documentation'; @@ -349,7 +349,7 @@ class GeneratorTest extends AbstractTestCase ]; $this->assertEquals( - 'SSL is used with disabled verification' + 'SSL is used with disabled verification' . ' Documentation', @@ -363,7 +363,7 @@ class GeneratorTest extends AbstractTestCase ]; $this->assertEquals( - 'SSL is used without certification authority' + 'SSL is used without certification authority' . ' Documentation', diff --git a/test/classes/RelationTest.php b/test/classes/RelationTest.php index 56b60715be..a4249757d4 100644 --- a/test/classes/RelationTest.php +++ b/test/classes/RelationTest.php @@ -105,20 +105,20 @@ class RelationTest extends AbstractTestCase //$cfg['Servers'][$i]['relation'] $result = "\$cfg['Servers'][\$i]['pmadb'] ... " - . 'OK'; + . 'OK'; $this->assertStringContainsString( $result, $retval ); // $cfg['Servers'][$i]['relation'] $result = "\$cfg['Servers'][\$i]['relation'] ... " - . 'not OK'; + . 'not OK'; $this->assertStringContainsString( $result, $retval ); // General relation features - $result = 'General relation features: Disabled'; + $result = 'General relation features: Disabled'; $this->assertStringContainsString( $result, $retval @@ -126,13 +126,13 @@ class RelationTest extends AbstractTestCase // $cfg['Servers'][$i]['table_info'] $result = "\$cfg['Servers'][\$i]['table_info'] ... " . '' - . 'not OK'; + . 'not OK'; $this->assertStringContainsString( $result, $retval ); // Display Features: - $result = 'Display Features: Disabled'; + $result = 'Display Features: Disabled'; $this->assertStringContainsString( $result, $retval diff --git a/themes/bootstrap/scss/_common.scss b/themes/bootstrap/scss/_common.scss index 6293f0260c..4e66259242 100644 --- a/themes/bootstrap/scss/_common.scss +++ b/themes/bootstrap/scss/_common.scss @@ -814,10 +814,6 @@ label.col-3.d-flex.align-items-center { max-height: 400px; } -.color_red { - color: red; -} - .pma_sliding_message { display: inline-block; } @@ -833,25 +829,6 @@ ul.tabs { padding: 0; } -span { - &.caution { - color: #f00; - } - - &.success { - color: green; - } -} - -fieldset.caution a { - color: #f00; - - &:hover { - color: #fff; - background-color: #f00; - } -} - // zoom search div#dataDisplay { input, diff --git a/themes/metro/scss/_common.scss b/themes/metro/scss/_common.scss index 9b2dcd727d..a09bc7cd66 100644 --- a/themes/metro/scss/_common.scss +++ b/themes/metro/scss/_common.scss @@ -862,10 +862,6 @@ td.disabled { font-weight: bold; } -.color_red { - color: red; -} - /* specific elements */ ul.tabs { @@ -873,54 +869,6 @@ ul.tabs { margin: 0; } -span { - &.caution { - color: #f00; - } - - &.success { - color: green; - } -} - -fieldset.caution { - background: $browse-warning-color; - border: 1px solid $browse-warning-color; - - legend { - background-color: #fff; - } - - a { - font-family: $font-family-bold; - text-transform: uppercase; - color: $button-color; - font-weight: normal; - } - - ul { - padding: 0; - } -} - -fieldset.caution li { - display: block; -} - -fieldset.caution li { - &::before { - /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */ - font-family: "IcoMoon"; - content: ""; - color: $button-color; - margin-right: 10px; - } - - a:nth-child(2) img { - background: url('../img/s_info.png') !important; - } -} - /* zoom search */ div#dataDisplay { input, diff --git a/themes/original/scss/_common.scss b/themes/original/scss/_common.scss index e8e07a01a5..7b0f0bed30 100644 --- a/themes/original/scss/_common.scss +++ b/themes/original/scss/_common.scss @@ -655,10 +655,6 @@ form.login label { max-height: 400px; } -.color_red { - color: red; -} - .pma_sliding_message { display: inline-block; } @@ -676,25 +672,6 @@ ul.tabs { padding: 0; } -span { - &.caution { - color: #f00; - } - - &.success { - color: green; - } -} - -fieldset.caution a { - color: #f00; - - &:hover { - color: #fff; - background-color: #f00; - } -} - /* zoom search */ div#dataDisplay { input, diff --git a/themes/pmahomme/scss/_common.scss b/themes/pmahomme/scss/_common.scss index 823f239a0a..9c6c515a10 100644 --- a/themes/pmahomme/scss/_common.scss +++ b/themes/pmahomme/scss/_common.scss @@ -883,10 +883,6 @@ label.col-3.d-flex.align-items-center { max-height: 400px; } -.color_red { - color: red; -} - .pma_sliding_message { display: inline-block; } @@ -909,25 +905,6 @@ ul.tabs { background: #fff !important; } -span { - &.caution { - color: #f00; - } - - &.success { - color: green; - } -} - -fieldset.caution a { - color: #f00; - - &:hover { - color: #fff; - background-color: #f00; - } -} - // zoom search div#dataDisplay { input,