mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Merge "MWLinkAnnotationInspector: track edits to the label field"
This commit is contained in:
commit
d401562629
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue