[MediaWiki-commits] [Gerrit] TopMenuBarCustomizer: Added anchor ids to output + fixes/imp... - change (mediawiki...BlueSpiceExtensions)
jenkins-bot has submitted this change and it was merged. Change subject: TopMenuBarCustomizer: Added anchor ids to output + fixes/improvements .. TopMenuBarCustomizer: Added anchor ids to output + fixes/improvements * Added anchorID property + setter to view * Fixed "wiki" navigation site id * Added this return to each setter in view * Fixed white-space wrap for child items * Did some cc => needs merge to REL1_23! PatchSet2 * Fixed typo in commit messge * Uses Sanitizer to escape id PatchSet3 * Also added anchorID to child items PatchSet 4 * Used id escaping in the correct position Change-Id: I99ed9e79242636cadce46550847bb62f1c82b501 (cherry picked from commit 8e5e7e31d097a740d457185d2358a3c28b5ed5d8) --- M TopMenuBarCustomizer/TopMenuBarCustomizer.class.php M TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css M TopMenuBarCustomizer/views/view.TopMenuItem.php 3 files changed, 77 insertions(+), 21 deletions(-) Approvals: Robert Vogel: Looks good to me, approved jenkins-bot: Verified diff --git a/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php b/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php index b2d8281..ddea9b7 100644 --- a/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php +++ b/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php @@ -126,7 +126,7 @@ $oMainPage = Title::newMainPage(); self::$aNavigationSites[] = array( - 'id' => 'wiki', + 'id' => 'nt-wiki', 'href' => $oMainPage->getFullURL(), 'text' => $wgSitename, 'active' => $oCurrentTitle->equals( $oMainPage ), @@ -204,13 +204,16 @@ foreach( self::getNavigationSites() as $aApp ) { $aApp = array_merge(self::$aNavigationSiteTemplate, $aApp); $oMainItem = new ViewTopMenuItem(); - $oMainItem->setLevel( $aApp['level'] ); - $oMainItem->setName( $aApp['id'] ); - $oMainItem->setLink( $aApp['href'] ); - $oMainItem->setDisplaytitle( $aApp['text'] ); - $oMainItem->setActive( $aApp['active'] ); - $oMainItem->setContainsActive( $aApp['containsactive'] ); - $oMainItem->setExternal( $aApp['external'] ); + $oMainItem + ->setName( $aApp['id'] ) + ->setLink( $aApp['href'] ) + ->setLevel( $aApp['level'] ) + ->setActive( $aApp['active'] ) + ->setExternal( $aApp['external'] ) + ->setAnchorID( $aApp['id'] ) + ->setDisplaytitle( $aApp['text'] ) + ->setContainsActive( $aApp['containsactive'] ) + ; if( !empty($aApp['children']) ) { $oMainItem->setChildren( $aApp['children'] ); } @@ -238,4 +241,4 @@ $this->getCacheKey( 'NavigationSitesData' ) ); } -} \ No newline at end of file +} diff --git a/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css b/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css index b10b7a2..f301117 100644 --- a/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css +++ b/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css @@ -33,3 +33,6 @@ .bs-apps-child a:hover{ background: none; } +.bs-apps-child a{ + white-space: nowrap; +} \ No newline at end of file diff --git a/TopMenuBarCustomizer/views/view.TopMenuItem.php b/TopMenuBarCustomizer/views/view.TopMenuItem.php index 2e2417d..c5236e1 100644 --- a/TopMenuBarCustomizer/views/view.TopMenuItem.php +++ b/TopMenuBarCustomizer/views/view.TopMenuItem.php @@ -26,6 +26,11 @@ */ protected $iLevel = 1; /** +* Item AnchorID +* @var string +*/ + protected $sAnchorID = ''; + /** * Name of the item * @var string */ @@ -71,65 +76,91 @@ /** * Sets the level property * @param integer $iLevel +* @return ViewTopMenuItem */ public function setLevel( $iLevel ) { $this->iLevel = $iLevel; + return $this; + } + + /** +* Sets the sAnchorID property +* @param string sAnchorID +* @return ViewTopMenuItem +*/ + public function setAnchorID( $sAnchorID ) { + $this->sAnchorID = $sAnchorID; + return $this; } /** * Sets the name property * @param string $sName +* @return ViewTopMenuItem */
[MediaWiki-commits] [Gerrit] TopMenuBarCustomizer: Added anchor ids to output + fixes/imp... - change (mediawiki...BlueSpiceExtensions)
Pwirth has uploaded a new change for review. https://gerrit.wikimedia.org/r/250668 Change subject: TopMenuBarCustomizer: Added anchor ids to output + fixes/improvements .. TopMenuBarCustomizer: Added anchor ids to output + fixes/improvements * Added anchorID property + setter to view * Fixed "wiki" navigation site id * Added this return to each setter in view * Fixed white-space wrap for child items * Did some cc => needs merge to REL1_23! PatchSet2 * Fixed typo in commit messge * Uses Sanitizer to escape id PatchSet3 * Also added anchorID to child items PatchSet 4 * Used id escaping in the correct position Change-Id: I99ed9e79242636cadce46550847bb62f1c82b501 (cherry picked from commit 8e5e7e31d097a740d457185d2358a3c28b5ed5d8) --- M TopMenuBarCustomizer/TopMenuBarCustomizer.class.php M TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css M TopMenuBarCustomizer/views/view.TopMenuItem.php 3 files changed, 77 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/68/250668/1 diff --git a/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php b/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php index b2d8281..ddea9b7 100644 --- a/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php +++ b/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php @@ -126,7 +126,7 @@ $oMainPage = Title::newMainPage(); self::$aNavigationSites[] = array( - 'id' => 'wiki', + 'id' => 'nt-wiki', 'href' => $oMainPage->getFullURL(), 'text' => $wgSitename, 'active' => $oCurrentTitle->equals( $oMainPage ), @@ -204,13 +204,16 @@ foreach( self::getNavigationSites() as $aApp ) { $aApp = array_merge(self::$aNavigationSiteTemplate, $aApp); $oMainItem = new ViewTopMenuItem(); - $oMainItem->setLevel( $aApp['level'] ); - $oMainItem->setName( $aApp['id'] ); - $oMainItem->setLink( $aApp['href'] ); - $oMainItem->setDisplaytitle( $aApp['text'] ); - $oMainItem->setActive( $aApp['active'] ); - $oMainItem->setContainsActive( $aApp['containsactive'] ); - $oMainItem->setExternal( $aApp['external'] ); + $oMainItem + ->setName( $aApp['id'] ) + ->setLink( $aApp['href'] ) + ->setLevel( $aApp['level'] ) + ->setActive( $aApp['active'] ) + ->setExternal( $aApp['external'] ) + ->setAnchorID( $aApp['id'] ) + ->setDisplaytitle( $aApp['text'] ) + ->setContainsActive( $aApp['containsactive'] ) + ; if( !empty($aApp['children']) ) { $oMainItem->setChildren( $aApp['children'] ); } @@ -238,4 +241,4 @@ $this->getCacheKey( 'NavigationSitesData' ) ); } -} \ No newline at end of file +} diff --git a/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css b/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css index b10b7a2..f301117 100644 --- a/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css +++ b/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css @@ -33,3 +33,6 @@ .bs-apps-child a:hover{ background: none; } +.bs-apps-child a{ + white-space: nowrap; +} \ No newline at end of file diff --git a/TopMenuBarCustomizer/views/view.TopMenuItem.php b/TopMenuBarCustomizer/views/view.TopMenuItem.php index 2e2417d..c5236e1 100644 --- a/TopMenuBarCustomizer/views/view.TopMenuItem.php +++ b/TopMenuBarCustomizer/views/view.TopMenuItem.php @@ -26,6 +26,11 @@ */ protected $iLevel = 1; /** +* Item AnchorID +* @var string +*/ + protected $sAnchorID = ''; + /** * Name of the item * @var string */ @@ -71,65 +76,91 @@ /** * Sets the level property * @param integer $iLevel +* @return ViewTopMenuItem */ public function setLevel( $iLevel ) { $this->iLevel = $iLevel; + return $this; + } + + /** +* Sets the sAnchorID property +* @param string sAnchorID +* @return ViewTopMenuItem +*/ + public function setAnchorID( $sAnchorID ) { + $this->sAnchorID = $sAnchorID; + return $this; } /** * Sets the name property * @param string
[MediaWiki-commits] [Gerrit] TopMenuBarCustomizer: Added anchor ids to output + fixes/imp... - change (mediawiki...BlueSpiceExtensions)
jenkins-bot has submitted this change and it was merged. Change subject: TopMenuBarCustomizer: Added anchor ids to output + fixes/improvements .. TopMenuBarCustomizer: Added anchor ids to output + fixes/improvements * Added anchorID property + setter to view * Fixed "wiki" navigation site id * Added this return to each setter in view * Fixed white-space wrap for child items * Did some cc => needs merge to REL1_23! PatchSet2 * Fixed typo in commit messge * Uses Sanitizer to escape id PatchSet3 * Also added anchorID to child items PatchSet 4 * Used id escaping in the correct position Change-Id: I99ed9e79242636cadce46550847bb62f1c82b501 --- M TopMenuBarCustomizer/TopMenuBarCustomizer.class.php M TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css M TopMenuBarCustomizer/views/view.TopMenuItem.php 3 files changed, 76 insertions(+), 20 deletions(-) Approvals: Mglaser: Looks good to me, approved jenkins-bot: Verified diff --git a/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php b/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php index 63c5d32..8b9c6b5 100644 --- a/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php +++ b/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php @@ -126,7 +126,7 @@ $oMainPage = Title::newMainPage(); self::$aNavigationSites[] = array( - 'id' => 'wiki', + 'id' => 'nt-wiki', 'href' => $oMainPage->getFullURL(), 'text' => $wgSitename, 'active' => $oCurrentTitle->equals( $oMainPage ), @@ -204,13 +204,16 @@ foreach( self::getNavigationSites() as $aApp ) { $aApp = array_merge(self::$aNavigationSiteTemplate, $aApp); $oMainItem = new ViewTopMenuItem(); - $oMainItem->setLevel( $aApp['level'] ); - $oMainItem->setName( $aApp['id'] ); - $oMainItem->setLink( $aApp['href'] ); - $oMainItem->setDisplaytitle( $aApp['text'] ); - $oMainItem->setActive( $aApp['active'] ); - $oMainItem->setContainsActive( $aApp['containsactive'] ); - $oMainItem->setExternal( $aApp['external'] ); + $oMainItem + ->setName( $aApp['id'] ) + ->setLink( $aApp['href'] ) + ->setLevel( $aApp['level'] ) + ->setActive( $aApp['active'] ) + ->setExternal( $aApp['external'] ) + ->setAnchorID( $aApp['id'] ) + ->setDisplaytitle( $aApp['text'] ) + ->setContainsActive( $aApp['containsactive'] ) + ; if( !empty($aApp['children']) ) { $oMainItem->setChildren( $aApp['children'] ); } diff --git a/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css b/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css index b10b7a2..f301117 100644 --- a/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css +++ b/TopMenuBarCustomizer/resources/bluespice.TopMenuBarCustomizer.css @@ -33,3 +33,6 @@ .bs-apps-child a:hover{ background: none; } +.bs-apps-child a{ + white-space: nowrap; +} \ No newline at end of file diff --git a/TopMenuBarCustomizer/views/view.TopMenuItem.php b/TopMenuBarCustomizer/views/view.TopMenuItem.php index 2e2417d..c5236e1 100644 --- a/TopMenuBarCustomizer/views/view.TopMenuItem.php +++ b/TopMenuBarCustomizer/views/view.TopMenuItem.php @@ -26,6 +26,11 @@ */ protected $iLevel = 1; /** +* Item AnchorID +* @var string +*/ + protected $sAnchorID = ''; + /** * Name of the item * @var string */ @@ -71,65 +76,91 @@ /** * Sets the level property * @param integer $iLevel +* @return ViewTopMenuItem */ public function setLevel( $iLevel ) { $this->iLevel = $iLevel; + return $this; + } + + /** +* Sets the sAnchorID property +* @param string sAnchorID +* @return ViewTopMenuItem +*/ + public function setAnchorID( $sAnchorID ) { + $this->sAnchorID = $sAnchorID; + return $this; } /** * Sets the name property * @param string $sName +* @return ViewTopMenuItem */ public function setName( $sName ) { $this->sName = $sName; + return $this; } /** * Sets the display title property * @param string $sDisplayTitle +*