From: Timo Tijhof Date: Sun, 6 Oct 2013 22:25:15 +0000 (+0200) Subject: postEdit: Add documentation for hook so it shows up in the index X-Git-Tag: 1.31.0-rc.0~18593 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=faac9769ef3143c2ca5864dfd71fc7a8e7a581e9;p=lhc%2Fweb%2Fwiklou.git postEdit: Add documentation for hook so it shows up in the index Follows-up 011ee683a. Change-Id: I3ce89a91f6a299516dd8dfb93dd5cc5b784fa471 --- diff --git a/resources/mediawiki.action/mediawiki.action.view.postEdit.js b/resources/mediawiki.action/mediawiki.action.view.postEdit.js index 8e67ea92bd..6e4df9f0d2 100644 --- a/resources/mediawiki.action/mediawiki.action.view.postEdit.js +++ b/resources/mediawiki.action/mediawiki.action.view.postEdit.js @@ -1,6 +1,23 @@ ( function ( mw, $ ) { 'use strict'; + /** + * @event postEdit + * @member mw.hook + * @param {Object} [data] Optional data + * @param {string|jQuery|Array} [data.message] Message that listeners + * should use when displaying notifications. String for plain text, + * use array or jQuery object to pass actual nodes. + * @param {string|mw.user} [data.user=mw.user] User that made the edit. + */ + + /** + * After the listener for #postEdit removes the notification. + * + * @event postEdit_afterRemoval + * @member mw.hook + */ + var config = mw.config.get( [ 'wgAction', 'wgCookiePrefix', 'wgCurRevisionId' ] ), // This should match EditPage::POST_EDIT_COOKIE_KEY_PREFIX: cookieKey = config.wgCookiePrefix + 'PostEditRevision' + config.wgCurRevisionId, @@ -53,15 +70,6 @@ $.cookie( cookieKey, null, { path: '/' } ); mw.config.set( 'wgPostEdit', true ); - /** - * @event postEdit - * @member mw.hook - * @param {Object} [data] - * @param {string|jQuery|Array} [data.message] Message that listeners - * should use when displaying notifications. String for plain text, - * use array or jQuery object to pass actual nodes. - * @param {string|mw.user} [data.user=mw.user] User that made the edit. - */ mw.hook( 'postEdit' ).fire(); }