mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +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() {
|
||||
var $filterDropdown = filterDropdown.init();
|
||||
let $projectsFilter = $('.projects-index .projects-filters');
|
||||
|
@ -631,12 +639,12 @@
|
|||
});
|
||||
|
||||
$filterDropdown.on('filter:apply', function() {
|
||||
createdOnFromFilter = $createdOnFromFilter.val();
|
||||
createdOnToFilter = $createdOnToFilter.val();
|
||||
createdOnFromFilter = selectDate($createdOnFromFilter);
|
||||
createdOnToFilter = selectDate($createdOnToFilter);
|
||||
membersFilter = dropdownSelector.getValues($('.members-filter'));
|
||||
lookInsideFolders = $foldersCB.prop('checked') ? 'true' : '';
|
||||
archivedOnFromFilter = $archivedOnFromFilter.val();
|
||||
archivedOnToFilter = $archivedOnToFilter.val();
|
||||
archivedOnFromFilter = selectDate($archivedOnFromFilter);
|
||||
archivedOnToFilter = selectDate($archivedOnToFilter);
|
||||
projectsViewSearch = $textFilter.val();
|
||||
|
||||
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() {
|
||||
var $filterDropdown = filterDropdown.init();
|
||||
|
||||
|
@ -133,12 +141,12 @@
|
|||
}
|
||||
|
||||
$filterDropdown.on('filter:apply', function() {
|
||||
startedOnFromFilter = $startedOnFromFilter.val();
|
||||
startedOnToFilter = $startedOnToFilter.val();
|
||||
modifiedOnFromFilter = $modifiedOnFromFilter.val();
|
||||
modifiedOnToFilter = $modifiedOnToFilter.val();
|
||||
archivedOnFromFilter = $archivedOnFromFilter.val();
|
||||
archivedOnToFilter = $archivedOnToFilter.val();
|
||||
startedOnFromFilter = selectDate($startedOnFromFilter);
|
||||
startedOnToFilter = selectDate($startedOnToFilter);
|
||||
modifiedOnFromFilter = selectDate($modifiedOnFromFilter);
|
||||
modifiedOnToFilter = selectDate($modifiedOnToFilter);
|
||||
archivedOnFromFilter = selectDate($archivedOnFromFilter);
|
||||
archivedOnToFilter = selectDate($archivedOnToFilter);
|
||||
experimentsViewSearch = $textFilter.val();
|
||||
appliedFiltersMark();
|
||||
refreshCurrentView();
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
// New experiments page
|
||||
|
||||
.projects-show {
|
||||
.experiments-filters {
|
||||
max-height: calc(100vh - var(--navbar-height) - var(--content-header-size));
|
||||
overflow: auto;
|
||||
}
|
||||
.experiment-actions-menu {
|
||||
.dropdown-menu {
|
||||
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