Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/144435
Change subject: Show double cards when clicked on links in translation column ...................................................................... Show double cards when clicked on links in translation column Change-Id: Iaef6576c32f12cf59f73e0bc7ded4c70d911f055 --- M modules/tools/ext.cx.tools.link.js 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/35/144435/1 diff --git a/modules/tools/ext.cx.tools.link.js b/modules/tools/ext.cx.tools.link.js index d98092f..1f56333 100644 --- a/modules/tools/ext.cx.tools.link.js +++ b/modules/tools/ext.cx.tools.link.js @@ -409,7 +409,7 @@ * @param {string} [language] The language where the link points to. */ LinkCard.prototype.start = function ( link, language ) { - var title, linkCard = this; + var title, sourceTitle, linkCard = this; // If language is not given, use target language language = language || mw.cx.targetLanguage; @@ -443,6 +443,12 @@ if ( language === mw.cx.targetLanguage ) { linkCard.prepareTargetLinkCard( title, language ); + sourceTitle = this.$link && this.$link.data( 'parsoid' ) && + this.$link.data( 'parsoid' ).a.href; + if ( sourceTitle ) { + sourceTitle = cleanupLinkHref( sourceTitle ); + linkCard.prepareSourceLinkCard( sourceTitle, mw.cx.sourceLanguage ); + } } else { // Adapt the title to the target language from source language linkCard.adapt( title, mw.cx.targetLanguage ).done( function ( adaptations ) { -- To view, visit https://gerrit.wikimedia.org/r/144435 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaef6576c32f12cf59f73e0bc7ded4c70d911f055 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits