mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 07:26:15 +08:00
UI activtiies fixes
This commit is contained in:
parent
111056a032
commit
a87fc24251
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue