r84474 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84473‎ | r84474 | r84475 >
Date:18:57, 21 March 2011
Author:tparscal
Status:ok
Tags:
Comment:
* Added error handling on submit failure
* Fixed error display to cover entire UI
Modified paths:
  • /trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.css (modified) (history)
  • /trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js
@@ -142,8 +142,14 @@
143143 } ),
144144 'success': function( data ) {
145145 var context = this;
146 - $.articleFeedback.fn.load.call( context );
147 - context.$ui.find( '.articleFeedback-lock' ).hide();
 146+ if ( 'error' in data ) {
 147+ mw.log( 'Form submission error' );
 148+ mw.log( data.error );
 149+ context.$ui.find( '.articleFeedback-error' ).show();
 150+ } else {
 151+ $.articleFeedback.fn.load.call( context );
 152+ context.$ui.find( '.articleFeedback-lock' ).hide();
 153+ }
148154 },
149155 'error': function() {
150156 var context = this;
Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.css
@@ -23,6 +23,7 @@
2424 display: none;
2525 position: absolute;
2626 top: 0;
 27+ bottom: 0;
2728 left: 0;
2829 right: 0;
2930 background-color: #f9f9f9;

Follow-up revisions

RevisionCommit summaryAuthorDate
r845301.17wmf1: MFT r84474, r84529catrope14:42, 22 March 2011

Status & tagging log