[MediaWiki-commits] [Gerrit] Attach link handlers to redlinks after restoring the draft - change (mediawiki...ContentTranslation)

2015-06-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Attach link handlers to redlinks after restoring the draft
..


Attach link handlers to redlinks after restoring the draft

The redlinks were missing rel=mw:WikiLink attributes and because of that
the link handlers were not attached.

Testplan:
Do a translation. Make some link red. Save. Restore. See the redlink
is still present and clicking on it brings link card

Change-Id: I176d1030b1a46e995ed85ffafe1ed693cdacb6ae
---
M modules/tools/ext.cx.tools.link.js
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/tools/ext.cx.tools.link.js 
b/modules/tools/ext.cx.tools.link.js
index 7643038..b3ad055 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -246,7 +246,11 @@
return;
}
}
-   this.$link.removeClass( 'cx-target-link-unadapted' ).addClass( 
'new' );
+
+   this.$link
+   .attr( 'rel', 'mw:WikiLink' )
+   .removeClass( 'cx-target-link-unadapted' )
+   .addClass( 'new' );
};
 
CXLink.prototype.isRedLink = function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I176d1030b1a46e995ed85ffafe1ed693cdacb6ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Attach link handlers to redlinks after restoring the draft - change (mediawiki...ContentTranslation)

2015-06-30 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Attach link handlers to redlinks after restoring the draft
..

Attach link handlers to redlinks after restoring the draft

The redlinks were missing rel=mw:WikiLink attributes and because of that
the link handlers were not attached.

Testplan:
Do a translation. Make some link red. Save. Restore. See the redlink
is still present and clicking on it brings link card

Change-Id: I176d1030b1a46e995ed85ffafe1ed693cdacb6ae
---
M modules/tools/ext.cx.tools.link.js
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/modules/tools/ext.cx.tools.link.js 
b/modules/tools/ext.cx.tools.link.js
index 7643038..b3ad055 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -246,7 +246,11 @@
return;
}
}
-   this.$link.removeClass( 'cx-target-link-unadapted' ).addClass( 
'new' );
+
+   this.$link
+   .attr( 'rel', 'mw:WikiLink' )
+   .removeClass( 'cx-target-link-unadapted' )
+   .addClass( 'new' );
};
 
CXLink.prototype.isRedLink = function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I176d1030b1a46e995ed85ffafe1ed693cdacb6ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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