Santhosh has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/349935 )
Change subject: mw.cx.ui.SectionTranslationUnit: Disconnect click handler
......................................................................
mw.cx.ui.SectionTranslationUnit: Disconnect click handler
Click handler to translate need to execute only once.
Change-Id: If2b70aba8c95af0dea8cef695b8ff6e03bf3889c
---
M modules/ui/translationunits/mw.cx.ui.SectionTranslationUnit.js
1 file changed, 3 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/35/349935/1
diff --git a/modules/ui/translationunits/mw.cx.ui.SectionTranslationUnit.js
b/modules/ui/translationunits/mw.cx.ui.SectionTranslationUnit.js
index 80f80bf..02fc6b5 100644
--- a/modules/ui/translationunits/mw.cx.ui.SectionTranslationUnit.js
+++ b/modules/ui/translationunits/mw.cx.ui.SectionTranslationUnit.js
@@ -107,6 +107,9 @@
mw.cx.ui.SectionTranslationUnit.prototype.translate = function () {
this.removeHighlight();
+ // Click handler to translate need to execute only once.
+ this.disconnect( this, { click: 'translate' } );
+
if ( !this.isTranslated() ) {
// Adapt in general will be asynchronous operation
this.model.adapt();
--
To view, visit https://gerrit.wikimedia.org/r/349935
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If2b70aba8c95af0dea8cef695b8ff6e03bf3889c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits