Fix projects filter

This commit is contained in:
Urban Rotnik 2021-02-23 13:16:39 +01:00
parent a93174f827
commit 6b5d07e1a4
2 changed files with 7 additions and 7 deletions

View file

@ -641,6 +641,10 @@ var ProjectsIndex = (function() {
$('#folderSearchInfo').toggle();
});
$projectsFilter.on('click', '#folder_search', function(e) {
e.stopPropagation();
});
$filterDropdown.on('filter:apply', function() {
createdOnFromFilter = selectDate($createdOnFromFilter);
createdOnToFilter = selectDate($createdOnToFilter);

View file

@ -10,8 +10,8 @@ var filterDropdown = (function() {
}
function preventDropdownClose() {
$('.dropdown-menu', $filterContainer).click((e) => {
if (!$(e.target).is('input,a,.keyword-text,.keyword-icon')) {
$filterContainer.on('click', '.dropdown-menu', function(e) {
if (!$(e.target).is('input,a')) {
e.stopPropagation();
e.preventDefault();
$('#textSearchFilterHistory').hide();
@ -35,7 +35,7 @@ var filterDropdown = (function() {
$('#textSearchFilterHistory').append(
$(`<li class="dropdown-item">
<a class="projects-search-keyword" href="#" data-keyword="${keyword}">
<i class="fas fa-history keyword-icon"></i>
<i class="fas fa-history"></i>
<span class="keyword-text">${keyword}</span>
</a>
</li>`)
@ -58,10 +58,6 @@ var filterDropdown = (function() {
$(this).closest('.dropdown').removeClass('open');
});
$textFilter.on('focusout', function() {
$filterContainer.trigger('filter:clickBody');
});
$filterContainer.on('click', '.projects-search-keyword', function(e) {
e.stopPropagation();
e.preventDefault();