Merge branch 'develop' into feature/184
This commit is contained in:
commit
3b6b9ebb57
|
@ -74,9 +74,8 @@
|
|||
</li>
|
||||
</ul>
|
||||
<ul v-if="collections.length > 0 && !isLoading">
|
||||
<li>
|
||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_collections')">
|
||||
<router-link
|
||||
v-if="$userCaps.hasCapability('tnc_rep_edit_collections')"
|
||||
tag="a"
|
||||
:to="$routerHelper.getNewCollectionPath()"
|
||||
class="tainacan-card new-card">
|
||||
|
|
|
@ -645,7 +645,8 @@
|
|||
hasAnOpenModal: false,
|
||||
hasAnOpenAlert: true,
|
||||
metadataSearchCancel: undefined,
|
||||
isMobileScreen: false
|
||||
isMobileScreen: false,
|
||||
windowWidth: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -1218,12 +1219,18 @@
|
|||
},
|
||||
hideFiltersOnMobile: _.debounce( function() {
|
||||
this.$nextTick(() => {
|
||||
|
||||
if (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) {
|
||||
const previousIsMobile = this.isMobileScreen;
|
||||
this.isMobileScreen = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <= 768;
|
||||
|
||||
if ((!previousIsMobile && this.isMobileScreen) || this.openAdvancedSearch) {
|
||||
const previousMobileScreen = this.isMobileScreen;
|
||||
const previousWindowWidth = this.windowWidth;
|
||||
|
||||
this.windowWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);
|
||||
this.isMobileScreen = this.windowWidth <= 768;
|
||||
|
||||
if ( // We DO NOT want to open the filters due to this resize event IF:
|
||||
(!previousMobileScreen && this.isMobileScreen) || // We're coming from a non-mobile screen to a mobile screen, or
|
||||
(previousWindowWidth == this.windowWidth) || // The window size didn't changed (the resize event is triggered by scrolls on mobile), or
|
||||
this.openAdvancedSearch // Advanced search is opened
|
||||
) {
|
||||
this.isFiltersModalActive = false;
|
||||
} else {
|
||||
this.isFiltersModalActive = true;
|
||||
|
|
|
@ -668,6 +668,7 @@
|
|||
metadataSearchCancel: undefined,
|
||||
latestNonFullscreenViewMode: '',
|
||||
isMobileScreen: false,
|
||||
windowWidth: null,
|
||||
initialItemPosition: null,
|
||||
isFiltersListFixedAtTop: false,
|
||||
isFiltersListFixedAtBottom: false,
|
||||
|
@ -1280,10 +1281,18 @@
|
|||
hideFiltersOnMobile: _.debounce( function() {
|
||||
this.$nextTick(() => {
|
||||
if (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) {
|
||||
const previousisMobileScreen = this.isMobileScreen;
|
||||
this.isMobileScreen = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <= 768;
|
||||
|
||||
if ((!previousisMobileScreen && this.isMobileScreen) || this.startWithFiltersHidden || this.openAdvancedSearch)
|
||||
const previousMobileScreen = this.isMobileScreen;
|
||||
const previousWindowWidth = this.windowWidth;
|
||||
|
||||
this.windowWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);
|
||||
this.isMobileScreen = this.windowWidth <= 768;
|
||||
|
||||
if ( // We DO NOT want to open the filters due to this resize event IF:
|
||||
(!previousMobileScreen && this.isMobileScreen) || // We're coming from a non-mobile screen to a mobile screen, or
|
||||
(previousWindowWidth == this.windowWidth) || // The window size didn't changed (the resize event is triggered by scrolls on mobile), or
|
||||
this.startWithFiltersHidden || // Filters should begin disabled, or
|
||||
this.openAdvancedSearch // Advanced search is opened
|
||||
)
|
||||
this.isFiltersModalActive = false;
|
||||
else
|
||||
this.isFiltersModalActive = true;
|
||||
|
|
Loading…
Reference in New Issue