|
|
@ -27,12 +27,17 @@ define('tagFilter', ['hooks', 'alerts', 'bootstrap'], function (hooks, alerts, b
|
|
|
|
}
|
|
|
|
}
|
|
|
|
initialTags = selectedTags.slice();
|
|
|
|
initialTags = selectedTags.slice();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const toggleSearchVisibilty = searchEl.parent('[component="tag/filter"]').length &&
|
|
|
|
|
|
|
|
app.user.privileges['search:tags'];
|
|
|
|
|
|
|
|
|
|
|
|
el.on('show.bs.dropdown', function () {
|
|
|
|
el.on('show.bs.dropdown', function () {
|
|
|
|
el.find('.dropdown-toggle').css({ visibility: 'hidden' });
|
|
|
|
if (toggleSearchVisibilty) {
|
|
|
|
searchEl.removeClass('hidden');
|
|
|
|
el.find('.dropdown-toggle').css({ visibility: 'hidden' });
|
|
|
|
searchEl.css({
|
|
|
|
searchEl.removeClass('hidden');
|
|
|
|
'z-index': el.find('.dropdown-toggle').css('z-index') + 1,
|
|
|
|
searchEl.css({
|
|
|
|
});
|
|
|
|
'z-index': el.find('.dropdown-toggle').css('z-index') + 1,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function doSearch() {
|
|
|
|
function doSearch() {
|
|
|
|
const val = searchEl.find('input').val();
|
|
|
|
const val = searchEl.find('input').val();
|
|
|
@ -61,8 +66,11 @@ define('tagFilter', ['hooks', 'alerts', 'bootstrap'], function (hooks, alerts, b
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
el.on('hidden.bs.dropdown', function () {
|
|
|
|
el.on('hidden.bs.dropdown', function () {
|
|
|
|
el.find('.dropdown-toggle').css({ visibility: 'inherit' });
|
|
|
|
if (toggleSearchVisibilty) {
|
|
|
|
searchEl.addClass('hidden');
|
|
|
|
el.find('.dropdown-toggle').css({ visibility: 'inherit' });
|
|
|
|
|
|
|
|
searchEl.addClass('hidden');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
searchEl.off('click');
|
|
|
|
searchEl.off('click');
|
|
|
|
searchEl.find('input').off('keyup');
|
|
|
|
searchEl.find('input').off('keyup');
|
|
|
|
|
|
|
|
|
|
|
|