r106974 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106973‎ | r106974 | r106975 >
Date:20:06, 21 December 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added clear button to filter
Modified paths:
  • /trunk/extensions/Contest/Contest.i18n.php (modified) (history)
  • /trunk/extensions/Contest/resources/contest.special.contest.js (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -160,6 +160,7 @@
161161 'contest-contest-reminder-page' => 'The content for the reminder e-mail comes from [[$1|this page]].',
162162 'contest-contest-send-reminder' => 'Send reminder',
163163 'contest-contest-go' => 'Go',
 164+ 'contest-contest-clear' => 'Clear filters',
164165 'contest-contest-showonly' => 'Filter contestants by',
165166 'contest-contest-yes' => 'Yes',
166167 'contest-contest-no' => 'No',
@@ -324,6 +325,7 @@
325326 'contest-contest-send-reminder' => 'Send reminder button text',
326327 'contest-contest-go' => 'Submission button text for filter form.
327328 {{Identical|Go}}',
 329+ 'contest-contest-clear' => 'Clear button text for filter form.',
328330 'contest-contest-showonly' => 'Header text for filter form',
329331 'contest-contest-yes' => 'Option in a dropdown menu.
330332 {{Identical|Yes}}',
Index: trunk/extensions/Contest/specials/SpecialContest.php
@@ -330,6 +330,7 @@
331331 $noneSome
332332 ) .
333333 '<input type="submit" value="' . wfMsgHtml( 'contest-contest-go' ) . '">' .
 334+ '&#160;<button class="contest-pager-clear">' . wfMsgHtml( 'contest-contest-clear' ) . '</button>' .
334335 '</form>' .
335336 '</fieldset>'
336337 );
Index: trunk/extensions/Contest/resources/contest.special.contest.js
@@ -80,6 +80,13 @@
8181 $dialog.append( $( '#reminder-content' ).html() );
8282 };
8383
 84+ $( '.contest-pager-clear' ).click( function() {
 85+ var $form = $( this ).closest( 'form' );
 86+ $form.find( 'select' ).val( '' );
 87+ $form.submit();
 88+ return false;
 89+ } );
 90+
8491 $( '#send-reminder' ).button().click( this.showReminderDialog );
8592
8693 } ); })( window.jQuery, window.mediaWiki );

Status & tagging log