[MediaWiki-commits] [Gerrit] Removed table of content bar - change (mediawiki...Wikibase)

2015-02-08 Thread jenkins-bot (Code Review)
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 

[MediaWiki-commits] [Gerrit] Removed table of content bar - change (mediawiki...Wikibase)

2015-01-13 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Removed table of content bar
..

Removed table of content bar

- 84913

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, 0 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/29/184629/1

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 4c16959..90ddaa7 100644
--- a/repo/includes/View/EntityView.php
+++ b/repo/includes/View/EntityView.php
@@ -163,7 +163,6 @@
$entity,
$this-getHtmlForTermBox( $entityRevision )
);
-   $html .= $this-getHtmlForToc();
 
wfProfileOut( __METHOD__ );
return $html;
@@ -196,46 +195,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 e97569a..41c0740 100644
--- a/repo/includes/View/ItemView.php
+++ b/repo/includes/View/ItemView.php
@@ -83,19 +83,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 3f8bfc4..4f2c55c 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -264,11 +264,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 1a5657c..0ef231b 100644
--- a/repo/resources/templates.php
+++ b/repo/resources/templates.php
@@ -31,24 +31,6 @@
 hr class=wb-hr /
 HTML;
 
-   $templates['wb-entity-toc'] =
-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
-//