mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-12 14:35:28 +00:00
Merge "ve.init.mw.MobileArticleTarget: Remove error handling hacks for MobileFrontend"
This commit is contained in:
commit
e4efbe2a46
|
@ -75,15 +75,6 @@ ve.init.mw.MobileArticleTarget.static.trackingName = 'mobile';
|
||||||
// FIXME Some of these users will be on tablets, check for this
|
// FIXME Some of these users will be on tablets, check for this
|
||||||
ve.init.mw.MobileArticleTarget.static.platformType = 'phone';
|
ve.init.mw.MobileArticleTarget.static.platformType = 'phone';
|
||||||
|
|
||||||
/* Static Methods */
|
|
||||||
|
|
||||||
// FIXME This method is overridden in the MobileFrontend extension,
|
|
||||||
// figure out a way to make it public there so that we can use it here
|
|
||||||
/**
|
|
||||||
* @method
|
|
||||||
*/
|
|
||||||
ve.init.mw.MobileArticleTarget.static.parseSaveError = null;
|
|
||||||
|
|
||||||
/* Methods */
|
/* Methods */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -454,12 +445,7 @@ ve.init.mw.MobileArticleTarget.prototype.saveFail = function ( doc, saveData, wa
|
||||||
// parent method
|
// parent method
|
||||||
ve.init.mw.MobileArticleTarget.super.prototype.saveFail.apply( this, arguments );
|
ve.init.mw.MobileArticleTarget.super.prototype.saveFail.apply( this, arguments );
|
||||||
|
|
||||||
// Massage errorformat=html responses to look more like errorformat=bc expected by MF
|
this.overlay.onSaveFailure( data );
|
||||||
if ( data.errors ) {
|
|
||||||
data.error = data.errors[ 0 ];
|
|
||||||
}
|
|
||||||
|
|
||||||
this.overlay.onSaveFailure( this.constructor.static.parseSaveError( data, status ) );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue