r108299 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108298‎ | r108299 | r108300 >
Date:01:20, 7 January 2012
Author:rmoen
Status:ok (Comments)
Tags:
Comment:
adjust styles and elements to top responders, fix bug with secondary filter types selection in feedback dashboard
Modified paths:
  • /trunk/extensions/MoodBar/SpecialFeedbackDashboard.php (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/SpecialFeedbackDashboard.php
@@ -287,8 +287,7 @@
288288
289289 return <<<HTML
290290 <div class="fbd-leaderboard-top-responders">
291 - $topRespondersTitle
292 - <hr />
 291+ <h5>$topRespondersTitle</h5>
293292 <ul class="fbd-leaderboard">
294293 $html
295294 </ul>
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css
@@ -95,16 +95,28 @@
9696 }
9797 .fbd-leaderboard li{
9898 margin: 0px;
99 - padding: 2px 5px;
 99+ padding: 2px 10px;
100100 list-style: none;
 101+ font-weight:600;
101102 }
102103
 104+.fbd-leaderboard li.even {
 105+ background: #EFEFEF;
 106+}
103107 .fbd-leaderboard li span {
104108 float:right;
105109 color: #777777;
106 - font-weight: bold;
107110 }
108111
 112+.fbd-leaderboard-top-responders {
 113+ margin-top:15px;
 114+}
 115+
 116+.fbd-leaderboard-top-responders h5 {
 117+ border-bottom:1px solid #000000;
 118+ padding-bottom:0px;
 119+}
 120+
109121 /* Tool Tip */
110122
111123 .fbd-tooltip-overlay-wrap {
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -715,10 +715,12 @@
716716
717717 //only allow one of the secondary filters to be checked
718718 $( 'input[type=checkbox].fbd-filters-check').click(function(){
719 - var count = $( 'input[type=checkbox].fbd-filters-check').length;
 719+ var count = $( 'input[type=checkbox].fbd-filters-check').length,
 720+ state = $(this).prop('checked'); //save state of checkbox
 721+
720722 if(count > 1) {
721723 $( 'input[type=checkbox].fbd-filters-check').prop('checked', false);
722 - $(this).prop('checked', true);
 724+ $(this).prop('checked', state);
723725 }
724726 });
725727
@@ -730,6 +732,9 @@
731733 $(this).removeClass('fbd-hover');
732734 });
733735
 736+ //zebra stripe leaderboard
 737+ $('.fbd-leaderboard li:nth-child(even)').addClass('even');
 738+
734739 saveFormState();
735740 var filterType = $( '#fbd-filters' ).children( 'form' ).data( 'filtertype' );
736741 // If filtering already happened on the PHP side, don't load the form state from cookies

Follow-up revisions

RevisionCommit summaryAuthorDate
r108523simplify secondary filter checkbox handling. follow up r108275 and r108299rmoen17:54, 10 January 2012

Comments

#Comment by Catrope (talk | contribs)   18:25, 10 January 2012
+				state = $(this).prop('checked'); //save state of checkbox
[...]
 			$( 'input[type=checkbox].fbd-filters-check').prop('checked', false);
-			$(this).prop('checked', true);
+			$(this).prop('checked', state);

You don't need this if you just do: $( 'input[type=checkbox].fbd-filters-check' ).not( this ).prop( 'checked', false );

#Comment by Catrope (talk | contribs)   18:26, 10 January 2012

See also r108275 CR.

#Comment by Robmoen (talk | contribs)   19:25, 10 January 2012

See folloup r108523

Status & tagging log