Merge "MWLinkAnnotationInspector: track edits to the label field"

This commit is contained in:
jenkins-bot 2019-09-03 15:47:16 +00:00 committed by Gerrit Code Review
commit d401562629

View file

@ -89,6 +89,7 @@ ve.ui.MWLinkAnnotationInspector.prototype.initialize = function () {
// Events
this.linkTypeIndex.connect( this, { set: 'onLinkTypeIndexSet' } );
this.labelInput.connect( this, { change: 'onLabelInputChange' } );
this.internalAnnotationInput.connect( this, { change: 'onInternalLinkChange' } );
this.externalAnnotationInput.connect( this, { change: 'onExternalLinkChange' } );
this.internalAnnotationInput.input.getResults().connect( this, { choose: 'onFormSubmit' } );
@ -149,6 +150,18 @@ ve.ui.MWLinkAnnotationInspector.prototype.isExternal = function () {
return this.linkTypeIndex.getCurrentTabPanelName() === 'external';
};
/**
* Handle change events on the label input
*
* @param {string} value
*/
ve.ui.MWLinkAnnotationInspector.prototype.onLabelInputChange = function () {
if ( this.isActive && !this.trackedLabelInputChange ) {
ve.track( 'activity.' + this.constructor.static.name, { action: 'label-input' } );
this.trackedLabelInputChange = true;
}
};
/**
* Handle change events on the internal link widget
*