I could not find any option about this, is VBO integrated with misc/tableselect.js ?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz’s picture

Status: Active » Fixed

No.

SebCorbin’s picture

Title: Use Shift + Click for multiple selection » Use Shift + Click for multiple selection when using table style
Version: 7.x-3.0-rc1 » 7.x-3.x-dev
Category: support » feature
Status: Fixed » Needs work

Well, I guess that's a feature request then... I'll try to provide a patch soon.

bojanz’s picture

Status: Needs work » Active
WorldFallz’s picture

Issue summary: View changes

Anyone ever get anywhere with this? There is a jquery plugin we can use https://github.com/nylen/shiftcheckbox or I can just add some jquery directly to the module's jquery.

which method would be preferred for a patch?

greggles’s picture

I was surprised to see it's not in VBO. As the original post hints, shift+click is also in Drupal core tableselect.js:

    // If this is a shift click, we need to highlight everything in the range.
    // Also make sure that we are actually checking checkboxes over a range and
    // that a checkbox has been checked or unchecked before.
    if (e.shiftKey && lastChecked && lastChecked != e.target) {
      // We use the checkbox's parent TR to do our range searching.
      Drupal.tableSelectRange($(e.target).closest('tr')[0], $(lastChecked).closest('tr')[0], e.target.checked);
    }

And there's a module at https://www.gaslampmedia.com/views-bulk-operations-shift-click-module/ which adds it using a 3rd party jquery library.

chrisolof’s picture

Status: Active » Needs review
FileSize
2.62 KB

Attached patch adds shift-click range selection support to VBO tables via Drupal's Drupal.tableSelectRange() in misc/tableselect.js.

firfin’s picture

Status: Needs review » Reviewed & tested by the community

Applies cleanly to 7.x-3.5. Code looks good and has the desired effect.
Setting status accordingly.

Dinesh18’s picture

#6 patch looks good to me. +1 to RTBC

Chris Matthews’s picture