Nikerabbit has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289357

Change subject: Remove usage of ext.uls.button from TUX message table
......................................................................

Remove usage of ext.uls.button from TUX message table

Inlined some selected styles from ext.uls.buttons to not
change the design for now. Except for advanced search
results button which I converted to mw-ui, and will
display in white instead of gray background.

Change-Id: I3cae34f96f04e8cc0676e877c4a1e970f99c1629
---
M resources/css/ext.translate.messagetable.css
M resources/js/ext.translate.messagetable.js
M specials/SpecialTranslate.php
M utils/TuxMessageTable.php
4 files changed, 40 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/57/289357/1

diff --git a/resources/css/ext.translate.messagetable.css 
b/resources/css/ext.translate.messagetable.css
index c668603..9d18b80 100644
--- a/resources/css/ext.translate.messagetable.css
+++ b/resources/css/ext.translate.messagetable.css
@@ -149,35 +149,56 @@
        top: 30px;
 }
 
-.tux-action-bar .toggle.button {
-       min-height: 40px;
-       font-size: 14px;
-       vertical-align: middle;
-       border-radius: 0;
-       text-shadow: none;
-       margin: 5px 0;
-       text-indent: 0;
-}
-
 .tux-action-bar .tux-view-switcher {
        padding: 0 5px;
 }
 
-.tux-action-bar .tux-view-switcher .toggle.button {
+.tux-action-bar button {
+       min-height: 40px;
+       font-size: 14px;
+       margin: 5px 0;
+       cursor: pointer;
+       background-color: #e6e6e6;
+       font-weight: bold;
+       line-height: 1;
+       background-image: linear-gradient(#f0f0f0,#e6e6e6);
+       border: 1px #c9c9c9 solid;
+}
+
+.tux-action-bar button:hover {
+       background-color: #f0f0f0;
+       background-image: linear-gradient(#f8f8f8, #f0f0f0);
+}
+
+.tux-action-bar button:active,
+.tux-action-bar button.down {
+       color: #FFF;
+       background: #252525;
+}
+
+.tux-action-bar button.disabled,
+.tux-action-bar button.disabled:hover {
+       color: #c9c9c9;
+       cursor: default;
+       background-color: #f0f0f0;
+       border-color: #e3e3e3;
+}
+
+.tux-view-switcher button {
        padding: 0 2px 0 0;
 }
 
-.tux-action-bar .tux-view-switcher .toggle.button:first-child {
+.tux-view-switcher button:first-child {
        border-radius: 3px 0 0 3px;
        border-right: none;
 }
 
-.tux-action-bar .tux-view-switcher .toggle.button:last-child {
+.tux-view-switcher button:last-child {
        border-radius: 0 3px 3px 0;
        border-left: none;
 }
 
-.tux-action-bar .tux-view-switcher .toggle.button:before {
+.tux-view-switcher button:before {
        content: "";
        height: 15px;
        width: 25px;
@@ -239,11 +260,6 @@
        background-image: linear-gradient(transparent, transparent), 
url(../images/view-proofread-hi.svg);
 }
 
-.tux-action-bar .toggle.button.down {
-       color: #FFF;
-       background: #252525;
-}
-
 .ext-translate-container .tux-messagelist .tux-message-filter-result {
        color: #252525;
        line-height: 35px;
@@ -258,7 +274,7 @@
        background: #FFF5AA;
 }
 
-.tux-message-filter-result .button {
+.tux-message-filter-result button {
        float: right;
        padding: 5px;
        margin: 5px 0;
diff --git a/resources/js/ext.translate.messagetable.js 
b/resources/js/ext.translate.messagetable.js
index ff8405d..16dedb4 100644
--- a/resources/js/ext.translate.messagetable.js
+++ b/resources/js/ext.translate.messagetable.js
@@ -359,7 +359,7 @@
                                $button = $( '<div>' )
                                        .addClass( 'three columns' )
                                        .append( $( '<button>' )
-                                               .addClass( 'button' )
+                                               .addClass( 'mw-ui-button' )
                                                .text( mw.msg( 
'tux-message-filter-advanced-button' ) )
                                        );
 
diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php
index c64ce5d..8212670 100644
--- a/specials/SpecialTranslate.php
+++ b/specials/SpecialTranslate.php
@@ -87,8 +87,6 @@
                $errors = $this->getFormErrors();
 
                if ( $isBeta && $this->options['taction'] !== 'export' ) {
-                       $out->addModuleStyles( 'ext.uls.buttons' );
-
                        $out->addHTML( Html::openElement( 'div', array(
                                'class' => 'grid ext-translate-container',
                        ) ) );
diff --git a/utils/TuxMessageTable.php b/utils/TuxMessageTable.php
index d3b68a1..2e25a10 100644
--- a/utils/TuxMessageTable.php
+++ b/utils/TuxMessageTable.php
@@ -57,9 +57,9 @@
                <button class="toggle button tux-editor-clear-translated 
hide">$clearTranslated</button>
        </div>
        <div class="six columns tux-view-switcher text-center">
-               <button class="toggle button down 
translate-mode-button">$modeTranslate
-               </button><button class="toggle button down 
page-mode-button">$modePage
-               </button><button class="toggle button hide 
proofread-mode-button">$modeProofread
+               <button class="toggle down translate-mode-button">$modeTranslate
+               </button><button class="toggle down page-mode-button">$modePage
+               </button><button class="toggle hide 
proofread-mode-button">$modeProofread
                </button>
        </div>
 </div>

-- 
To view, visit https://gerrit.wikimedia.org/r/289357
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cae34f96f04e8cc0676e877c4a1e970f99c1629
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to