Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js |
— | — | @@ -33,9 +33,11 @@ |
34 | 34 | <button class="articleFeedback-submit articleFeedback-visibleWith-form" type="submit" disabled><html:msg key="form-panel-submit" /></button>\ |
35 | 35 | <div class="articleFeedback-success articleFeedback-visibleWith-form"><span><html:msg key="form-panel-success" /></span></div>\ |
36 | 36 | <div style="clear:both;"></div>\ |
37 | | - <div class="articleFeedback-expiry articleFeedback-visibleWith-form">\ |
38 | | - <div class="articleFeedback-expiry-title"><html:msg key="form-panel-expiry-title" /></div>\ |
39 | | - <div class="articleFeedback-expiry-message"><html:msg key="form-panel-expiry-message" /></div>\ |
| 37 | + <div class="articleFeedback-notices articleFeedback-visibleWith-form">\ |
| 38 | + <div class="articleFeedback-expiry">\ |
| 39 | + <div class="articleFeedback-expiry-title"><html:msg key="form-panel-expiry-title" /></div>\ |
| 40 | + <div class="articleFeedback-expiry-message"><html:msg key="form-panel-expiry-message" /></div>\ |
| 41 | + </div>\ |
40 | 42 | </div>\ |
41 | 43 | </div>\ |
42 | 44 | <div class="articleFeedback-error"><div class="articleFeedback-error-message"><html:msg key="error" /></div></div>\ |
— | — | @@ -142,8 +144,14 @@ |
143 | 145 | } ), |
144 | 146 | 'success': function( data ) { |
145 | 147 | var context = this; |
146 | | - $.articleFeedback.fn.load.call( context ); |
147 | | - context.$ui.find( '.articleFeedback-lock' ).hide(); |
| 148 | + if ( 'error' in data ) { |
| 149 | + mw.log( 'Form submission error' ); |
| 150 | + mw.log( data.error ); |
| 151 | + context.$ui.find( '.articleFeedback-error' ).show(); |
| 152 | + } else { |
| 153 | + $.articleFeedback.fn.load.call( context ); |
| 154 | + context.$ui.find( '.articleFeedback-lock' ).hide(); |
| 155 | + } |
148 | 156 | }, |
149 | 157 | 'error': function() { |
150 | 158 | var context = this; |
— | — | @@ -596,7 +604,7 @@ |
597 | 605 | var context = $(this).data( 'articleFeedback-context' ); |
598 | 606 | if ( !context ) { |
599 | 607 | // Create context |
600 | | - context = { '$ui': $(this), 'options': { 'ratings': {}, 'pitches': {}, 'bucket': 0 } }; |
| 608 | + context = { '$ui': $(this), 'options': { 'ratings': {}, 'pitches': {}, 'bucket': 1 } }; |
601 | 609 | // Allow customization through an options argument |
602 | 610 | if ( typeof args[0] === 'object' ) { |
603 | 611 | context = $.extend( true, context, { 'options': args[0] } ); |
Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.css |
— | — | @@ -23,6 +23,7 @@ |
24 | 24 | display: none; |
25 | 25 | position: absolute; |
26 | 26 | top: 0; |
| 27 | + bottom: 0; |
27 | 28 | left: 0; |
28 | 29 | right: 0; |
29 | 30 | background-color: #f9f9f9; |