Projet

Général

Profil

Révision 9df8b457

Ajouté par Assos Assos il y a presque 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views_bulk_operations/js/views_bulk_operations.js
46 46
    });
47 47

  
48 48
    // Set up the ability to click anywhere on the row to select it.
49
    $('.views-table tbody tr', form).click(function(event) {
50
      if (event.target.tagName.toLowerCase() != 'input' && event.target.tagName.toLowerCase() != 'a') {
51
        $('input[id^="edit-views-bulk-operations"]:not(:disabled)', this).each(function() {
52
          var checked = this.checked;
53
          // trigger() toggles the checkmark *after* the event is set,
54
          // whereas manually clicking the checkbox toggles it *beforehand*.
55
          // that's why we manually set the checkmark first, then trigger the
56
          // event (so that listeners get notified), then re-set the checkmark
57
          // which the trigger will have toggled. yuck!
58
          this.checked = !checked;
59
          $(this).trigger('click');
60
          this.checked = !checked;
61
        });
62
      }
63
    });
49
    if (Drupal.settings.vbo.row_clickable) {
50
      $('.views-table tbody tr', form).click(function(event) {
51
        if (event.target.tagName.toLowerCase() != 'input' && event.target.tagName.toLowerCase() != 'a') {
52
          $('input[id^="edit-views-bulk-operations"]:not(:disabled)', this).each(function() {
53
            var checked = this.checked;
54
            // trigger() toggles the checkmark *after* the event is set,
55
            // whereas manually clicking the checkbox toggles it *beforehand*.
56
            // that's why we manually set the checkmark first, then trigger the
57
            // event (so that listeners get notified), then re-set the checkmark
58
            // which the trigger will have toggled. yuck!
59
            this.checked = !checked;
60
            $(this).trigger('click');
61
            this.checked = !checked;
62
          });
63
        }
64
      });
65
    }
64 66
  }
65 67

  
66 68
  Drupal.vbo.tableSelectAllPages = function(form) {

Formats disponibles : Unified diff