jenkins-bot has submitted this change and it was merged.
Change subject: Make description scrollable
......................................................................
Make description scrollable
The autoEllipsis nonsense wasn't working, this is wayyy better.
Bug: 56145
Change-Id: Iaca83c405969d09c53c09561236a39d82bad7de2
---
M css/ext.multimediaViewer.css
M js/ext.multimediaViewer.js
2 files changed, 12 insertions(+), 1 deletion(-)
Approvals:
Gergő Tisza: Looks good to me, approved
jenkins-bot: Verified
diff --git a/css/ext.multimediaViewer.css b/css/ext.multimediaViewer.css
index b5dd2ab..3c36d3e 100644
--- a/css/ext.multimediaViewer.css
+++ b/css/ext.multimediaViewer.css
@@ -106,10 +106,16 @@
.mw-mlb-image-links-div {
display: inline-block;
width: 50%;
+ height: 100px;
+ vertical-align: top;
}
.mw-mlb-image-desc {
color: #6f7073;
+}
+
+.mw-mlb-image-desc-div {
+ overflow-y: auto;
}
.mw-mlb-image-links li {
@@ -221,6 +227,7 @@
display: block;
}
+.mw-mlb-image-desc-div.empty,
.mlb-image.empty img {
display: none;
}
diff --git a/js/ext.multimediaViewer.js b/js/ext.multimediaViewer.js
index 622300f..9ec901d 100755
--- a/js/ext.multimediaViewer.js
+++ b/js/ext.multimediaViewer.js
@@ -169,6 +169,7 @@
this.$imageDescDiv = $( '<div>' )
.addClass( 'mw-mlb-image-desc-div' )
+ .addClass( 'empty' )
.html( this.$imageDesc );
this.$imageLinks = $( '<ul>' )
@@ -416,7 +417,8 @@
} );
lightboxHooks.register( 'clearInterface', function () {
- this.$imageDesc.empty().addClass( 'empty' );
+ this.$imageDesc.empty();
+ this.$imageDescDiv.addClass( 'empty' );
this.$title.empty().addClass( 'empty' );
this.$credit.empty().addClass( 'empty' );
@@ -603,6 +605,8 @@
if ( extmeta ) {
desc = extmeta.ImageDescription;
+ ui.$imageDescDiv.toggleClass( 'empty', !desc );
+
if ( desc ) {
desc = desc.value;
whitelistHtml( ui.$imageDesc.append(
$.parseHTML( desc ) ) );
--
To view, visit https://gerrit.wikimedia.org/r/93092
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaca83c405969d09c53c09561236a39d82bad7de2
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
Gerrit-Reviewer: Gergő Tisza <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits