2017-01-10 23:02:20 +00:00
|
|
|
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, quotes, object-shorthand, no-unused-vars, no-shadow, one-var, one-var-declaration-per-line, comma-dangle, max-len */
|
2016-07-24 20:45:11 +00:00
|
|
|
(function() {
|
|
|
|
this.IssueStatusSelect = (function() {
|
|
|
|
function IssueStatusSelect() {
|
|
|
|
$('.js-issue-status').each(function(i, el) {
|
|
|
|
var fieldName;
|
|
|
|
fieldName = $(el).data("field-name");
|
|
|
|
return $(el).glDropdown({
|
|
|
|
selectable: true,
|
|
|
|
fieldName: fieldName,
|
|
|
|
toggleLabel: (function(_this) {
|
|
|
|
return function(selected, el, instance) {
|
|
|
|
var $item, label;
|
|
|
|
label = 'Author';
|
|
|
|
$item = instance.dropdown.find('.is-active');
|
|
|
|
if ($item.length) {
|
|
|
|
label = $item.text();
|
|
|
|
}
|
|
|
|
return label;
|
|
|
|
};
|
|
|
|
})(this),
|
|
|
|
clicked: function(item, $el, e) {
|
|
|
|
return e.preventDefault();
|
|
|
|
},
|
|
|
|
id: function(obj, el) {
|
|
|
|
return $(el).data("id");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
return IssueStatusSelect;
|
|
|
|
})();
|
2017-02-10 06:50:50 +00:00
|
|
|
}).call(window);
|