Merge branch 'develop' of https://github.com/tainacan/tainacan into develop
This commit is contained in:
commit
5227f150fe
|
@ -942,15 +942,15 @@
|
|||
else if (metadatum.display == 'yes')
|
||||
display = true;
|
||||
|
||||
// // Deciding display based on user prefs
|
||||
// if (prefsFetchOnlyObject != undefined &&
|
||||
// prefsFetchOnlyObject.meta != undefined) {
|
||||
// let index = prefsFetchOnlyObject.meta.findIndex(metadatumId => metadatumId == metadatum.id);
|
||||
// if (index >= 0)
|
||||
// display = true;
|
||||
// else
|
||||
// display = false;
|
||||
// }
|
||||
// Deciding display based on user prefs
|
||||
if (prefsFetchOnlyObject != undefined &&
|
||||
prefsFetchOnlyObject.meta != undefined) {
|
||||
let index = prefsFetchOnlyObject.meta.findIndex(metadatumId => metadatumId == metadatum.id);
|
||||
if (index >= 0)
|
||||
display = true;
|
||||
else
|
||||
display = false;
|
||||
}
|
||||
|
||||
metadata.push({
|
||||
name: metadatum.name,
|
||||
|
@ -1044,7 +1044,7 @@
|
|||
'2': 'author_name',
|
||||
'3': 'title',
|
||||
'4': 'description'
|
||||
});
|
||||
}, true);
|
||||
|
||||
this.sortingMetadata.push({
|
||||
name: this.$i18n.get('label_title'),
|
||||
|
@ -1133,14 +1133,28 @@
|
|||
let prefsViewMode = !this.isRepositoryLevel ? 'view_mode_' + this.collectionId : 'view_mode';
|
||||
if (this.$userPrefs.get(prefsViewMode) == undefined)
|
||||
this.$eventBusSearch.setInitialViewMode(this.defaultViewMode);
|
||||
else
|
||||
this.$eventBusSearch.setInitialViewMode(this.$userPrefs.get(prefsViewMode));
|
||||
else {
|
||||
let existingViewModeIndex = Object.keys(this.registeredViewModes).findIndex(viewMode => viewMode == this.$userPrefs.get(prefsViewMode));
|
||||
if (existingViewModeIndex >= 0)
|
||||
this.$eventBusSearch.setInitialViewMode(this.$userPrefs.get(prefsViewMode));
|
||||
else
|
||||
this.$eventBusSearch.setInitialViewMode(this.defaultViewMode);
|
||||
}
|
||||
} else {
|
||||
let prefsAdminViewMode = !this.isRepositoryLevel ? 'admin_view_mode_' + this.collectionId : 'admin_view_mode';
|
||||
if (this.$userPrefs.get(prefsAdminViewMode) == undefined)
|
||||
this.$eventBusSearch.setInitialAdminViewMode('cards');
|
||||
else
|
||||
this.$eventBusSearch.setInitialAdminViewMode(this.$userPrefs.get(prefsAdminViewMode));
|
||||
this.$eventBusSearch.setInitialAdminViewMode('table');
|
||||
else {
|
||||
let existingViewMode = this.$userPrefs.get(prefsAdminViewMode);
|
||||
if (existingViewMode == 'cards' ||
|
||||
existingViewMode == 'table' ||
|
||||
existingViewMode == 'records' ||
|
||||
existingViewMode == 'grid' ||
|
||||
existingViewMode == 'masonry')
|
||||
this.$eventBusSearch.setInitialAdminViewMode(this.$userPrefs.get(prefsAdminViewMode));
|
||||
else
|
||||
this.$eventBusSearch.setInitialAdminViewMode('table');
|
||||
}
|
||||
}
|
||||
|
||||
// Watches window resize to adjust filter's top position and compression on mobile
|
||||
|
|
|
@ -942,15 +942,15 @@
|
|||
else if (metadatum.display == 'yes')
|
||||
display = true;
|
||||
|
||||
// // Deciding display based on user prefs
|
||||
// if (prefsFetchOnlyObject != undefined &&
|
||||
// prefsFetchOnlyObject.meta != undefined) {
|
||||
// let index = prefsFetchOnlyObject.meta.findIndex(metadatumId => metadatumId == metadatum.id);
|
||||
// if (index >= 0)
|
||||
// display = true;
|
||||
// else
|
||||
// display = false;
|
||||
// }
|
||||
// Deciding display based on user prefs
|
||||
if (prefsFetchOnlyObject != undefined &&
|
||||
prefsFetchOnlyObject.meta != undefined) {
|
||||
let index = prefsFetchOnlyObject.meta.findIndex(metadatumId => metadatumId == metadatum.id);
|
||||
if (index >= 0)
|
||||
display = true;
|
||||
else
|
||||
display = false;
|
||||
}
|
||||
|
||||
metadata.push(
|
||||
{
|
||||
|
@ -1042,7 +1042,7 @@
|
|||
'2': 'author_name',
|
||||
'3': 'title',
|
||||
'4': 'description'
|
||||
});
|
||||
}, true);
|
||||
|
||||
this.sortingMetadata.push({
|
||||
name: this.$i18n.get('label_title'),
|
||||
|
@ -1132,14 +1132,28 @@
|
|||
let prefsViewMode = !this.isRepositoryLevel ? 'view_mode_' + this.collectionId : 'view_mode';
|
||||
if (this.$userPrefs.get(prefsViewMode) == undefined)
|
||||
this.$eventBusSearch.setInitialViewMode(this.defaultViewMode);
|
||||
else
|
||||
this.$eventBusSearch.setInitialViewMode(this.$userPrefs.get(prefsViewMode));
|
||||
else {
|
||||
let existingViewModeIndex = Object.keys(this.registeredViewModes).findIndex(viewMode => viewMode == this.$userPrefs.get(prefsViewMode));
|
||||
if (existingViewModeIndex >= 0)
|
||||
this.$eventBusSearch.setInitialViewMode(this.$userPrefs.get(prefsViewMode));
|
||||
else
|
||||
this.$eventBusSearch.setInitialViewMode(this.defaultViewMode);
|
||||
}
|
||||
} else {
|
||||
let prefsAdminViewMode = !this.isRepositoryLevel ? 'admin_view_mode_' + this.collectionId : 'admin_view_mode';
|
||||
if (this.$userPrefs.get(prefsAdminViewMode) == undefined)
|
||||
this.$eventBusSearch.setInitialAdminViewMode('cards');
|
||||
else
|
||||
this.$eventBusSearch.setInitialAdminViewMode(this.$userPrefs.get(prefsAdminViewMode));
|
||||
this.$eventBusSearch.setInitialAdminViewMode('table');
|
||||
else {
|
||||
let existingViewMode = this.$userPrefs.get(prefsAdminViewMode);
|
||||
if (existingViewMode == 'cards' ||
|
||||
existingViewMode == 'table' ||
|
||||
existingViewMode == 'records' ||
|
||||
existingViewMode == 'grid' ||
|
||||
existingViewMode == 'masonry')
|
||||
this.$eventBusSearch.setInitialAdminViewMode(this.$userPrefs.get(prefsAdminViewMode));
|
||||
else
|
||||
this.$eventBusSearch.setInitialAdminViewMode('table');
|
||||
}
|
||||
}
|
||||
|
||||
// Watches window resize to adjust filter's top position and compression on mobile
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
margin: 15px;
|
||||
max-width: 425px;
|
||||
min-width: 425px;
|
||||
min-height: 215px;
|
||||
max-height: 215px;
|
||||
min-height: 210px;
|
||||
max-height: 210px;
|
||||
cursor: pointer;
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
|
@ -79,7 +79,7 @@
|
|||
}
|
||||
.metadata-title {
|
||||
flex-shrink: 0;
|
||||
padding: 0.5rem 4.75rem 0.5rem 2.75rem;
|
||||
padding: 0.6rem 4.75rem 0.5rem 2.75rem;
|
||||
margin-bottom: -27px;
|
||||
min-height: 40px;
|
||||
font-size: 0.875rem !important;
|
||||
|
|
|
@ -40,10 +40,8 @@
|
|||
opacity: 0;
|
||||
padding: 3px 8px;
|
||||
transition: visibility 0.2s, opacity 0.2s;
|
||||
margin-top: -43px;
|
||||
margin-top: -31px;
|
||||
background-color: $gray2;
|
||||
border-bottom-left-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
|
||||
a {
|
||||
margin-left: 12px;
|
||||
|
|
|
@ -189,14 +189,16 @@ export default {
|
|||
this.$store.dispatch('search/add_fetchonly_meta', metadatum );
|
||||
this.updateURLQueries();
|
||||
},
|
||||
addFetchOnly( metadatum ){
|
||||
addFetchOnly( metadatum, ignorePrefs ){
|
||||
this.$store.dispatch('search/add_fetchonly', metadatum );
|
||||
this.updateURLQueries();
|
||||
|
||||
let prefsFetchOnly = this.collectionId != undefined ? 'fetch_only_' + this.collectionId : 'fetch_only';
|
||||
if (JSON.stringify(this.$userPrefs.get(prefsFetchOnly)) != JSON.stringify(metadatum)) {
|
||||
this.$userPrefs.set(prefsFetchOnly, metadatum)
|
||||
.catch(() => { this.$console.log("Error setting user prefs for fetch_only"); });
|
||||
if (!ignorePrefs) {
|
||||
let prefsFetchOnly = this.collectionId != undefined ? 'fetch_only_' + this.collectionId : 'fetch_only';
|
||||
if (JSON.stringify(this.$userPrefs.get(prefsFetchOnly)) != JSON.stringify(metadatum)) {
|
||||
this.$userPrefs.set(prefsFetchOnly, metadatum)
|
||||
.catch(() => { this.$console.log("Error setting user prefs for fetch_only"); });
|
||||
}
|
||||
}
|
||||
},
|
||||
cleanFetchOnly() {
|
||||
|
|
|
@ -132,7 +132,7 @@ export default {
|
|||
@import "../../src/admin/scss/_view-mode-cards.scss";
|
||||
|
||||
.tainacan-cards-container .tainacan-card .metadata-title {
|
||||
padding: 0.75rem;
|
||||
padding: 0.6rem 0.75rem;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -84,8 +84,8 @@ export default {
|
|||
$tainacan-input-color: #1d1d1d;
|
||||
$gray1: #f2f2f2;
|
||||
$gray2: #e5e5e5;
|
||||
$gray4: #898d8f;
|
||||
$gray3: #dcdcdc;
|
||||
$gray4: #898d8f;
|
||||
|
||||
@import "../../src/admin/scss/_view-mode-masonry.scss";
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ export default {
|
|||
@import "../../src/admin/scss/_view-mode-records.scss";
|
||||
|
||||
.tainacan-records-container .tainacan-record .metadata-title {
|
||||
padding: 0.75rem;
|
||||
padding: 0.6rem 0.75rem;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue