UI activtiies fixes

This commit is contained in:
aignatov-bio 2019-11-27 14:04:59 +01:00
parent 111056a032
commit a87fc24251
3 changed files with 12 additions and 3 deletions

View file

@ -301,6 +301,12 @@ var globalActivities = (function() {
});
}
$('.filters-container').off('scroll').on('scroll', function() {
$.each(filterSelectors, function(i, selector) {
dropdownSelector.updateDropdownDirection(`select[name=${selector}]`);
});
});
$('#calendar-to-date').on('dp.change', function(e) {
var dateContainer = $('.ga-side .date-selector.filter-block');
if (!updateRunning) {

View file

@ -575,13 +575,14 @@ var dropdownSelector = (function() {
// Select element appearance
var tagAppearance = selector.data('config').selectAppearance === 'simple' ? 'ds-simple' : 'ds-tags';
var label = customLabel ? customLabel(data) : data.label;
// Add new tag before search field
var tag = $(`<div class="${tagAppearance} ${customClass}" style="${customStyle ? customStyle(data) : ''}" >
<div class="tag-label"
title="${label}"
data-ds-tag-group="${data.group}"
data-ds-tag-id="${data.value}">
${customLabel ? customLabel(data) : data.label}
${label}
</div>
<i class="fas fa-times ${selector.data('config').singleSelect ? 'hidden' : ''}"></i>
</div>`).insertBefore(container.find('.input-field .search-field'));
@ -731,6 +732,8 @@ var dropdownSelector = (function() {
updateDropdownDirection: function(selector) {
if ($(selector).length === 0) return false;
if (!$(selector).next().hasClass('open')) return false;
updateDropdownDirection($(selector), $(selector).next());
return this;

View file

@ -82,7 +82,7 @@
display: inline-block;
margin-bottom: 1px;
margin-right: 5px;
max-width: 500px;
max-width: 240px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;