2018-11-29 15:47:03 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor Initialization save error handler class
|
|
|
|
*
|
2019-01-01 13:24:23 +00:00
|
|
|
* @copyright 2011-2019 VisualEditor Team and others; see http://ve.mit-license.org
|
2018-11-29 15:47:03 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2018-12-05 21:37:13 +00:00
|
|
|
* Save error handler.
|
2018-11-29 15:47:03 +00:00
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @abstract
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
ve.init.mw.SaveErrorHandler = function () {};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.initClass( ve.init.mw.SaveErrorHandler );
|
|
|
|
|
|
|
|
/* Static methods */
|
|
|
|
|
|
|
|
/**
|
2018-12-05 21:37:13 +00:00
|
|
|
* Test if this handler should handle a specific API response
|
2018-11-29 15:47:03 +00:00
|
|
|
*
|
|
|
|
* @static
|
|
|
|
* @inheritable
|
2018-12-07 19:17:16 +00:00
|
|
|
* @param {Object} data API response from action=visualeditoredit
|
2018-11-29 15:47:03 +00:00
|
|
|
* @return {boolean}
|
|
|
|
*/
|
|
|
|
ve.init.mw.SaveErrorHandler.static.matchFunction = null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Process the save error
|
|
|
|
*
|
|
|
|
* @static
|
|
|
|
* @inheritable
|
2018-12-07 19:17:16 +00:00
|
|
|
* @param {Object} data API response from action=visualeditoredit
|
2018-11-29 15:47:03 +00:00
|
|
|
* @param {ve.init.mw.ArticleTarget} target Target
|
|
|
|
*/
|
|
|
|
ve.init.mw.SaveErrorHandler.static.process = null;
|
2018-12-04 22:55:35 +00:00
|
|
|
|
|
|
|
/* Save error registry */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Extensions can add SaveErrorHandler sub-classes to this registry.
|
|
|
|
*/
|
|
|
|
ve.init.mw.saveErrorHandlerFactory = new OO.Factory();
|