r107605 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107604‎ | r107605 | r107606 >
Date:00:00, 30 December 2011
Author:rmoen
Status:ok
Tags:
Comment:
added trial hover effects to feedback dashboard, set response disabled with prop, on closeAllResponders() removed props to prevent memory leaks in IE < 9
Modified paths:
  • /trunk/extensions/MoodBar/ApiFeedbackDashboardResponse.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/ApiFeedbackDashboardResponse.php
@@ -54,7 +54,7 @@
5555 $feedback_link . "\n" .
5656 '<span id="feedback-dashboard-response-' . $id . '"></span>' . "\n\n" .
5757 $response . "\n\n~~~~\n\n" .
58 - '<span class="markashelpful-mbresponse-' . $id . '">&nbsp;</span>',
 58+ '<span class="markashelpful-mbresponse-' . $id . '">&#160;</span>',
5959 'token' => $params['token'],
6060 'summary' => $summary,
6161 'notminor' => true,
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css
@@ -187,11 +187,15 @@
188188 .fbd-item {
189189 border-bottom: solid 1px silver;
190190 position: relative;
191 - margin-top:0.5em;
192 - margin-bottom:0.5em;
193 - padding:0;
 191+ padding-top:0.5em;
 192+ padding-right:1em;
 193+ cursor:pointer;
194194 }
195195
 196+.fbd-hover {
 197+ background-color:#f1f1f1;
 198+}
 199+
196200 .fbd-item-emoticon {
197201 float: left;
198202 margin-right: 0.5em;
@@ -203,7 +207,7 @@
204208
205209 .fbd-item-emoticon-label {
206210 display: block;
207 - margin-top: 64px;
 211+ margin-top: 66px;
208212 text-align: center;
209213 }
210214
@@ -224,9 +228,13 @@
225229 padding:1.5em 2em;
226230 }
227231
 232+.fbd-item-response {
 233+ line-height: 22px;
 234+}
 235+
228236 .fbd-item-response-icon {
229237 float: left;
230 - display: block;
 238+ display: block;
231239 height: 56px;
232240 width: 56px;
233241 background-position: center center;
@@ -295,14 +303,24 @@
296304
297305 .fbd-item-userLinks{
298306 font-size: 1em;
 307+ visibility:hidden;
299308 }
300309
 310+.fbd-hover .fbd-item-userLinks {
 311+ visibility:visible;
 312+}
 313+
301314 .fbd-item-time {
302315 font-size: 1.2em;
303316 float: right;
304317 display:inline; /* ie7 fix */
 318+ visibility:hidden;
305319 }
306320
 321+.fbd-hover .fbd-item-time {
 322+ visibility:visible;
 323+}
 324+
307325 .fbd-item-message {
308326 font-size: 1.4em;
309327 margin-top: 0.25em;
@@ -342,7 +360,17 @@
343361 font-size: 0.8em;
344362 margin-left: 0.2em;
345363 margin-right: 0.2em;
 364+ visibility:hidden;
346365 }
 366+
 367+.fbd-hover .fbd-item-permalink,
 368+.fbd-hover .fbd-item-show,
 369+.fbd-hover .fbd-item-hide,
 370+.fbd-hover .fbd-item-reason {
 371+ visibility:visible;
 372+}
 373+
 374+
347375 .fbd-respond-link {
348376 font-size:1.1em;
349377 cursor:pointer;
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -378,8 +378,9 @@
379379 .find('.fbd-item-response-collapsed')
380380 .parent()
381381 .removeClass('responder-expanded');
382 -
383 - $( this ).find('.fbd-response-form').remove();
 382+ //remove disabled prop to prevent memory leaks in IE < 9
 383+ $( '.fbd-response-preview, .fbd-response-submit').removeProp('disabled');
 384+ $( this ).find('.fbd-response-form').remove();
384385 }
385386 });
386387 }
@@ -439,11 +440,11 @@
440441 $('<div>').attr('class', 'ula small').html( ula ).hide())
441442 ).append(
442443 $('<button>').attr( 'class', 'fbd-response-submit' ).html( mw.msg( 'moodbar-response-btn' ) + '&nbsp;<span class="fbd-item-send-response-icon"></span>' )
443 - .attr( 'disabled', 'true' ).hide()
 444+ .prop( 'disabled', true ).hide()
444445 ).append(
445446 $('<button>').attr('class', 'fbd-response-preview-back').text( mw.msg( 'response-back-text' ) ).hide()
446447 ).append(
447 - $('<button>').attr( 'class', 'fbd-response-preview').text ( mw.msg( 'response-preview-text' ) ).attr( 'disabled', 'true' )
 448+ $('<button>').attr( 'class', 'fbd-response-preview').text ( mw.msg( 'response-preview-text' ) ).prop( 'disabled', true )
448449 ).append(
449450 $('<div>').attr( 'style', 'clear:both' )
450451 );
@@ -676,6 +677,14 @@
677678 }
678679 });
679680
 681+ $( '#fbd-list' ).delegate( '.fbd-item', 'hover', function (){
 682+ $(this).toggleClass('fbd-hover');
 683+ });
 684+
 685+ $( '#fbd-list' ).delegate( '.fbd-item', 'mouseleave', function (){
 686+ $(this).removeClass('fbd-hover');
 687+ });
 688+
680689 saveFormState();
681690 var filterType = $( '#fbd-filters' ).children( 'form' ).data( 'filtertype' );
682691 // If filtering already happened on the PHP side, don't load the form state from cookies

Follow-up revisions

RevisionCommit summaryAuthorDate
r107606correct property conventions for feedback dashboard css. follow up r107605rmoen00:07, 30 December 2011

Status & tagging log