Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/176731

Change subject: Fix inconsistencies in attribution text * use the same text for 
plain and HTML format * use the same text whether or not a deed URL is set
......................................................................

Fix inconsistencies in attribution text
* use the same text for plain and HTML format
* use the same text whether or not a deed URL is set

Bug: T76030
Change-Id: Iea53766b2e2031206d707838551bd82dba29e8c4
---
M resources/mmv/mmv.EmbedFileFormatter.js
M resources/mmv/model/mmv.model.License.js
2 files changed, 6 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/31/176731/1

diff --git a/resources/mmv/mmv.EmbedFileFormatter.js 
b/resources/mmv/mmv.EmbedFileFormatter.js
index e815d79..49a0ddb 100644
--- a/resources/mmv/mmv.EmbedFileFormatter.js
+++ b/resources/mmv/mmv.EmbedFileFormatter.js
@@ -127,7 +127,7 @@
                }
                if ( info.imageInfo.license ) {
                        creditParams[0] += 'l';
-                       creditParams.push( this.htmlUtils.htmlToText( 
info.imageInfo.license.longName || '' ) );
+                       creditParams.push( this.htmlUtils.htmlToText( 
info.imageInfo.license.getShortName() ) );
                }
 
                creditParams[0] += 's';
diff --git a/resources/mmv/model/mmv.model.License.js 
b/resources/mmv/model/mmv.model.License.js
index df04b47..1c007d4 100644
--- a/resources/mmv/model/mmv.model.License.js
+++ b/resources/mmv/model/mmv.model.License.js
@@ -122,15 +122,17 @@
         * @return {string}
         */
        LP.getShortLink = function () {
+               var shortName = this.getShortName();
+
                if ( this.deedUrl ) {
                        return this.htmlUtils.jqueryToHtml(
                                $( '<a>' ).prop( {
                                        href: this.deedUrl,
-                                       title: this.longName
-                               } ).text( this.getShortName() )
+                                       title: this.longName || shortName
+                               } ).text( shortName )
                        );
                } else {
-                       return this.shortName;
+                       return shortName;
                }
        };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea53766b2e2031206d707838551bd82dba29e8c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org>

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

Reply via email to