jenkins-bot has submitted this change and it was merged.
Change subject: Removed table of content bar
......................................................................
Removed table of content bar
Bug: T84913
Change-Id: I817baed5d42ca650f5ba0a78a53dea606fcbfbae
---
M repo/includes/EntityParserOutputGenerator.php
M repo/includes/View/EntityView.php
M repo/includes/View/ItemView.php
M repo/resources/Resources.php
M repo/resources/templates.php
D repo/resources/themes/default/wikibase.toc.css
6 files changed, 2 insertions(+), 118 deletions(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
diff --git a/repo/includes/EntityParserOutputGenerator.php
b/repo/includes/EntityParserOutputGenerator.php
index 38b85ee..6a883da 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -336,7 +336,6 @@
// make css available for JavaScript-less browsers
$parserOutput->addModuleStyles( array(
'wikibase.common',
- 'wikibase.toc',
'jquery.ui.core',
'jquery.wikibase.statementview',
'jquery.wikibase.toolbar',
diff --git a/repo/includes/View/EntityView.php
b/repo/includes/View/EntityView.php
index 915f1af..8b2a76b 100644
--- a/repo/includes/View/EntityView.php
+++ b/repo/includes/View/EntityView.php
@@ -155,7 +155,6 @@
$entity,
$this->getHtmlForTermBox( $entityRevision )
);
- $html .= $this->getHtmlForToc();
wfProfileOut( __METHOD__ );
return $html;
@@ -188,46 +187,6 @@
$this->textInjector,
$this->editable
);
- }
-
- /**
- * Builds and returns the HTML for the toc.
- *
- * @return string
- */
- private function getHtmlForToc() {
- $tocSections = $this->getTocSections();
-
- if ( count( $tocSections ) < 3 ) {
- // MediaWiki core doesn't show a TOC unless there are
at least 3 sections, so we
- //shouldn't either.
- return '';
- }
-
- $tocContent = '';
- $i = 0;
-
- foreach ( $tocSections as $id => $message ) {
- $tocContent .= $this->templateFactory->render(
'wb-entity-toc-section',
- $i++,
- $id,
- wfMessage( $message )->text()
- );
- }
-
- return $this->templateFactory->render( 'wb-entity-toc',
- wfMessage( 'toc' )->text(),
- $tocContent
- );
- }
-
- /**
- * Returns the sections that should displayed in the toc.
- *
- * @return string[] array( link target => system message key )
- */
- protected function getTocSections() {
- return array();
}
/**
diff --git a/repo/includes/View/ItemView.php b/repo/includes/View/ItemView.php
index bf47cc2..62cb6dd 100644
--- a/repo/includes/View/ItemView.php
+++ b/repo/includes/View/ItemView.php
@@ -89,19 +89,6 @@
}
/**
- * @see EntityView::getTocSections
- */
- protected function getTocSections() {
- $array = parent::getTocSections();
- $array['claims'] = 'wikibase-statements';
- foreach ( $this->siteLinkGroups as $group ) {
- $id = htmlspecialchars( 'sitelinks-' . $group,
ENT_QUOTES );
- $array[$id] = 'wikibase-sitelinks-' . $group;
- }
- return $array;
- }
-
- /**
* Builds and returns the HTML representing a WikibaseEntity's
site-links.
*
* @since 0.1
diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index e6b4130..9f7ff08 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -275,11 +275,6 @@
),
),
- 'wikibase.toc' => $moduleTemplate + array(
- 'styles' => array(
- 'themes/default/wikibase.toc.css',
- ),
- ),
);
if ( defined( 'ULS_VERSION' ) ) {
diff --git a/repo/resources/templates.php b/repo/resources/templates.php
index ea04439..ec9b17b 100644
--- a/repo/resources/templates.php
+++ b/repo/resources/templates.php
@@ -25,22 +25,9 @@
</div>
HTML;
- $templates['wb-entity-toc'] =
+ $templates['wb-entity-header-separator'] =
<<<HTML
-<div id="toc" class="toc wb-toc">
- <div id="toctitle">
- <h2>$1</h2>
- </div>
- <ul>$2</ul>
-</div>
-HTML;
-
-// $1: Index of the section
-// $2: Target of the link
-// $3: Text of the link
- $templates['wb-entity-toc-section'] =
-<<<HTML
-<li class="toclevel-1 tocsection-$1"><a href="#$2"><span
class="toctext">$3</span></a></li>
+<hr class="wb-hr" />
HTML;
// $1: Text of the heading.
diff --git a/repo/resources/themes/default/wikibase.toc.css
b/repo/resources/themes/default/wikibase.toc.css
deleted file mode 100644
index c8ed95a..0000000
--- a/repo/resources/themes/default/wikibase.toc.css
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * CSS for table of contents.
- *
- * @licence GNU GPL v2+
- * @author H. Snater < [email protected] >
- * @author Thiemo Mättig
- */
-
-.wikibase-entityview #toc {
- background-color: #f8f8f8;
- border-collapse: collapse;
- border-color: #c9c9c9;
- float: left;
- margin-top: 1.8em;
- width: 100%;
-}
-
-.wikibase-entityview #toc #toctitle {
- display: none;
-}
-
-.wikibase-entityview #toc ul {
- float: left;
- margin: 0 0 0 -.5em;
- padding: .4em 10px;
-}
-
-.wikibase-entityview #toc li {
- border-right: 1px solid #c9c9c9;
- float: left;
- margin: 0;
- padding: 0 .5em;
- white-space: nowrap;
-}
-
-.wikibase-entityview #toc li:last-child {
- border-right: 0;
-}
-
-/* FIXME: Should be removed if the Typography refresh is stable */
-#content .wikibase-entityview #toc {
- margin-top: 1.8em;
-}
--
To view, visit https://gerrit.wikimedia.org/r/184629
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I817baed5d42ca650f5ba0a78a53dea606fcbfbae
Gerrit-PatchSet: 10
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
Gerrit-Reviewer: Adrian Lang <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits