|
|
@ -3592,36 +3592,30 @@ function initIssueList() { |
|
|
|
fullTextSearch: true |
|
|
|
fullTextSearch: true |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$('.menu a.label-filter-item').each(function () { |
|
|
|
function excludeLabel (item) { |
|
|
|
$(this).on('click', function (e) { |
|
|
|
const href = $(item).attr('href'); |
|
|
|
if (e.altKey) { |
|
|
|
const id = $(item).data('label-id'); |
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const href = $(this).attr('href'); |
|
|
|
|
|
|
|
const id = $(this).data('label-id'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`; |
|
|
|
const regStr = `labels=((?:-?[0-9]+%2c)*)(${id})((?:%2c-?[0-9]+)*)&`; |
|
|
|
const newStr = 'labels=$1-$2$3&'; |
|
|
|
const newStr = 'labels=$1-$2$3&'; |
|
|
|
|
|
|
|
|
|
|
|
window.location = href.replace(new RegExp(regStr), newStr); |
|
|
|
window.location = href.replace(new RegExp(regStr), newStr); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.menu a.label-filter-item').each(function () { |
|
|
|
|
|
|
|
$(this).on('click', function (e) { |
|
|
|
|
|
|
|
if (e.altKey) { |
|
|
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
excludeLabel(this); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$('.menu .ui.dropdown.label-filter').on('keydown', (e) => { |
|
|
|
$('.menu .ui.dropdown.label-filter').on('keydown', (e) => { |
|
|
|
if (e.altKey && e.keyCode === 13) { |
|
|
|
if (e.altKey && e.keyCode === 13) { |
|
|
|
const selectedItems = $('.menu .ui.dropdown.label-filter .menu .item.selected'); |
|
|
|
const selectedItems = $('.menu .ui.dropdown.label-filter .menu .item.selected'); |
|
|
|
|
|
|
|
|
|
|
|
if (selectedItems.length > 0) { |
|
|
|
if (selectedItems.length > 0) { |
|
|
|
const item = $(selectedItems[0]); |
|
|
|
excludeLabel($(selectedItems[0])); |
|
|
|
|
|
|
|
|
|
|
|
const href = item.attr('href'); |
|
|
|
|
|
|
|
const id = item.data('label-id'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`; |
|
|
|
|
|
|
|
const newStr = 'labels=$1-$2$3&'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.location = href.replace(new RegExp(regStr), newStr); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|