Commit 7e4ba19b authored by J S's avatar J S Committed by Bálint Nagy
Browse files

Issue #3326698 by joshuasosa, atul ghate: Replace deprecated jquery.once with once

parent c31b3903
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ name: Chosen
type: module
description: Makes select elements more user-friendly using <a href="https://harvesthq.github.com/chosen/">Chosen</a>.
package: User interface
core_version_requirement: ^8.8 || ^9 || ^10
core_version_requirement: ^9.2 || ^10
configure: chosen.admin
dependencies:
  - chosen:chosen_lib
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ drupal.chosen:
  dependencies:
    - core/drupal
    - core/jquery
    - core/jquery.once
    - core/once
    - chosen_lib/chosen
drupal.chosen.all:
  dependencies:
+3 −3
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 * Attaches behaviors for the Chosen module.
 */

(function($, Drupal, drupalSettings) {
(function($, Drupal, drupalSettings, once) {
  'use strict';

  // Temporal workaround while  https://github.com/harvesthq/chosen/issues/515
@@ -76,7 +76,7 @@
     */
    attach: function(context, settings) {
      this.settings = this.getSettings(settings);
      this.getElements(context).once('chosen').each(function (i, element) {
      $(once('chosen', this.getElements(context))).each(function (i, element) {
        this.createChosen(element);
      }.bind(this));
    },
@@ -196,4 +196,4 @@

};

})(jQuery, Drupal, drupalSettings);
})(jQuery, Drupal, drupalSettings, once);
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ name: Chosen Field
description: Makes select elements more user-friendly using <a href="https://harvesthq.github.com/chosen/">Chosen</a>.
package: User interface
configure: chosen.admin
core_version_requirement: ^8.8 || ^9 || ^10
core_version_requirement: ^9.2 || ^10
type: module
dependencies:
  - chosen:chosen
+1 −1
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@ name: Chosen Library
type: module
description: Add <a href="https://harvesthq.github.com/chosen/">chosen</a> library definition.
package: User interface
core_version_requirement: ^8.8 || ^9 || ^10
core_version_requirement: ^9.2 || ^10