mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-27 17:40:06 +00:00
Drop "About Media Viewer" link
Bug: T376972 Change-Id: I85a308afe7c805a147bfcc5e9adf0293378859f1
This commit is contained in:
parent
fc75d3aabe
commit
161adf921d
|
@ -43,8 +43,6 @@
|
|||
{
|
||||
"name": "mmv/config.json",
|
||||
"config": {
|
||||
"infoLink": "MediaViewerInfoLink",
|
||||
"helpLink": "MediaViewerHelpLink",
|
||||
"useThumbnailGuessing": "MediaViewerUseThumbnailGuessing",
|
||||
"thumbnailBucketSizes": "MediaViewerThumbnailBucketSizes",
|
||||
"imageQueryParameter": "MediaViewerImageQueryParameter",
|
||||
|
@ -163,7 +161,6 @@
|
|||
"multimediaviewer-geoloc-coord",
|
||||
"multimediaviewer-geoloc-coords",
|
||||
"multimediaviewer-geolocation",
|
||||
"multimediaviewer-about-mmv",
|
||||
"mypreferences",
|
||||
"multimediaviewer-metadata-error",
|
||||
"multimediaviewer-title-popup-text",
|
||||
|
@ -415,14 +412,6 @@
|
|||
"webp": "default"
|
||||
}
|
||||
},
|
||||
"MediaViewerInfoLink": {
|
||||
"description": "Link to more information about this module.",
|
||||
"value": "https://mediawiki.org/wiki/Special:MyLanguage/Extension:Media_Viewer/About"
|
||||
},
|
||||
"MediaViewerHelpLink": {
|
||||
"description": "Link to help about this .",
|
||||
"value": "https://mediawiki.org/wiki/Special:MyLanguage/Help:Extension:Media_Viewer"
|
||||
},
|
||||
"MediaViewerUseThumbnailGuessing": {
|
||||
"description": "When this is enabled, MediaViewer will try to guess image URLs instead of making an imageinfo API to get them from the server. This speeds up image loading, but will result in 404s when $wgGenerateThumbnailOnParse (so the thumbnails are only generated as a result of the API request). MediaViewer will catch such 404 errors and fall back to the API request, but depending on how the site is set up, the 404 might get cached, or redirected, causing the image load to fail. The safe way to use URL guessing is with a 404 handler: https://www.mediawiki.org/wiki/Manual:Thumb.php#404_Handler",
|
||||
"value": false
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
"multimediaviewer-restriction-trademarked": "This image contains content which may be subject to trademark laws.",
|
||||
"multimediaviewer-restriction-default": "This image may be restricted by legal provisions outside of copyright law. See the file description page for details.",
|
||||
"multimediaviewer-restriction-default-and-others": "This image may be further restricted by other legal provisions outside of copyright law. See the file description page for details.",
|
||||
"multimediaviewer-about-mmv": "About Media Viewer",
|
||||
"multimediaviewer-geoloc-north": "N",
|
||||
"multimediaviewer-geoloc-east": "E",
|
||||
"multimediaviewer-geoloc-south": "S",
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
"multimediaviewer-restriction-trademarked": "Text of the tooltip for the trademarked restriction label, that is displayed when hovered over.",
|
||||
"multimediaviewer-restriction-default": "Text of the tooltip for the default restriction label, that is displayed when hovered over.",
|
||||
"multimediaviewer-restriction-default-and-others": "Text of the tooltip for the default restriction label when other restriction labels are present, that is displayed when hovered over.",
|
||||
"multimediaviewer-about-mmv": "Text for a link to a page with more information about Media Viewer software.",
|
||||
"multimediaviewer-geoloc-north": "{{optional}}\nSymbol for representing \"north\" in geolocation coordinates.\n\nUsed as <code>$4</code> in {{msg-mw|Multimediaviewer-geoloc-coord}}.",
|
||||
"multimediaviewer-geoloc-east": "{{optional}}\nSymbol for representing \"east\" in geolocation coordinates.\n\nUsed as <code>$4</code> in {{msg-mw|Multimediaviewer-geoloc-coord}}.",
|
||||
"multimediaviewer-geoloc-south": "{{optional}}\nSymbol for representing \"south\" in geolocation coordinates.\n\nUsed as <code>$4</code> in {{msg-mw|Multimediaviewer-geoloc-coord}}.",
|
||||
|
|
|
@ -23,7 +23,6 @@ const Permission = require( './mmv.ui.permission.js' );
|
|||
const ProgressBar = require( './mmv.ui.progressBar.js' );
|
||||
const StripeButtons = require( './mmv.ui.stripeButtons.js' );
|
||||
const TruncatableTextField = require( './mmv.ui.truncatableTextField.js' );
|
||||
const { infoLink } = require( '../config.json' );
|
||||
|
||||
/**
|
||||
* Represents the metadata panel in the viewer
|
||||
|
@ -42,7 +41,6 @@ class MetadataPanel extends UiElement {
|
|||
|
||||
this.initializeHeader();
|
||||
this.initializeImageMetadata();
|
||||
this.initializeAboutLinks();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -355,23 +353,6 @@ class MetadataPanel extends UiElement {
|
|||
.appendTo( this.$locationLi );
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes two about links at the bottom of the panel.
|
||||
*/
|
||||
initializeAboutLinks() {
|
||||
this.$mmvAboutLink = $( '<a>' )
|
||||
.prop( 'href', infoLink )
|
||||
.text( mw.msg( 'multimediaviewer-about-mmv' ) )
|
||||
.addClass( 'mw-mmv-about-link' );
|
||||
|
||||
this.$mmvAboutLinks = $( '<div>' )
|
||||
.addClass( 'mw-mmv-about-links' )
|
||||
.append(
|
||||
this.$mmvAboutLink
|
||||
)
|
||||
.appendTo( this.$imageMetadata );
|
||||
}
|
||||
|
||||
/* Setters */
|
||||
/**
|
||||
* Sets the image title at the top of the metadata panel.
|
||||
|
|
|
@ -217,13 +217,6 @@
|
|||
padding-left: @horizontal-padding;
|
||||
}
|
||||
|
||||
.mw-mmv-about-links {
|
||||
font-size: @littlefont;
|
||||
padding: @horizontal-padding;
|
||||
width: 50%;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.mw-mmv-label {
|
||||
background-color: @background-color-interactive;
|
||||
color: @color-base;
|
||||
|
|
|
@ -203,7 +203,7 @@ const { getMultimediaViewer } = require( './mmv.testhelpers.js' );
|
|||
|
||||
panelBottom = $( '.mw-mmv-post-image' ).position().top + $( '.mw-mmv-post-image' ).height();
|
||||
|
||||
assert.true( panelBottom > $( window ).height(), 'Image metadata extends beyond the viewport' );
|
||||
assert.false( panelBottom > $( window ).height(), 'Image metadata does not extend beyond the viewport' );
|
||||
assert.strictEqual( lightbox.isFullscreen, false, 'Lightbox knows that it\'s not in fullscreen mode' );
|
||||
|
||||
// Unattach lightbox from document
|
||||
|
|
|
@ -201,16 +201,3 @@ QUnit.test( 'Date formatting', ( assert ) => {
|
|||
|
||||
assert.strictEqual( result, date1, 'Invalid date is correctly ignored' );
|
||||
} );
|
||||
|
||||
QUnit.test( 'About links', function ( assert ) {
|
||||
const $qf = $( '#qunit-fixture' );
|
||||
|
||||
this.sandbox.stub( mw.user, 'isAnon' );
|
||||
// eslint-disable-next-line no-new
|
||||
new MetadataPanel(
|
||||
$qf.empty(), $( '<div>' ).appendTo( $qf ),
|
||||
new Config()
|
||||
);
|
||||
|
||||
assert.strictEqual( $qf.find( '.mw-mmv-about-link' ).length, 1, 'About link is created.' );
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue