mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-09-23 10:21:11 +00:00
Add LINK_CLICK action
Change-Id: I2f3b5d51a68e4830abaf7f2dcd5d9ae0eb60d1e7
This commit is contained in:
parent
9611d3b2db
commit
4324200e01
|
@ -41,6 +41,20 @@
|
|||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Represents the user clicking on a link with their mouse, keyboard, or an
|
||||
* assistive device.
|
||||
*
|
||||
* @param {jQuery} $el
|
||||
* @return {Object}
|
||||
*/
|
||||
actions.linkClick = function ( $el ) {
|
||||
return {
|
||||
type: 'LINK_CLICK',
|
||||
el: $el
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an object whose methods encapsulate all actions that can be
|
||||
* dispatched to the given
|
||||
|
|
|
@ -69,7 +69,11 @@
|
|||
} )
|
||||
.on( 'mouseout blur', function () {
|
||||
actions.linkAbandon( this );
|
||||
} )
|
||||
.on( 'click', function () {
|
||||
actions.linkClick( this );
|
||||
} );
|
||||
|
||||
} );
|
||||
} );
|
||||
|
||||
|
|
Loading…
Reference in a new issue