1define('jira/field/init-label-pickers', ['jira/field/label-picker-factory', 'jira/util/events', 'jira/util/events/types', 'jira/util/events/reasons', 'jquery'], function (LabelPickerFactory, Events, Types, Reasons, jQuery) { 2 'use strict'; 3 4 var FIELDSET_SELECTOR = "fieldset.labelpicker-params"; 5 function locateFieldset(parent) { 6 var $parent = jQuery(parent); 7 var $fieldset; 8 if ($parent.is(FIELDSET_SELECTOR)) { 9 $fieldset = $parent; 10 } else { 11 $fieldset = $parent.find(FIELDSET_SELECTOR); 12 } 13 return $fieldset; 14 } 15 function findLabelsFieldsetAndConvertToPicker(context, selector) { 16 selector = selector || ".aui-field-labelpicker"; 17 jQuery(selector, context).each(function () { 18 var $fieldset = locateFieldset(this); 19 if ($fieldset.length > 0) { 20 LabelPickerFactory.createPicker($fieldset, context); 21 } 22 }); 23 } 24 Events.bind(Types.NEW_CONTENT_ADDED, function (e, context, reason) { 25 //eslint-disable-line @atlassian/jira-event-checks/no-newcontentadded-handlers 26 if (reason !== Reasons.panelRefreshed) { 27 findLabelsFieldsetAndConvertToPicker(context); 28 } 29 }); 30});
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.