Jforrester has uploaded a new change for review.

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

Change subject: Preserve pre-existing css classes on edit tab link
......................................................................

Preserve pre-existing css classes on edit tab link

Follows-up Ib2e6237483338c8.

Note that the potentially dangling space is cleaned up by the
Html class in MediaWiki which recognises this as a space-separated
attribute. It also supports an actual array, if MediaWiki core
were to expose 'class' as an array, we could just cleanly push an
extra into it (as well as easily removing items). But this hook
maintains this array item as a string for backwards compatibility
with hook listeners that expect a string.

Bug: 64646
Change-Id: Ib74ecf93fc4fc4bbb1af43efdf325edc7fb2d85f
(cherry picked from commit 2364e35ad5736eab2e401f2d64ac05fcfb59f95a)
---
M VisualEditor.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/22/130622/1

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 790daae..1140b04 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -114,11 +114,11 @@
 
                                // Inject the VE tab before or after the edit 
tab
                                if ( $wgVisualEditorTabPosition === 'before' ) {
-                                       $editTab['class'] = 'collapsible';
+                                       $editTab['class'] .= ' collapsible';
                                        $newViews['ve-edit'] = $veTab;
                                        $newViews['edit'] = $editTab;
                                } else {
-                                       $veTab['class'] = 'collapsible';
+                                       $veTab['class'] .= ' collapsible';
                                        $newViews['edit'] = $editTab;
                                        $newViews['ve-edit'] = $veTab;
                                }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib74ecf93fc4fc4bbb1af43efdf325edc7fb2d85f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to