Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -77,6 +77,7 @@ |
78 | 78 | 'articlefeedback-form-panel-helpimprove-privacylink', |
79 | 79 | 'articlefeedback-form-panel-submit', |
80 | 80 | 'articlefeedback-form-panel-success', |
| 81 | + 'articlefeedback-form-panel-pending', |
81 | 82 | 'articlefeedback-form-panel-expiry-title', |
82 | 83 | 'articlefeedback-form-panel-expiry-message', |
83 | 84 | 'articlefeedback-report-switch-label', |
Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js |
— | — | @@ -83,6 +83,7 @@ |
84 | 84 | </div>\ |
85 | 85 | <button class="articleFeedback-submit articleFeedback-visibleWith-form" type="submit" disabled="disabled"><html:msg key="form-panel-submit" /></button>\ |
86 | 86 | <div class="articleFeedback-success articleFeedback-visibleWith-form"><span><html:msg key="form-panel-success" /></span></div>\ |
| 87 | + <div class="articleFeedback-pending articleFeedback-visibleWith-form"><span><html:msg key="form-panel-pending" /></span></div>\ |
87 | 88 | <div style="clear:both;"></div>\ |
88 | 89 | <div class="articleFeedback-notices articleFeedback-visibleWith-form">\ |
89 | 90 | <div class="articleFeedback-expiry">\ |
— | — | @@ -133,14 +134,28 @@ |
134 | 135 | 'enableSubmission': function( state ) { |
135 | 136 | var context = this; |
136 | 137 | if ( state ) { |
137 | | - // Reset and remove success message |
| 138 | + // Reset success timeout |
138 | 139 | clearTimeout( context.successTimeout ); |
139 | | - context.$ui.find( '.articleFeedback-success span' ).fadeOut( 'fast' ); |
140 | | - // Enable |
141 | | - context.$ui.find( '.articleFeedback-submit' ).button( { 'disabled': false } ); |
| 140 | + context.$ui |
| 141 | + // Enable |
| 142 | + .find( '.articleFeedback-submit' ) |
| 143 | + .button( { 'disabled': false } ) |
| 144 | + .end() |
| 145 | + // Hide success |
| 146 | + .find( '.articleFeedback-success span' ) |
| 147 | + .hide() |
| 148 | + .end() |
| 149 | + // Show pending |
| 150 | + .find( '.articleFeedback-pending span' ) |
| 151 | + .fadeIn( 'fast' ); |
142 | 152 | } else { |
143 | 153 | // Disable |
144 | | - context.$ui.find( '.articleFeedback-submit' ).button( { 'disabled': true } ); |
| 154 | + context.$ui |
| 155 | + .find( '.articleFeedback-submit' ) |
| 156 | + .button( { 'disabled': true } ) |
| 157 | + .end() |
| 158 | + .find( '.articleFeedback-pending span' ) |
| 159 | + .hide(); |
145 | 160 | } |
146 | 161 | }, |
147 | 162 | 'updateRating': function() { |
— | — | @@ -647,7 +662,7 @@ |
648 | 663 | } |
649 | 664 | if ( pitches.length ) { |
650 | 665 | // Select randomly using equal distribution of available pitches |
651 | | - var key = pitches[Math.floor( Math.random() * list.length )]; |
| 666 | + var key = pitches[Math.floor( Math.random() * pitches.length )]; |
652 | 667 | context.$ui.find( '.articleFeedback-pitches' ) |
653 | 668 | .css( 'width', context.$ui.width() ) |
654 | 669 | .find( '.articleFeedback-pitch[rel="' + key + '"]' ) |
Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/images/attention.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/images/attention.png |
___________________________________________________________________ |
Added: svn:mime-type |
655 | 670 | + application/octet-stream |
Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.css |
— | — | @@ -344,25 +344,32 @@ |
345 | 345 | background-color: #FFC0C0; |
346 | 346 | } |
347 | 347 | |
| 348 | +.articleFeedback-pending, |
348 | 349 | .articleFeedback-success { |
349 | 350 | float: right; |
350 | 351 | } |
351 | 352 | |
| 353 | +.articleFeedback-pending span, |
352 | 354 | .articleFeedback-success span { |
353 | 355 | display: none; |
354 | | - /* @embed */ |
355 | | - background-image: url(images/success.png); |
| 356 | + padding: 12px 12px 12px 28px; |
| 357 | + font-size: 0.8em; |
| 358 | + line-height: 3.6em; |
356 | 359 | background-repeat: no-repeat; |
357 | 360 | background-position: center left; |
358 | | - padding-left: 28px; |
359 | | - padding-right: 12px; |
360 | | - padding-top: 12px; |
361 | | - padding-bottom: 12px; |
362 | 361 | color: green; |
363 | | - font-size: 0.8em; |
364 | | - line-height: 3.6em; |
365 | 362 | } |
366 | 363 | |
| 364 | +.articleFeedback-pending span { |
| 365 | + /* @embed */ |
| 366 | + background-image: url(images/attention.png); |
| 367 | +} |
| 368 | + |
| 369 | +.articleFeedback-success span { |
| 370 | + /* @embed */ |
| 371 | + background-image: url(images/success.png); |
| 372 | +} |
| 373 | + |
367 | 374 | .articleFeedback-expiry { |
368 | 375 | display: none; |
369 | 376 | border: solid 1px orange; |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.i18n.php |
— | — | @@ -43,6 +43,7 @@ |
44 | 44 | 'articlefeedback-form-panel-helpimprove-privacy' => 'Privacy policy', |
45 | 45 | 'articlefeedback-form-panel-helpimprove-privacylink' => 'Project:Privacy policy', |
46 | 46 | 'articlefeedback-form-panel-submit' => 'Submit ratings', |
| 47 | + 'articlefeedback-form-panel-pending' => 'Your ratings have not been submitted', |
47 | 48 | 'articlefeedback-form-panel-success' => 'Saved successfully', |
48 | 49 | 'articlefeedback-form-panel-expiry-title' => 'Your ratings have expired', |
49 | 50 | 'articlefeedback-form-panel-expiry-message' => 'Please reevaluate this page and submit new ratings.', |