r106783 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106782‎ | r106783 | r106784 >
Date:12:07, 20 December 2011
Author:santhosh
Status:ok (Comments)
Tags:
Comment:
Correct the error dialog display.
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.feedback.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.feedback.js
@@ -180,8 +180,12 @@
181181 },
182182
183183 displayError: function( message ) {
 184+ var _this = this;
184185 this.display( 'error' );
185186 this.$dialog.find( '.feedback-error-msg' ).msg( message );
 187+ var closeButton = {};
 188+ closeButton[ mw.msg( 'feedback-close' ) ] = function() { _this.$dialog.dialog( 'close' ); };
 189+ this.$dialog.dialog( { buttons: closeButton } );
186190 },
187191
188192 cancel: function() {
@@ -210,12 +214,12 @@
211215 _this.displayError( 'feedback-error1' ); // unknown API result
212216 }
213217 } else {
214 - displayError( 'feedback-error2' ); // edit failed
 218+ _this.displayError( 'feedback-error2' ); // edit failed
215219 }
216220 };
217221
218222 var err = function( code, info ) {
219 - displayError( 'feedback-error3' ); // ajax request failed
 223+ _this.displayError( 'feedback-error3' ); // ajax request failed
220224 };
221225
222226 this.api.newSection( this.title, subject, message, ok, err );

Comments

#Comment by Brion VIBBER (talk | contribs)   19:45, 20 December 2011

How would one test this? Does this module have tests or an easy way to bring it up?

Status & tagging log