Jdlrobson has uploaded a new change for review.

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


Change subject: Story 429: Show watchlist photo CTA where photo absent
......................................................................

Story 429: Show watchlist photo CTA where photo absent

Move styles from nearby to watchlist (nearby inherits watchlist styles
currently)

Change-Id: I3d523664cf426b5053c13d1d1cf79cfc1b236181
---
M includes/specials/SpecialMobileWatchlist.php
M less/specials/nearby.less
M less/specials/watchlist.less
M stylesheets/specials/nearby.css
M stylesheets/specials/watchlist.css
5 files changed, 21 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/96/60696/1

diff --git a/includes/specials/SpecialMobileWatchlist.php 
b/includes/specials/SpecialMobileWatchlist.php
index b0a5966..6d83f7d 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -400,18 +400,20 @@
                wfProfileIn( __METHOD__ );
 
                if ( $this->usePageImages && !is_null( $row->pp_value ) ) {
+                       $props = array(
+                               'class' => 'listThumb needsPhoto',
+                       );
                        $file = wfFindFile( $row->pp_value );
                        if ( $file ) {
                                $thumb = $file->transform( array( 'width' => 
self::THUMB_SIZE, 'height' => self::THUMB_SIZE ) );
                                if ( $thumb ) {
-                                       return Html::element( 'div',
-                                               array(
+                                       $props = array(
                                                        'class' => 'listThumb ' 
. ( $thumb->getWidth() > $thumb->getHeight() ? 'listThumbH' : 'listThumbV' ),
                                                        'style' => 
'background-image: url("' . wfExpandUrl( $thumb->getUrl(), PROTO_CURRENT ) . 
'")',
-                                               )
                                        );
                                }
                        }
+                       return Html::element( 'div', $props );
                }
 
                wfProfileOut( __METHOD__ );
diff --git a/less/specials/nearby.less b/less/specials/nearby.less
index 5a83fc6..5420d92 100644
--- a/less/specials/nearby.less
+++ b/less/specials/nearby.less
@@ -2,11 +2,6 @@
 
 ul.a-to-z {
        li {
-               .listThumb.needsPhoto {
-                       background-image: url(images/camera.png);
-                       .background-size( 50%, auto );
-               }
-
                .proximity {
                        font-size: .8em;
                        text-transform: none;
diff --git a/less/specials/watchlist.less b/less/specials/watchlist.less
index 4a64d7d..84dbf46 100644
--- a/less/specials/watchlist.less
+++ b/less/specials/watchlist.less
@@ -104,11 +104,16 @@
        }
 }
 
-ul.mw-mf-watchlist-results.a-to-z {
+ul.a-to-z {
        li {
                a.title {
                        padding-left: (@thumbSpace - @ragWidth);
                }
+
+               .listThumb.needsPhoto {
+                       background-image: url(images/camera.png);
+                       .background-size( 50%, auto );
+               }
        }
 }
 
diff --git a/stylesheets/specials/nearby.css b/stylesheets/specials/nearby.css
index 8ff3e0f..7959c6d 100644
--- a/stylesheets/specials/nearby.css
+++ b/stylesheets/specials/nearby.css
@@ -1,12 +1,3 @@
-ul.a-to-z li .listThumb.needsPhoto {
-  background-image: url(images/camera.png);
-  /* use -webkit prefix for older android browsers eg. nexus 1 */
-
-  -moz-background-size: 50% auto;
-  -o-background-size: 50% auto;
-  -webkit-background-size: 50% auto;
-  background-size: 50% auto;
-}
 ul.a-to-z li .proximity {
   font-size: .8em;
   text-transform: none;
diff --git a/stylesheets/specials/watchlist.css 
b/stylesheets/specials/watchlist.css
index a6a7898..27b3685 100644
--- a/stylesheets/specials/watchlist.css
+++ b/stylesheets/specials/watchlist.css
@@ -97,9 +97,18 @@
 ul.mw-mf-watchlist-results li .mw-mf-user {
   margin: .5em 0 0;
 }
-ul.mw-mf-watchlist-results.a-to-z li a.title {
+ul.a-to-z li a.title {
   padding-left: 77px;
 }
+ul.a-to-z li .listThumb.needsPhoto {
+  background-image: url(images/camera.png);
+  /* use -webkit prefix for older android browsers eg. nexus 1 */
+
+  -moz-background-size: 50% auto;
+  -o-background-size: 50% auto;
+  -webkit-background-size: 50% auto;
+  background-size: 50% auto;
+}
 .mw-mf-user {
   padding: 1px 0 0 20px;
   color: #565656 !important;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d523664cf426b5053c13d1d1cf79cfc1b236181
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

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

Reply via email to