mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-19 05:47:53 +08:00
Merge pull request #3180 from aignatov-bio/ai-sci-5512-fix-datetime-selector-for-filters
Fix datetime for projects and experiments filters [SCI-5512]
This commit is contained in:
commit
84d61252d8
3 changed files with 35 additions and 14 deletions
|
@ -591,6 +591,14 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function selectDate($field) {
|
||||||
|
var datePicker = $field.data('DateTimePicker');
|
||||||
|
if (datePicker && datePicker.date()) {
|
||||||
|
return datePicker.date()._d.toUTCString();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
function initProjectsFilters() {
|
function initProjectsFilters() {
|
||||||
var $filterDropdown = filterDropdown.init();
|
var $filterDropdown = filterDropdown.init();
|
||||||
let $projectsFilter = $('.projects-index .projects-filters');
|
let $projectsFilter = $('.projects-index .projects-filters');
|
||||||
|
@ -631,12 +639,12 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
$filterDropdown.on('filter:apply', function() {
|
$filterDropdown.on('filter:apply', function() {
|
||||||
createdOnFromFilter = $createdOnFromFilter.val();
|
createdOnFromFilter = selectDate($createdOnFromFilter);
|
||||||
createdOnToFilter = $createdOnToFilter.val();
|
createdOnToFilter = selectDate($createdOnToFilter);
|
||||||
membersFilter = dropdownSelector.getValues($('.members-filter'));
|
membersFilter = dropdownSelector.getValues($('.members-filter'));
|
||||||
lookInsideFolders = $foldersCB.prop('checked') ? 'true' : '';
|
lookInsideFolders = $foldersCB.prop('checked') ? 'true' : '';
|
||||||
archivedOnFromFilter = $archivedOnFromFilter.val();
|
archivedOnFromFilter = selectDate($archivedOnFromFilter);
|
||||||
archivedOnToFilter = $archivedOnToFilter.val();
|
archivedOnToFilter = selectDate($archivedOnToFilter);
|
||||||
projectsViewSearch = $textFilter.val();
|
projectsViewSearch = $textFilter.val();
|
||||||
|
|
||||||
appliedFiltersMark();
|
appliedFiltersMark();
|
||||||
|
|
|
@ -109,6 +109,14 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function selectDate($field) {
|
||||||
|
var datePicker = $field.data('DateTimePicker');
|
||||||
|
if (datePicker && datePicker.date()) {
|
||||||
|
return datePicker.date()._d.toUTCString();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
function initExperimentsFilters() {
|
function initExperimentsFilters() {
|
||||||
var $filterDropdown = filterDropdown.init();
|
var $filterDropdown = filterDropdown.init();
|
||||||
|
|
||||||
|
@ -133,12 +141,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$filterDropdown.on('filter:apply', function() {
|
$filterDropdown.on('filter:apply', function() {
|
||||||
startedOnFromFilter = $startedOnFromFilter.val();
|
startedOnFromFilter = selectDate($startedOnFromFilter);
|
||||||
startedOnToFilter = $startedOnToFilter.val();
|
startedOnToFilter = selectDate($startedOnToFilter);
|
||||||
modifiedOnFromFilter = $modifiedOnFromFilter.val();
|
modifiedOnFromFilter = selectDate($modifiedOnFromFilter);
|
||||||
modifiedOnToFilter = $modifiedOnToFilter.val();
|
modifiedOnToFilter = selectDate($modifiedOnToFilter);
|
||||||
archivedOnFromFilter = $archivedOnFromFilter.val();
|
archivedOnFromFilter = selectDate($archivedOnFromFilter);
|
||||||
archivedOnToFilter = $archivedOnToFilter.val();
|
archivedOnToFilter = selectDate($archivedOnToFilter);
|
||||||
experimentsViewSearch = $textFilter.val();
|
experimentsViewSearch = $textFilter.val();
|
||||||
appliedFiltersMark();
|
appliedFiltersMark();
|
||||||
refreshCurrentView();
|
refreshCurrentView();
|
||||||
|
|
|
@ -7,10 +7,6 @@
|
||||||
// New experiments page
|
// New experiments page
|
||||||
|
|
||||||
.projects-show {
|
.projects-show {
|
||||||
.experiments-filters {
|
|
||||||
max-height: calc(100vh - var(--navbar-height) - var(--content-header-size));
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.experiment-actions-menu {
|
.experiment-actions-menu {
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
a,
|
a,
|
||||||
|
@ -351,3 +347,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-height: 700px) {
|
||||||
|
.projects-show {
|
||||||
|
.experiments-filters {
|
||||||
|
max-height: calc(100vh - var(--navbar-height) - var(--content-header-size));
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue