Hello Aaron Schulz, Esanders, Ladsgroup, Florianschmidtwelzow, Addshore, 
jenkins-bot, VolkerE, Jdlrobson, Jackmcbarn, Mvolz,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "Use OOjs UI icons"
......................................................................

Revert "Use OOjs UI icons"

This reverts commit e6b2a82404dd39c9795dc06de6e3841da864e37d.

Change-Id: I21d3dd457a313b95d74929c2b013a56fc524516f
---
M frontend/FlaggablePageView.php
M frontend/FlaggedRevsXML.php
M frontend/modules/ext.flaggedRevs.advanced.js
M frontend/modules/ext.flaggedRevs.basic.css
A frontend/modules/img/1.png
A frontend/modules/img/2.png
A frontend/modules/img/3.png
A frontend/modules/img/arrow-down.png
A frontend/modules/img/arrow-up.png
A frontend/modules/img/checkmark-green.png
A frontend/modules/img/checkmark-orange.png
A frontend/modules/img/doc-check.png
A frontend/modules/img/doc-magnify.png
M frontend/modules/img/license.txt
A frontend/modules/img/lock-closed.png
A frontend/modules/img/lock-open.png
16 files changed, 40 insertions(+), 58 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs 
refs/changes/42/338142/1

diff --git a/frontend/FlaggablePageView.php b/frontend/FlaggablePageView.php
index c7f268f..610fcaa 100644
--- a/frontend/FlaggablePageView.php
+++ b/frontend/FlaggablePageView.php
@@ -53,15 +53,6 @@
                        if ( $this->article == null ) {
                                throw new Exception( 'FlaggablePageView has no 
context article!' );
                        }
-                       $this->getOutput()->enableOOUI();
-                       $this->getOutput()->addModuleStyles(
-                               [
-                                       'oojs-ui.styles.icons-moderation',
-                                       'oojs-ui.styles.icons-movement',
-                                       'oojs-ui.styles.icons-content',
-                                       'oojs-ui.styles.icons-alerts',
-                               ]
-                       );
                        $this->out = $this->getOutput(); // convenience
                }
        }
