Skip to content

Commit

Permalink
fix disabeld field in translated media field and slideshow
Browse files Browse the repository at this point in the history
  • Loading branch information
thingasd committed Oct 7, 2022
1 parent 293a06d commit 3ebaeea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions frontend/js/components/MediaFieldTranslated.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
:withCaption="withCaption"
:altTextMaxLength="altTextMaxLength"
:captionMaxLength="captionMaxLength"
:extraMetadatas="extraMetadatas">
:extraMetadatas="extraMetadatas"
:disabled="disabled">
<slot />
</a17-slideshow>
<a17-mediafield v-else
Expand All @@ -29,7 +30,8 @@
:withCaption="withCaption"
:altTextMaxLength="altTextMaxLength"
:captionMaxLength="captionMaxLength"
:extraMetadatas="extraMetadatas">
:extraMetadatas="extraMetadatas"
:disabled="disabled">
<slot />
</a17-mediafield>
</a17-inputframe>
Expand Down
13 changes: 9 additions & 4 deletions frontend/js/components/Slideshow.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<div class="slideshow">
<div class="slideshow__trigger" v-if="buttonOnTop && remainingSlides > 0">
<a17-button type="button" variant="ghost" @click="openMediaLibrary(remainingSlides)">{{ addLabel }}</a17-button>
<a17-button :disabled="disabled" type="button" variant="ghost" @click="openMediaLibrary(remainingSlides)">{{ addLabel }}</a17-button>
<span class="slideshow__note f--small"><slot></slot></span>
</div>
<draggable class="slideshow__content" v-model="slides" :options="dragOptions" v-if="slides.length">
<transition-group name="draggable_list" tag='div'>
<div class="slide" v-for="(slide, index) in slides" :key="slide.id">
<div class="slide__handle">
<div class="slide__handle" v-if="!disabled">
<div class="slide__handle--drag"></div>
</div>
<a17-mediafield class="slide__content"
Expand All @@ -22,13 +22,14 @@
:withVideoUrl="withVideoUrl"
:altTextMaxLength="altTextMaxLength"
:captionMaxLength="captionMaxLength"
:extraMetadatas="extraMetadatas">
:extraMetadatas="extraMetadatas"
:disabled="disabled">
</a17-mediafield>
</div>
</transition-group>
</draggable>
<div class="slideshow__trigger" v-if="!buttonOnTop && remainingSlides > 0">
<a17-button type="button" variant="ghost" @click="openMediaLibrary(remainingSlides)">{{ addLabel }}</a17-button>
<a17-button :disabled="disabled" type="button" variant="ghost" @click="openMediaLibrary(remainingSlides)">{{ addLabel }}</a17-button>
<span class="slideshow__note f--small"><slot></slot></span>
</div>
</div>
Expand Down Expand Up @@ -66,6 +67,10 @@
buttonOnTop: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
}
},
data: function () {
Expand Down

0 comments on commit 3ebaeea

Please sign in to comment.