From: Roan Kattouw Date: Tue, 24 Aug 2010 16:01:52 +0000 (+0000) Subject: Allow class="noshiftselect" to disable the multiple-select-on-shift-click behavior... X-Git-Tag: 1.31.0-rc.0~35345 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=d2c23324a06d2bcdde684af9a7cbd845d4c5b7f9;p=lhc%2Fweb%2Fwiklou.git 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). --- diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index d7bd3f98b9..da6fc173fa 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -439,7 +439,7 @@ function addCheckboxClickHandlers( inputs, start ) { for ( var i = start; i < finish; i++ ) { var cb = inputs[i]; - if ( !cb.type || cb.type.toLowerCase() != 'checkbox' ) { + if ( !cb.type || cb.type.toLowerCase() != 'checkbox' || ( ' ' + cb.className + ' ' ).indexOf( ' noshiftselect ' ) != -1 ) { continue; } var end = checkboxes.length;