mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-09-25 03:09:40 +00:00
Merge "Include license in title attribute of link in FileUsageDialog"
This commit is contained in:
commit
ea7ba8faaf
|
@ -631,6 +631,9 @@
|
|||
// Cannot display, fallback or fail
|
||||
license = 'default';
|
||||
msgname = 'multimediaviewer-license-default';
|
||||
} else {
|
||||
// License found, store the license data
|
||||
ui.$license.data( 'license', mw.message( msgname ).text() );
|
||||
}
|
||||
|
||||
if ( license ) {
|
||||
|
|
|
@ -327,6 +327,10 @@
|
|||
pattern = /^\/[^\/]/,
|
||||
finalLink = pattern.test(link) ? linkPrefix +link: link,
|
||||
|
||||
license = this.$license.data( 'license' ) || '',
|
||||
author = this.$author.text(),
|
||||
linkTitle = ( license + ( author ? ' (' + author + ')' : '' ) ).trim(),
|
||||
|
||||
owtId = 'mw-mlb-use-file-onwiki-thumb',
|
||||
ownId = 'mw-mlb-use-file-onwiki-normal',
|
||||
owId = 'mw-mlb-use-file-offwiki',
|
||||
|
@ -373,7 +377,7 @@
|
|||
.prop( 'id', owId )
|
||||
.prop( 'readonly', true )
|
||||
.focus( selectAllOnEvent )
|
||||
.val( '<a href="' + finalLink + '"><img src="' + src + '" /></a>' ),
|
||||
.val( '<a href="' + finalLink + ( linkTitle ? '" title="' + linkTitle : '' ) + '" ><img src="' + src + '" /></a>' ),
|
||||
|
||||
|
||||
$offWiki = $( '<div>' )
|
||||
|
|
Loading…
Reference in a new issue