mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 08:23:52 +00:00
Don't show error message popups when failing to restore auto-save
Several of the messages talk about clicking the reply links, which seems unhelpful. Also, showing a fullscreen popup on page load seems very unhelpful too. (Itoldyouso that we shouldn't use popups.) Bug: T268069 Change-Id: Id1312cf06200fb45a28b39481a99cc2c96603fa4
This commit is contained in:
parent
fdd7994051
commit
344038ae41
|
@ -37,7 +37,7 @@ function CommentController( $pageContainer, $replyLink, comment ) {
|
|||
|
||||
if ( storage.get( 'reply/' + comment.id + '/saveable' ) ) {
|
||||
mode = storage.get( 'reply/' + comment.id + '/mode' );
|
||||
this.setup( mode );
|
||||
this.setup( mode, true );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,8 +143,9 @@ CommentController.prototype.onReplyLinkClick = function ( e ) {
|
|||
* Create and setup the reply widget
|
||||
*
|
||||
* @param {string} [mode] Optionally force a mode, 'visual' or 'source'
|
||||
* @param {boolean} [hideErrors]
|
||||
*/
|
||||
CommentController.prototype.setup = function ( mode ) {
|
||||
CommentController.prototype.setup = function ( mode, hideErrors ) {
|
||||
var comment = this.comment,
|
||||
commentController = this;
|
||||
|
||||
|
@ -180,10 +181,12 @@ CommentController.prototype.setup = function ( mode ) {
|
|||
}, function ( code, data ) {
|
||||
commentController.teardown();
|
||||
|
||||
OO.ui.alert(
|
||||
code instanceof Error ? code.toString() : controller.getApi().getErrorMessage( data ),
|
||||
{ size: 'medium' }
|
||||
);
|
||||
if ( !hideErrors ) {
|
||||
OO.ui.alert(
|
||||
code instanceof Error ? code.toString() : controller.getApi().getErrorMessage( data ),
|
||||
{ size: 'medium' }
|
||||
);
|
||||
}
|
||||
|
||||
logger( {
|
||||
action: 'abort',
|
||||
|
|
Loading…
Reference in a new issue