r71567 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71566‎ | r71567 | r71568 >
Date:16:01, 24 August 2010
Author:catrope
Status:ok
Tags:
Comment:
Allow class="noshiftselect" to disable the multiple-select-on-shift-click behavior for checkboxes. This is desired for forms that contain tables with multiple columns of checkboxes (CentralNotice has one of these), where this function works row-wise instead of column-wise. This is confusing and I'm too lazy to implement column-wise shift-select, so I'm just disabling shift-select altogether in CentralNotice (see followup commit).
Modified paths:
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/wikibits.js
@@ -439,7 +439,7 @@
440440
441441 for ( var i = start; i < finish; i++ ) {
442442 var cb = inputs[i];
443 - if ( !cb.type || cb.type.toLowerCase() != 'checkbox' ) {
 443+ if ( !cb.type || cb.type.toLowerCase() != 'checkbox' || ( ' ' + cb.className + ' ' ).indexOf( ' noshiftselect ' ) != -1 ) {
444444 continue;
445445 }
446446 var end = checkboxes.length;

Follow-up revisions

RevisionCommit summaryAuthorDate
r71568CentralNotice: Use the functionality implemented in r71567 to disable shift-s...catrope16:04, 24 August 2010
r717231.16wmf4: MFT r71567catrope18:36, 26 August 2010

Status & tagging log