1/** 2 * @file 3 * JavaScript behaviors for select menu. 4 */ 5 6(function ($, Drupal, once) { 7 8 /** 9 * Disable select menu options using JavaScript. 10 * 11 * @type {Drupal~behavior} 12 */ 13 Drupal.behaviors.webformSelectOptionsDisabled = { 14 attach: function (context) { 15 $(once('webform-select-options-disabled', 'select[data-webform-select-options-disabled]', context)).each(function () { 16 var $select = $(this); 17 var disabled = $select.attr('data-webform-select-options-disabled').split(/\s*,\s*/); 18 $select.find('option').filter(function isDisabled() { 19 return ($.inArray(this.value, disabled) !== -1); 20 }).attr('disabled', 'disabled'); 21 }); 22 } 23 }; 24 25})(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.