https://www.mediawiki.org/wiki/Special:Code/MediaWiki/108275
Revision: 108275
Author: rmoen
Date: 2012-01-06 20:04:09 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------
only allow one secondary checkbox to be checked at one time due them cancelling
each other out
Modified Paths:
--------------
trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
Modified:
trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
===================================================================
---
trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
2012-01-06 20:00:04 UTC (rev 108274)
+++
trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
2012-01-06 20:04:09 UTC (rev 108275)
@@ -509,7 +509,6 @@
wikitext = wikitext.replace(/~{3,5}/g,
'') + "\n\n~~~~"; //remove and add signature for
parseWikiText($item, wikitext);
});
-
}
e.preventDefault();
}
@@ -613,8 +612,8 @@
)
)
);
- $item
- .append( tooltip );
+ $item.append( tooltip );
+ //close event, closure remembers object
$( '.fbd-tooltip-close' )
.live( 'click' , function() {
tooltip.remove();
@@ -712,7 +711,17 @@
$(this).prop('checked', true);
}
});
+
+ //only allow one of the secondary filters to be checked
+ $( 'input[type=checkbox].fbd-filters-check').click(function(){
+ var count = $( 'input[type=checkbox].fbd-filters-check').length;
+ if(count > 1) {
+ $(
'input[type=checkbox].fbd-filters-check').prop('checked', false);
+ $(this).prop('checked', true);
+ }
+ });
+
$( '#fbd-list' ).delegate( '.fbd-item', 'hover', function (){
$(this).toggleClass('fbd-hover');
});
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs