Krinkle has uploaded a new change for review.

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

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
---
M VisualEditor.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 56ffa10..0a8d323 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/130594
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: master
Gerrit-Owner: 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