Santhosh has uploaded a new change for review.

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

Change subject: Disable all links in the source column
......................................................................

Disable all links in the source column

Change-Id: Ic57e545f553eeceb2d6e98197ab5ade8f149acc6
---
M modules/source/ext.cx.source.js
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/82/121582/1

diff --git a/modules/source/ext.cx.source.js b/modules/source/ext.cx.source.js
index f2e4602..fad2c0b 100644
--- a/modules/source/ext.cx.source.js
+++ b/modules/source/ext.cx.source.js
@@ -73,9 +73,20 @@
 
        ContentTranslationSource.prototype.load = function () {
                this.$content.html( mw.cx.data.segmentedContent );
+               // Disable all links
+               this.disableLinks();
                mw.hook( 'mw.cx.source.loaded' ).fire();
        };
 
+       /**
+        * Disable all links in the content area.
+        */
+       ContentTranslationSource.prototype.disableLinks = function () {
+               this.$content.find( 'a' ).bind( 'click', function () {
+                       return false;
+               } );
+       };
+
        ContentTranslationSource.prototype.listen = function () {
                mw.hook( 'mw.cx.source.ready' ).add( $.proxy( this.load, this ) 
);
        };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic57e545f553eeceb2d6e98197ab5ade8f149acc6
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

Reply via email to