diff --git a/frontend/FlaggedRevsXML.php b/frontend/FlaggedRevsXML.php
index 71fb4db..bad5196 100644
--- a/frontend/FlaggedRevsXML.php
+++ b/frontend/FlaggedRevsXML.php
@@ -4,6 +4,14 @@
  * Includes functions for selectors, icons, notices, CSS, and form aspects.
  */
 class FlaggedRevsXML {
+       /**
+        * Get the URL path to where the client side resources are (JS, CSS, 
images..)
+        * @return string
+        */
+       public static function styleUrlPath() {
+               global $wgExtensionAssetsPath;
+               return "$wgExtensionAssetsPath/FlaggedRevs/frontend/modules";
+       }
 
        /**
         * Get a selector of reviewable namespaces
@@ -302,14 +310,11 @@
         * @return string
         */
        public static function ratingArrow() {
-               return ( new OOUI\IndicatorWidget(
-                       [
-                               'indicator' => 'down',
-                               'classes' => [ 'fr-toggle-arrow' ],
-                               'id' => 'mw-fr-revisiontoggle',
-                               'title' => wfMessage( 'revreview-toggle-title' 
)->text(),
-                       ]
-               ) )->toString();
+               $encPath = htmlspecialchars( self::styleUrlPath() . '/img' );
+               $img = '<img id="mw-fr-revisiontoggle" class="fr-toggle-arrow"';
+               $img .= " src=\"{$encPath}/arrow-down.png\" 
style=\"display:none;\"";
+               $img .= ' alt="' . wfMessage( 'revreview-toggle-title' 
)->escaped() . '" />';
+               return $img;
        }
 
        /**
@@ -366,33 +371,25 @@
         * @return string
         */
        public static function draftStatusIcon() {
-               $encTitle = wfMessage( 'revreview-draft-title' )->text();
-               return ( new OOUI\IconWidget(
-                       [
-                               'icon' => 'block',
-                               'classes' => [ 'flaggedrevs-icon' ],
-                               'title' => $encTitle,
-                       ]
-               ) )->toString();
+               $encPath = htmlspecialchars( self::styleUrlPath() . '/img' );
+               $encTitle = wfMessage( 'revreview-draft-title' )->escaped();
+               return "<img class=\"flaggedrevs-icon\" src=\"$encPath/1.png\"" 
.
+                       " alt=\"$encTitle\" title=\"$encTitle\" />";
        }
-
+       
        /**
         * Creates CSS stable page icon
         * @param bool $isQuality
         * @return string
         */
        public static function stableStatusIcon( $isQuality ) {
-               $icon = $isQuality ? 'check' : 'eye';
+               $encPath = htmlspecialchars( self::styleUrlPath() . '/img' );
+               $file = $isQuality ? '3.png' : '2.png';
                $encTitle = $isQuality
-                       ? wfMessage( 'revreview-quality-title' )->text()
-                       : wfMessage( 'revreview-basic-title' )->text();
-               return ( new OOUI\IconWidget(
-                       [
-                               'icon' => $icon,
-                               'classes' => [ 'flaggedrevs-icon' ],
-                               'title' => $encTitle,
-                       ]
-               ) )->toString();
+                       ? wfMessage( 'revreview-quality-title' )->escaped()
+                       : wfMessage( 'revreview-basic-title' )->escaped();
+               return "<img class=\"flaggedrevs-icon\" src=\"$encPath/$file\"" 
.
+                       " alt=\"$encTitle\" title=\"$encTitle\" />";
        }
 
        /**
@@ -401,22 +398,18 @@
         * @return string
         */
        public static function lockStatusIcon( $flaggedArticle ) {
+               $encPath = htmlspecialchars( self::styleUrlPath() . '/img' );
                if ( $flaggedArticle->isPageLocked() ) {
-                       $encTitle = wfMessage( 'revreview-locked-title' 
)->text();
-                       $icon = 'articleSearch';
+                       $encTitle = wfMessage( 'revreview-locked-title' 
)->escaped();
+                       return "<img class=\"flaggedrevs-icon\" 
src=\"$encPath/doc-magnify.png\"" .
+                               " alt=\"$encTitle\" title=\"$encTitle\" />";
                } elseif ( $flaggedArticle->isPageUnlocked() ) {
-                       $encTitle = wfMessage( 'revreview-unlocked-title' 
)->text();
-                       $icon = 'articleCheck';
-               } else {
-                       return '';
+                       $encTitle = wfMessage( 'revreview-unlocked-title' 
)->escaped();
+                       return "<img class=\"flaggedrevs-icon\" 
src=\"$encPath/doc-check.png\"" .
+                               " alt=\"$encTitle\" title=\"$encTitle\" />";
                }
-               return ( new OOUI\IconWidget(
-                       [
-                               'icon' => $icon,
-                               'classes' => [ 'flaggedrevs-icon' ],
-                               'title' => $encTitle,
-                       ]
-               ) )->toString();
+
+               return '';
        }
 
        /**
@@ -460,5 +453,4 @@
                        $article->getTitle()->getPrefixedText(), '', $params );
                return "<div id=\"mw-fr-logexcerpt\">$logHtml</div>";
        }
-
 }
diff --git a/frontend/modules/ext.flaggedRevs.advanced.js 
b/frontend/modules/ext.flaggedRevs.advanced.js
index 09e11f6..ad55f71 100644
--- a/frontend/modules/ext.flaggedRevs.advanced.js
+++ b/frontend/modules/ext.flaggedRevs.advanced.js
@@ -175,7 +175,7 @@
                        var $toggle = $( '#mw-fr-revisiontoggle' );
 
                        if ( $toggle.length ) {
-                               $toggle.css( 'display', 'inline-block' ); // 
show toggle control
+                               $toggle.css( 'display', 'inline' ); // show 
toggle control
                                fr.hideBoxDetails(); // hide the initially 
displayed ratings
                        }
 
@@ -189,7 +189,7 @@
                        // Enables diff detail box and toggle
                        $toggle = $( '#mw-fr-difftoggle' );
                        if ( $toggle.length ) {
-                               $toggle.css( 'display', 'inline-block' ); // 
show toggle control
+                               $toggle.css( 'display', 'inline' ); // show 
toggle control
                                $( '#mw-fr-stablediff' ).hide();
                        }
                        $toggle.children( 'a' ).click( fr.toggleDiff );
@@ -197,7 +197,7 @@
                        // Enables log detail box and toggle
                        $toggle = $( '#mw-fr-logtoggle' );
                        if ( $toggle.length ) {
-                               $toggle.css( 'display', 'inline-block' ); // 
show toggle control
+                               $toggle.css( 'display', 'inline' ); // show 
toggle control
                                if ( $toggle.hasClass( 'fr-logtoggle-details' ) 
) {
                                        // hide in edit mode
                                        $( '#mw-fr-logexcerpt' ).hide();
diff --git a/frontend/modules/ext.flaggedRevs.basic.css 
b/frontend/modules/ext.flaggedRevs.basic.css
index c46d1c6..2fba3a5 100644
--- a/frontend/modules/ext.flaggedRevs.basic.css
+++ b/frontend/modules/ext.flaggedRevs.basic.css
@@ -238,19 +238,17 @@
        cursor: pointer;
 }
 
-span.fr-toggle-arrow {
+img.fr-toggle-arrow {
        cursor: pointer;
-       opacity: 0.87;
 }
 
 li.fr-hist-stable-margin {
        margin-top: 2em;
 }
 
-span.flaggedrevs-icon {
+img.flaggedrevs-icon {
        margin-right: 0.2em;
        margin-left: 0.2em;
-       opacity: 0.87;
 }
 
 .fr-diff-ratings {
diff --git a/frontend/modules/img/1.png b/frontend/modules/img/1.png
new file mode 100644
index 0000000..6ac6954
--- /dev/null
+++ b/frontend/modules/img/1.png
Binary files differ
diff --git a/frontend/modules/img/2.png b/frontend/modules/img/2.png
new file mode 100644
index 0000000..8dc93ed
--- /dev/null
+++ b/frontend/modules/img/2.png
Binary files differ
diff --git a/frontend/modules/img/3.png b/frontend/modules/img/3.png
new file mode 100644
index 0000000..d2fa5b5
--- /dev/null
+++ b/frontend/modules/img/3.png
Binary files differ
diff --git a/frontend/modules/img/arrow-down.png 
b/frontend/modules/img/arrow-down.png
new file mode 100644
index 0000000..0148dbb
--- /dev/null
+++ b/frontend/modules/img/arrow-down.png
Binary files differ
diff --git a/frontend/modules/img/arrow-up.png 
b/frontend/modules/img/arrow-up.png
new file mode 100644
index 0000000..664be9a
--- /dev/null
+++ b/frontend/modules/img/arrow-up.png
Binary files differ
diff --git a/frontend/modules/img/checkmark-green.png 
b/frontend/modules/img/checkmark-green.png
new file mode 100644
index 0000000..3ff4bec
--- /dev/null
+++ b/frontend/modules/img/checkmark-green.png
Binary files differ
diff --git a/frontend/modules/img/checkmark-orange.png 
b/frontend/modules/img/checkmark-orange.png
new file mode 100644
index 0000000..46836e8
--- /dev/null
+++ b/frontend/modules/img/checkmark-orange.png
Binary files differ
diff --git a/frontend/modules/img/doc-check.png 
b/frontend/modules/img/doc-check.png
new file mode 100644
index 0000000..2a0c3af
--- /dev/null
+++ b/frontend/modules/img/doc-check.png
Binary files differ
diff --git a/frontend/modules/img/doc-magnify.png 
b/frontend/modules/img/doc-magnify.png
new file mode 100644
index 0000000..0bef54b
--- /dev/null
+++ b/frontend/modules/img/doc-magnify.png
Binary files differ
diff --git a/frontend/modules/img/license.txt b/frontend/modules/img/license.txt
index 6f0c8dd..a3ac876 100644
--- a/frontend/modules/img/license.txt
+++ b/frontend/modules/img/license.txt
@@ -1,4 +1,5 @@
 All images in this folder are available under the 
 GNU Free Documentation license (1.2+).
 
-All the images are to be credited to Joerg Baach.
+All the images are to be credited to Joerg Baach, except for lock-open.png and 
lock-closed.png, 
+which where created by "Jasu" (http://commons.wikimedia.org/wiki/User:Jasu), 
under the same license.
\ No newline at end of file
diff --git a/frontend/modules/img/lock-closed.png 
b/frontend/modules/img/lock-closed.png
new file mode 100644
index 0000000..897cfd0
--- /dev/null
+++ b/frontend/modules/img/lock-closed.png
Binary files differ
diff --git a/frontend/modules/img/lock-open.png 
b/frontend/modules/img/lock-open.png
new file mode 100644
index 0000000..a04115b
--- /dev/null
+++ b/frontend/modules/img/lock-open.png
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I21d3dd457a313b95d74929c2b013a56fc524516f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Mvolz <[email protected]>
Gerrit-Reviewer: VolkerE <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to