This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
<script>
|
||||
import appIcon from '@components/AppIcon';
|
||||
import projectRelTime from '@components/ProjectRelTime';
|
||||
import projectMapLink from '@components/ProjectMapLink';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
appIcon,
|
||||
projectRelTime,
|
||||
projectMapLink
|
||||
},
|
||||
props: {
|
||||
@@ -14,19 +12,7 @@ export default {
|
||||
type: String
|
||||
},
|
||||
emits: ['opening-lightbox'],
|
||||
data() {
|
||||
return {
|
||||
title:''
|
||||
};
|
||||
},
|
||||
inject: ['lang', 'isMobile'],
|
||||
mounted() {
|
||||
this.title =
|
||||
(this.$refs.comment?this.$refs.comment.outerHTML:'') +
|
||||
this.$refs[this.type=='marker'?'takenon':'postedon'].outerHTML +
|
||||
this.$refs[this.type=='marker'?'postedon':'takenon'].outerHTML
|
||||
;
|
||||
},
|
||||
methods: {
|
||||
openMedia() {
|
||||
this.$refs.link.click();
|
||||
@@ -42,12 +28,19 @@ export default {
|
||||
:data-lightbox="type+'-medias'"
|
||||
:data-type="options.subtype"
|
||||
:data-id="options.id_media"
|
||||
:data-title="title"
|
||||
:data-orientation="options.rotate"
|
||||
:data-context="type"
|
||||
:data-comment="options.comment"
|
||||
:data-posted-on-local-time="options.posted_on_formatted_time_local"
|
||||
:data-posted-on-site-time="options.posted_on_formatted_time"
|
||||
:data-posted-on-day-offset="options.posted_on_day_offset"
|
||||
:data-taken-on-local-time="options.taken_on_formatted_time_local"
|
||||
:data-taken-on-site-time="options.taken_on_formatted_time"
|
||||
:data-taken-on-day-offset="options.taken_on_day_offset"
|
||||
@click="$emit('opening-lightbox', $event)"
|
||||
ref="link"
|
||||
>
|
||||
<img
|
||||
<img
|
||||
:src="options.thumb_path"
|
||||
:width="options.width"
|
||||
:height="options.height"
|
||||
@@ -65,27 +58,4 @@ export default {
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
<div style="display:none">
|
||||
<span v-if="options.comment" ref="comment" class="lb-caption-line comment desktop">
|
||||
<appIcon icon="post" width="fixed" size="lg" text-classes="comment-text" :text="options.comment" />
|
||||
</span>
|
||||
<span ref="postedon" class="lb-caption-line">
|
||||
<projectRelTime
|
||||
icon="upload"
|
||||
titleWrapperLangId="media.posted_on"
|
||||
:localTime="options.posted_on_formatted_time_local"
|
||||
:siteTime="options.posted_on_formatted_time"
|
||||
:offset="options.posted_on_day_offset"
|
||||
/>
|
||||
</span>
|
||||
<span ref="takenon" class="lb-caption-line">
|
||||
<projectRelTime
|
||||
:icon="options.subtype+'-shot'"
|
||||
:titleWrapperLangId="'media.'+options.subtype+'_taken_on'"
|
||||
:localTime="options.taken_on_formatted_time_local"
|
||||
:siteTime="options.taken_on_formatted_time"
|
||||
:offset="options.taken_on_day_offset"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user