Commit 95845f69 authored by Marcin Grabias's avatar Marcin Grabias
Browse files

Issue #3261870: Remove jquery.once dependency.

parent eac831fd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -12,18 +12,18 @@
   */
  Drupal.behaviors.views_bulk_operations = {
    attach: function (context, settings) {
      $('.views-bulk-operations-ui').once('views-bulk-operations-ui').each(Drupal.viewsBulkOperationsUi);
      once('views-bulk-operations-ui', '.views-bulk-operations-ui', context).forEach(Drupal.viewsBulkOperationsUi);
    }
  };

  /**
   * Callback used in {@link Drupal.behaviors.views_bulk_operations}.
   */
  Drupal.viewsBulkOperationsUi = function () {
    var uiElement = $(this);
  Drupal.viewsBulkOperationsUi = function (element) {
    var $uiElement = $(element);

    // Select / deselect all functionality.
    var actionsElementWrapper = uiElement.find('details.vbo-actions-widget > .details-wrapper');
    var actionsElementWrapper = $uiElement.find('details.vbo-actions-widget > .details-wrapper');
    if (actionsElementWrapper.length) {
      var checked = false;
      var allHandle = $('<a href="#" class="vbo-all-switch">' + Drupal.t('Select / deselect all') + '</a>');
+4 −4
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
   */
  Drupal.behaviors.views_bulk_operations = {
    attach: function (context, settings) {
      $('.vbo-view-form').once('vbo-init').each(Drupal.viewsBulkOperationsFrontUi);
      once('vbo-init', '.vbo-view-form', context).forEach(Drupal.viewsBulkOperationsFrontUi);
    }
  };

@@ -107,8 +107,8 @@
  /**
   * Callback used in {@link Drupal.behaviors.views_bulk_operations}.
   */
  Drupal.viewsBulkOperationsFrontUi = function () {
    var $vboForm = $(this);
  Drupal.viewsBulkOperationsFrontUi = function (element) {
    var $vboForm = $(element);
    var $viewsTables = $('.vbo-table', $vboForm);
    var $primarySelectAll = $('.vbo-select-all', $vboForm);
    var tableSelectAll = [];
@@ -116,7 +116,7 @@
    // When grouping is enabled, there can be multiple tables.
    if ($viewsTables.length) {
      $viewsTables.each(function (index) {
        tableSelectAll[index] = $(this).find('.select-all input').first();
        tableSelectAll[index] = $vboForm.find('.select-all input').first();
      });
      var $tableSelectAll = $(tableSelectAll);
    }
+2 −2
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ frontUi:
  dependencies:
    - core/drupal
    - core/jquery
    - core/jquery.once
    - core/once

adminUi:
  version: 1.0
@@ -17,4 +17,4 @@ adminUi:
  dependencies:
    - core/drupal
    - core/jquery
    - core/jquery.once
    - core/once