Add watchlist toggle link to sidebar, remove button
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
import AjaxContent from './AjaxContent.vue'
|
import AjaxContent from './AjaxContent.vue'
|
||||||
import Calendar from './Calendar.vue'
|
import Calendar from './Calendar.vue'
|
||||||
import FacebookPixel from './FacebookPixel.vue'
|
import FacebookPixel from './FacebookPixel.vue'
|
||||||
|
import WatchlistToggle from './WatchlistToggle.vue'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import 'dayjs/locale/de'
|
import 'dayjs/locale/de'
|
||||||
|
|
||||||
@@ -22,7 +23,8 @@
|
|||||||
DaterangeSelect,
|
DaterangeSelect,
|
||||||
AjaxContent,
|
AjaxContent,
|
||||||
Calendar,
|
Calendar,
|
||||||
FacebookPixel
|
FacebookPixel,
|
||||||
|
WatchlistToggle
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -43,7 +45,7 @@
|
|||||||
singleDate: false
|
singleDate: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: [ 'filterSettings', 'argumentPrefix', 'uris', 'hotelFirst', 'fbPixelData' ],
|
props: [ 'filterSettings', 'argumentPrefix', 'uris', 'hotelFirst', 'fbPixelData', 'watchlist' ],
|
||||||
computed: {
|
computed: {
|
||||||
dateLabel () {
|
dateLabel () {
|
||||||
return this.dateStart + ' - ' + this.dateEnd;
|
return this.dateStart + ' - ' + this.dateEnd;
|
||||||
|
|||||||
+10
-7
@@ -1,12 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<span v-on:click.prevent="toggleWatchlist()">
|
<a href="#" v-on:click.prevent="toggleWatchlist()">
|
||||||
<template v-if="onWatchlist">
|
<i class="fa tooltiptoggle" :class="{ 'fa-minus-circle': onWatchlist, 'fa-plus-circle': !onWatchlist }"
|
||||||
<i class="fa fa-minus tooltiptoggle" data-placement="auto" title="Merkliste"></i>
|
data-placement="auto" title="Merkliste +/-"></i>
|
||||||
</template>
|
<span v-if="layout === 'link'">
|
||||||
<template v-else>
|
{{ onWatchlist ? 'von der Merkliste entfernen' : 'auf die Merkliste setzen' }}
|
||||||
<i class="fa fa-plus tooltiptoggle" data-placement="auto" title="Merkliste"></i>
|
|
||||||
</template>
|
|
||||||
</span>
|
</span>
|
||||||
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -21,6 +20,10 @@
|
|||||||
watchlist: {
|
watchlist: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
layout: {
|
||||||
|
type: String,
|
||||||
|
default: 'toggle'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -110,5 +110,13 @@
|
|||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
cursor: pointer;
|
&:hover {
|
||||||
|
background-color: $color-brand-secondary;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
&:visited,
|
||||||
|
&:active,
|
||||||
|
&:focus {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,9 +36,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</f:else>
|
</f:else>
|
||||||
</f:if>
|
</f:if>
|
||||||
<f:if condition="{hotel}">
|
|
||||||
<watchlist-toggle :watchlist="watchlist" uid="{hotel.uid}:{product.uid}" class="product-detail__watchlist"></watchlist-toggle>
|
|
||||||
</f:if>
|
|
||||||
<f:if condition="{product.skipassIncluded}">
|
<f:if condition="{product.skipassIncluded}">
|
||||||
<a href="#" class="ep-property">inkl. Skipass</a>
|
<a href="#" class="ep-property">inkl. Skipass</a>
|
||||||
</f:if>
|
</f:if>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
argument-prefix='<ep:argumentPrefix pluginName="Ajax" />'
|
argument-prefix='<ep:argumentPrefix pluginName="Ajax" />'
|
||||||
:hotel-first="{f:if(condition: settings.hotelOnTop, then: 'true', else: 'false')}"
|
:hotel-first="{f:if(condition: settings.hotelOnTop, then: 'true', else: 'false')}"
|
||||||
:fb-pixel-data="{ productUid: <f:format.raw>{product.uid}</f:format.raw>, nameInternal: '<f:format.raw>{product.nameInternal}</f:format.raw>' }"
|
:fb-pixel-data="{ productUid: <f:format.raw>{product.uid}</f:format.raw>, nameInternal: '<f:format.raw>{product.nameInternal}</f:format.raw>' }"
|
||||||
|
:watchlist="watchlist"
|
||||||
inline-template>
|
inline-template>
|
||||||
<div class="product-detail-wrapper">
|
<div class="product-detail-wrapper">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -72,6 +73,12 @@
|
|||||||
v-on:click.prevent="showHtml('journey')">Anreise</button>
|
v-on:click.prevent="showHtml('journey')">Anreise</button>
|
||||||
</f:if>
|
</f:if>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<p>
|
||||||
|
<watchlist-toggle :watchlist="watchlist" uid="{hotel.uid}:{product.uid}"
|
||||||
|
layout="link"></watchlist-toggle>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden-xs">
|
<div class="hidden-xs">
|
||||||
<f:render section="Calendar" arguments="{_all}"/>
|
<f:render section="Calendar" arguments="{_all}"/>
|
||||||
@@ -235,3 +242,9 @@
|
|||||||
</f:section>
|
</f:section>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
<script>
|
||||||
|
import WatchlistToggle from "../../Assets/js/components/WatchlistToggle";
|
||||||
|
export default {
|
||||||
|
components: {WatchlistToggle}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user