r108523 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108522‎ | r108523 | r108524 >
Date:17:54, 10 January 2012
Author:rmoen
Status:ok
Tags:
Comment:
simplify secondary filter checkbox handling. follow up r108275 and r108299
Modified paths:
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -713,13 +713,7 @@
714714
715715 //only allow one of the secondary filters to be checked
716716 $( 'input[type=checkbox].fbd-filters-check').click(function(){
717 - var count = $( 'input[type=checkbox].fbd-filters-check').length,
718 - state = $(this).prop('checked'); //save state of checkbox
719 -
720 - if(count > 1) {
721 - $( 'input[type=checkbox].fbd-filters-check').prop('checked', false);
722 - $(this).prop('checked', state);
723 - }
 717+ $( 'input[type=checkbox].fbd-filters-check' ).not( this ).prop( 'checked', false );
724718 });
725719
726720 $( '#fbd-list' ).delegate( '.fbd-item', 'hover', function (){

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108275only allow one secondary checkbox to be checked at one time due them cancelli...rmoen20:04, 6 January 2012
r108299adjust styles and elements to top responders, fix bug with secondary filter t...rmoen01:20, 7 January 2012

Status & tagging log