Fix people and space filters (#6656)

Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
Yuriy Bakhtin 2023-11-20 21:36:46 +01:00 committed by GitHub
parent c9dd93c076
commit ae8f2fa342
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -7,6 +7,7 @@ HumHub Changelog
- Fix #6645: File dropdown not visible at the bottom of the page
- Fix #6639: Apply image inline styles in email message
- Fix #6649: Fix birthday format on welcome page
- Fix #6656: Fix people and space filters
- Fix #6652: Fix profile update on welcome page
- Fix #6660: Fix memory usage on integrity check

View File

@ -3,11 +3,17 @@ humhub.module('cards', function(module, require, $) {
const loader = require('ui.loader');
const applyFilters = function(evt) {
const form = $(evt.$trigger).closest('form');
form.find('select[data-select2-id] option[data-id]').each(function() {
$(this).val($(this).data('id'));
$(evt.$trigger).closest('form').submit();
}
const initFiltersForm = function () {
const form = $('form.form-search');
form.find('input[type=text]:first').focus();
form.on('submit', function () {
$(this).find('select[data-select2-id] option[data-id]').each(function() {
$(this).val($(this).data('id'));
});
});
form.submit();
}
const selectTag = function (evt) {
@ -115,7 +121,7 @@ humhub.module('cards', function(module, require, $) {
const init = function() {
hideLastNotCompletedRow();
$('input.form-search-filter[name=keyword]').focus();
initFiltersForm();
initScroll();
}