PageSourceSearch

https://servicedesk.adult-empire.com/includes/jira/field/initSingleGroupPickers.js

js adult-empire.com collected 2026-09-25 14:30:51 UTC 1,894 bytes, 47 lines download raw bytes

1define('jira/field/init-single-group-pickers', ['jira/ajs/select/single-select', 'jquery', 'wrm/context-path', 'jira/ajs/list/item-descriptor', 'jira/util/events/reasons', 'jira/util/events/types', 'jira/util/events', 'jira/field/group-picker-util'], function (SingleSelect, jQuery, wrmContextPath, ItemDescriptor, Reasons, Types, Events, GroupPickerUtil) {
2  'use strict';
3
4  var contextPath = wrmContextPath();
5  function initSingleGroupPickers(ctx) {
6    ctx.find('.js-default-single-group-picker').each(function () {
7      var $el = jQuery(this);
8      var $emptyValue = $el.find('option[data-empty]');
9      var showLabels = $el.data("show-labels") === true;
10      var userName = $el.data("user-name");
11      new SingleSelect({
12        element: this,
13        itemAttrDisplayed: "label",
14        revertOnInvalid: true,
15        ajaxOptions: {
16          data: function data(query) {
17            return {
18              userName: userName,
19              query: query,
20              exclude: $el.val()
21            };
22          },
23          url: contextPath + "/rest/api/2/groups/picker",
24          query: true,
25          // keep going back to the sever for each keystroke
26          formatResponse: function formatResponse(data) {
27            var formattedData = GroupPickerUtil.formatResponse(data, showLabels);
28            if ($emptyValue.length && $el.val() !== '') {
29              formattedData.unshift(new ItemDescriptor({
30                value: '',
31                label: $emptyValue.text(),
32                highlighted: true
33              }));
34            }
35            return formattedData;
36          }
37        }
38      });
39    });
40  }
41  Events.bind(Types.NEW_CONTENT_ADDED, function (e, context, reason) {
42    //eslint-disable-line @atlassian/jira-event-checks/no-newcontentadded-handlers
43    if (reason !== Reasons.panelRefreshed) {
44      initSingleGroupPickers(context);
45    }
46  });
47});

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.