1/** 2 * @file 3 * JavaScript behaviors for select menu. 4 */ 5 6(function ($, Drupal, once) { 7 8 'use strict'; 9 10 /** 11 * Disable select menu options using JavaScript. 12 * 13 * @type {Drupal~behavior} 14 */ 15 Drupal.behaviors.webformSelectOptionsDisabled = { 16 attach: function (context) { 17 $(once('webform-select-options-disabled', 'select[data-webform-select-options-disabled]', context)).each(function () { 18 var $select = $(this); 19 var disabled = $select.attr('data-webform-select-options-disabled').split(/\s*,\s*/); 20 $select.find('option').filter(function isDisabled() { 21 return ($.inArray(this.value, disabled) !== -1); 22 }).attr('disabled', 'disabled'); 23 }); 24 } 25 }; 26 27})(jQuery, Drupal, once);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.