mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-09-29 13:17:35 +00:00
Link to creativecommons.org for CC licenses
Change-Id: Ifdbb0d835b0eb6950eca3403bb486bbdd34651c6 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/221
This commit is contained in:
parent
3c00f7b3b7
commit
a6619cb1ce
|
@ -405,7 +405,6 @@
|
||||||
*/
|
*/
|
||||||
MPP.setFilePageLink = function ( url ) {
|
MPP.setFilePageLink = function ( url ) {
|
||||||
this.$repo.prop( 'href', url );
|
this.$repo.prop( 'href', url );
|
||||||
this.$license.prop( 'href', url );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -552,12 +551,14 @@
|
||||||
/**
|
/**
|
||||||
* Sets the license display in the panel
|
* Sets the license display in the panel
|
||||||
* @param {string} license The human-readable name of the license
|
* @param {string} license The human-readable name of the license
|
||||||
|
* @param {string} url The URL to the license deed.
|
||||||
* @param {boolean} isCc Whether this is a CC license
|
* @param {boolean} isCc Whether this is a CC license
|
||||||
*/
|
*/
|
||||||
MPP.setLicense = function ( license, isCc ) {
|
MPP.setLicense = function ( license, url, isCc ) {
|
||||||
this.$license
|
this.$license
|
||||||
.text( license )
|
.text( license )
|
||||||
.toggleClass( 'cc-license', isCc );
|
.toggleClass( 'cc-license', isCc )
|
||||||
|
.prop( 'href', url );
|
||||||
|
|
||||||
this.$license.removeClass( 'empty' );
|
this.$license.removeClass( 'empty' );
|
||||||
};
|
};
|
||||||
|
@ -700,7 +701,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( imageData.license ) {
|
if ( imageData.license ) {
|
||||||
this.setLicense( mw.message( msgname ).text(), imageData.isCcLicensed() );
|
this.setLicense(
|
||||||
|
mw.message( msgname ).text(),
|
||||||
|
imageData.license.deedUrl || imageData.descriptionUrl,
|
||||||
|
imageData.isCcLicensed()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( imageData.permission ) {
|
if ( imageData.permission ) {
|
||||||
|
|
Loading…
Reference in a new issue