Santhosh has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/335611 )
Change subject: Support removal of links from Link card ...................................................................... Support removal of links from Link card Change-Id: Ibcf2dd053e23ee438191ea6d8853fa8d9da37f28 --- M modules/tools/mw.cx.tools.LinkTool.js 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/11/335611/1 diff --git a/modules/tools/mw.cx.tools.LinkTool.js b/modules/tools/mw.cx.tools.LinkTool.js index 3462e96..f91596f 100644 --- a/modules/tools/mw.cx.tools.LinkTool.js +++ b/modules/tools/mw.cx.tools.LinkTool.js @@ -39,7 +39,9 @@ framed: false, classes: [ 'cx-tools-link-remove-button' ] } ); - + this.removeLinkButton.connect( this, { + click: 'removeLink' + } ); this.actions = [ this.addLinkButton, this.removeLinkButton @@ -83,5 +85,10 @@ return panel.$element; }; +mw.cx.tools.LinkTool.prototype.removeLink = function () { + this.translationUnitUIModel.remove(); + this.destroy(); +}; + /* Register */ mw.cx.tools.translationToolFactory.register( mw.cx.tools.LinkTool ); -- To view, visit https://gerrit.wikimedia.org/r/335611 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcf2dd053e23ee438191ea6d8853fa8d9da37f28 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