Hygiene: revise CtaDrawer.events to options

Use CtaDrawer.options.events when available instead of CtaDrawer.events.

Change-Id: I7cf5d97bef9179dfa148fa4d5ca447d128031b57
Related: I4a4129b2cac7c7c49559beef0b8780f3211edf9c
Bug: T210870
This commit is contained in:
Stephen Niedzielski 2018-12-20 19:31:58 +00:00
parent fef6dd217a
commit 9f70a004c7
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,7 @@
Icon = M.require( 'mobile.startup/Icon' ),
Button = M.require( 'mobile.startup/Button' ),
Anchor = M.require( 'mobile.startup/Anchor' ),
util = M.require( 'mobile.startup/util' ),
overlayManager = OverlayManager.getSingleton(),
page = M.getCurrentPage(),
api = new mw.Api(),
@ -309,6 +310,9 @@
label: mw.msg( 'mobile-frontend-editor-redlink-leave' ),
additionalClassNames: 'hide'
} ).options,
events: util.extend( {}, CtaDrawer.prototype.events, {
'click .hide': 'hide' // Call CtaDrawer.hide() on closeAnchor click.
} ),
content: mw.msg( 'mobile-frontend-editor-redlink-explain' ),
actionAnchor: false
},