PageSourceSearch

https://support.centuria.pl/includes/jira/field/groupPickerUtil.js

js centuria.pl collected 2026-10-05 07:04:30 UTC 1,445 bytes, 41 lines download raw bytes

1/**
2 * @module jira/field/group-picker-util
3 */
4define('jira/field/group-picker-util', ['jira/ajs/list/item-descriptor', 'jira/ajs/list/group-descriptor', 'jquery'], function (ItemDescriptor, GroupDescriptor, jQuery) {
5  'use strict';
6
7  var _formatResponse = function formatResponse(data, showLabels) {
8    var ret = [];
9    var template = showLabels ? JIRA.Templates.GroupPickerUtil.formatResponseWithLabels : JIRA.Templates.GroupPickerUtil.formatResponse;
10    jQuery(data).each(function (i, suggestions) {
11      var groupDescriptor = new GroupDescriptor({
12        weight: i,
13        // order or groups in suggestions dropdown
14        label: suggestions.header
15      });
16      jQuery(suggestions.groups).each(function () {
17        groupDescriptor.addItem(new ItemDescriptor({
18          value: this.name,
19          // value of item added to select
20          label: this.name,
21          // title of lozenge
22          title: this.name,
23          // tooltip
24          html: template(this),
25          highlighted: true
26        }));
27      });
28      ret.push(groupDescriptor);
29    });
30    return ret;
31  };
32  return {
33    formatResponseWithLabels: function formatResponseWithLabels(data) {
34      return _formatResponse(data, true);
35    },
36    formatResponse: function formatResponse(data, showLabels) {
37      return _formatResponse(data, showLabels);
38    }
39  };
40});
41AJS.namespace('JIRA.GroupPickerUtil', null, require('jira/field/group-picker-util'));

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.