Index: trunk/phase3/resources/mediawiki/mediawiki.feedback.js |
— | — | @@ -180,8 +180,12 @@ |
181 | 181 | }, |
182 | 182 | |
183 | 183 | displayError: function( message ) { |
| 184 | + var _this = this; |
184 | 185 | this.display( 'error' ); |
185 | 186 | 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 } ); |
186 | 190 | }, |
187 | 191 | |
188 | 192 | cancel: function() { |
— | — | @@ -210,12 +214,12 @@ |
211 | 215 | _this.displayError( 'feedback-error1' ); // unknown API result |
212 | 216 | } |
213 | 217 | } else { |
214 | | - displayError( 'feedback-error2' ); // edit failed |
| 218 | + _this.displayError( 'feedback-error2' ); // edit failed |
215 | 219 | } |
216 | 220 | }; |
217 | 221 | |
218 | 222 | var err = function( code, info ) { |
219 | | - displayError( 'feedback-error3' ); // ajax request failed |
| 223 | + _this.displayError( 'feedback-error3' ); // ajax request failed |
220 | 224 | }; |
221 | 225 | |
222 | 226 | this.api.newSection( this.title, subject, message, ok, err ); |