Adds classes to hidden sections.

This commit is contained in:
mateuswetah 2024-08-05 18:14:48 -03:00
parent b11bd90bba
commit 49bc993438
1 changed files with 39 additions and 42 deletions

View File

@ -416,10 +416,10 @@
:message="metadataSection.description" /> :message="metadataSection.description" />
</span> </span>
</div> </div>
<transition name="filter-item">
<div <div
v-show="(metadataSectionCollapses[sectionIndex] || isMetadataNavigation) && !isSectionHidden(metadataSection.id)" v-show="((metadataSectionCollapses[sectionIndex] || isMetadataNavigation) && !isSectionHidden(metadataSection.id))"
class="metadata-section-metadata-list"> class="metadata-section-metadata-list"
:class="((metadataSectionCollapses[sectionIndex] || isMetadataNavigation) && !isSectionHidden(metadataSection.id)) ? '' : 'is-section-content-hidden'">
<p <p
v-if="metadataSection.description && metadataSection.description_bellow_name == 'yes'" v-if="metadataSection.description && metadataSection.description_bellow_name == 'yes'"
class="metadata-section-description-help-info metadatum-description-help-info"> class="metadata-section-description-help-info metadatum-description-help-info">
@ -454,7 +454,7 @@
@mobile-special-focus="setMetadatumFocus({ index: index, scrollIntoView: true })" /> @mobile-special-focus="setMetadatumFocus({ index: index, scrollIntoView: true })" />
</template> </template>
</div> </div>
</transition>
</div> </div>
<!-- Hook for extra Form options --> <!-- Hook for extra Form options -->
@ -1696,13 +1696,10 @@ export default {
}, },
onChangeCollapse(event, index) { onChangeCollapse(event, index) {
if (event && !this.metadataCollapses[index] && this.itemMetadata[index].metadatum && this.itemMetadata[index].metadatum['metadata_type'] === "Tainacan\\Metadata_Types\\GeoCoordinate")
this.$emitter.emit('itemEditionFormResize');
this.metadataCollapses.splice(index, 1, event); this.metadataCollapses.splice(index, 1, event);
}, },
toggleMetadataSectionCollapse(sectionIndex) { toggleMetadataSectionCollapse(sectionIndex) {
if (!this.isMetadataNavigation) if ( !this.isMetadataNavigation )
Object.assign( this.metadataSectionCollapses, { [sectionIndex]: (this.formErrorMessage ? true : !this.metadataSectionCollapses[sectionIndex]) }); Object.assign( this.metadataSectionCollapses, { [sectionIndex]: (this.formErrorMessage ? true : !this.metadataSectionCollapses[sectionIndex]) });
}, },
onDeletePermanently() { onDeletePermanently() {