jenkins-bot has submitted this change and it was merged.

Change subject: Follow-up fix for extra (dashed) border in non-js claimlistview
......................................................................


Follow-up fix for extra (dashed) border in non-js claimlistview

e.g. when viewing a diff, which no longer loads all the js.

wikibase-toolbar-wrapper is present in non-js, so the border
is still present in non-js.

We instead need to provide another css class that is present only
when the js initializes the add toolbar. This class can be used to
apply the dashed top border when the add toolbar is present, which
is the situation where it makes sense to have the dashed border
to separate the toolbar visually from the last statement in the
claimlistview.

Bug: 73172
Change-Id: I61141d81576602c67747cb460e3bbfe60961a7e8
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/wikibase.css
2 files changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Aude: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index 2cbab2c..7ed9f26 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -415,8 +415,10 @@
                claimlistviewcreate: function( event, toolbarcontroller ) {
                        var $claimlistview = $( event.target ),
                                claimlistview = $claimlistview.data( 
'claimlistview' ),
-                               $container = $claimlistview.children( 
'.wikibase-toolbar-wrapper' )
-                                       .children( 
'.wikibase-toolbar-container' );
+                               $toolbarWrapper = $claimlistview.children( 
'.wikibase-toolbar-wrapper' ),
+                               $container = $toolbarWrapper.children( 
'.wikibase-toolbar-container' );
+
+                       $toolbarWrapper.addClass( 'wikibase-addtoolbar-wrapper' 
);
 
                        if( !$container.length ) {
                                // TODO: Remove layout-specific toolbar wrapper
diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css
index 3209f63..7a43c52 100644
--- a/lib/resources/wikibase.css
+++ b/lib/resources/wikibase.css
@@ -301,11 +301,11 @@
        width: 100%;
 }
 
-.wb-claimlistview > .wikibase-toolbar-wrapper {
+.wb-claimlistview > .wikibase-addtoolbar-wrapper {
        border-top: 1px dashed #AAA;
 }
 
-.wb-claimlistview.wb-new > .wikibase-toolbar-wrapper {
+.wb-claimlistview.wb-new > .wikibase-addtoolbar-wrapper {
        border-top: 0;
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61141d81576602c67747cb460e3bbfe60961a7e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <aude.w...@gmail.com>
Gerrit-Reviewer: Adrian Lang <adrian.l...@wikimedia.de>
Gerrit-Reviewer: Aude <aude.w...@gmail.com>
Gerrit-Reviewer: Henning Snater <henning.sna...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to