From c16be2f4dd9694a6d3114d4559b9e2ed0f3adacb Mon Sep 17 00:00:00 2001 From: Isarra Date: Thu, 29 Aug 2019 02:25:21 +0000 Subject: [PATCH] Fix languages/variants stuff some more Messed up a couple of things: * Nojs variants toggle * Order of sorting out language/project stuff fixed so it should correctly occur Fixed. Change-Id: I9a55848ca50884594035949e5aa855d98ddff77c --- includes/TimelessTemplate.php | 7 ++++--- resources/screen-desktop.less | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/TimelessTemplate.php b/includes/TimelessTemplate.php index 64c2f54..b9b9ce9 100644 --- a/includes/TimelessTemplate.php +++ b/includes/TimelessTemplate.php @@ -23,8 +23,6 @@ class TimelessTemplate extends BaseTemplate { */ public function execute() { $this->sidebar = $this->getSidebar(); - $this->pileOfTools = $this->getPageTools(); - $userLinks = $this->getUserLinks(); // WikiBase sidebar thing if ( isset( $this->sidebar['wikibase-otherprojects'] ) ) { @@ -37,6 +35,9 @@ class TimelessTemplate extends BaseTemplate { unset( $this->sidebar['coll-print_export'] ); } + $this->pileOfTools = $this->getPageTools(); + $userLinks = $this->getUserLinks(); + // Open html, body elements, etc $html = $this->get( 'headelement' ); @@ -723,7 +724,7 @@ class TimelessTemplate extends BaseTemplate { 'id' => 'ca-more', 'class' => 'dropdown-toggle' ]; - if ( $this->data['language_urls'] !== false || $this->pileOfTools['variants'] + if ( $this->data['language_urls'] !== false || $sortedPileOfTools['variants'] || isset( $this->otherProjects ) ) { $pileOfTools['languages'] = [ 'text' => $this->getMsg( 'timeless-languages' )->escaped(), diff --git a/resources/screen-desktop.less b/resources/screen-desktop.less index 02de4f5..a406c95 100644 --- a/resources/screen-desktop.less +++ b/resources/screen-desktop.less @@ -169,7 +169,7 @@ div.mw-notification-area { } } -.client-nojs #ca-languages:hover .dropdown { +.client-nojs #p-variants-desktop:hover .dropdown { display: block !important; }