mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Merge "ArticleTarget: saveSuccess wasn't receiving expected arguments"
This commit is contained in:
commit
bad500da7b
|
@ -96,6 +96,17 @@ OO.inheritClass( ve.init.mw.ArticleTarget, ve.init.mw.Target );
|
|||
|
||||
/**
|
||||
* @event save
|
||||
* @param {string} html Rendered page HTML from server
|
||||
* @param {string} categoriesHtml Rendered categories HTML from server
|
||||
* @param {number} newid New revision id, undefined if unchanged
|
||||
* @param {boolean} isRedirect Whether this page is a redirect or not
|
||||
* @param {string} displayTitle What HTML to show as the page title
|
||||
* @param {Object} lastModified Object containing user-formatted date
|
||||
* and time strings, or undefined if we made no change.
|
||||
* @param {string} contentSub HTML to show as the content subtitle
|
||||
* @param {Array} modules The modules to be loaded on the page
|
||||
* @param {Object} jsconfigvars The mw.config values needed on the page
|
||||
* Fired immediately after a save is successfully completed
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -680,7 +691,7 @@ ve.init.mw.ArticleTarget.prototype.saveComplete = function () {
|
|||
this.initialEditSummary = null;
|
||||
|
||||
this.saveDeferred.resolve();
|
||||
this.emit( 'save' );
|
||||
this.emit.apply( this, [ 'save' ].concat( Array.prototype.slice.call( arguments ) ) );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -106,9 +106,16 @@ ve.init.mw.ArticleTargetEvents.prototype.onSaveInitiated = function () {
|
|||
/**
|
||||
* Track when the save is complete
|
||||
*
|
||||
* @param {string} content
|
||||
* @param {string} categoriesHtml
|
||||
* @param {number} newRevId
|
||||
* @param {string} content Rendered page HTML from server
|
||||
* @param {string} categoriesHtml Rendered categories HTML from server
|
||||
* @param {number} newRevId New revision id, undefined if unchanged
|
||||
* @param {boolean} isRedirect Whether this page is a redirect or not
|
||||
* @param {string} displayTitle What HTML to show as the page title
|
||||
* @param {Object} lastModified Object containing user-formatted date
|
||||
* and time strings, or undefined if we made no change.
|
||||
* @param {string} contentSub HTML to show as the content subtitle
|
||||
* @param {Array} modules The modules to be loaded on the page
|
||||
* @param {Object} jsconfigvars The mw.config values needed on the page
|
||||
*/
|
||||
ve.init.mw.ArticleTargetEvents.prototype.onSaveComplete = function ( content, categoriesHtml, newRevId ) {
|
||||
this.trackTiming( 'performance.user.saveComplete', { duration: ve.now() - this.timings.saveInitiated } );
|
||||
|
|
Loading…
Reference in a new issue