Implement global store, refactor session handling
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
// Import dependencies
|
// Import dependencies
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueSession from 'vue-session'
|
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import 'dayjs/locale/de'
|
import 'dayjs/locale/de'
|
||||||
@@ -40,17 +39,18 @@ const sliderPrevArrow = '<button class="slider-pagination__arrow slider-paginati
|
|||||||
const sliderNextArrow = '<button class="slider-pagination__arrow slider-pagination__arrow--next"><i class="fa fa-2x fa-chevron-right"></i></button>';
|
const sliderNextArrow = '<button class="slider-pagination__arrow slider-pagination__arrow--next"><i class="fa fa-2x fa-chevron-right"></i></button>';
|
||||||
const sliderDot = '<button class="slider-pagination__dot" data-role="none" role="button" tabindex="0" />';
|
const sliderDot = '<button class="slider-pagination__dot" data-role="none" role="button" tabindex="0" />';
|
||||||
|
|
||||||
// Enable session handling
|
|
||||||
Vue.use(VueSession, { persist: true });
|
|
||||||
|
|
||||||
// Define date filter for vue templates
|
// Define date filter for vue templates
|
||||||
Vue.filter('date', (value) => {
|
Vue.filter('date', (value) => {
|
||||||
return dayjs(value).format('DD.MM.YYYY');
|
return dayjs(value).format('DD.MM.YYYY');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Store
|
||||||
|
import store from './_store';
|
||||||
|
|
||||||
// Initialize vue app
|
// Initialize vue app
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
store,
|
||||||
components: {
|
components: {
|
||||||
SearchBar,
|
SearchBar,
|
||||||
SearchBox,
|
SearchBox,
|
||||||
@@ -70,7 +70,6 @@ new Vue({
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
config: {},
|
|
||||||
maxWindowWidth: 991,
|
maxWindowWidth: 991,
|
||||||
lastScrollPosition: 0,
|
lastScrollPosition: 0,
|
||||||
scrollTopVisible: false,
|
scrollTopVisible: false,
|
||||||
@@ -78,20 +77,10 @@ new Vue({
|
|||||||
navbarLocked: false,
|
navbarLocked: false,
|
||||||
searchbarFixed: false,
|
searchbarFixed: false,
|
||||||
mobileMode: false,
|
mobileMode: false,
|
||||||
backgroundImageMode: 'mobile',
|
backgroundImageMode: 'mobile'
|
||||||
watchlist: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
watchlistCount () {
|
|
||||||
return this.watchlist.length;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
parseConfig () {
|
|
||||||
const configElement = document.getElementById('appconfig');
|
|
||||||
this.config = JSON.parse(configElement.innerHTML);
|
|
||||||
},
|
|
||||||
setMobileMode () {
|
setMobileMode () {
|
||||||
this.mobileMode = $window.outerWidth() < this.maxWindowWidth;
|
this.mobileMode = $window.outerWidth() < this.maxWindowWidth;
|
||||||
},
|
},
|
||||||
@@ -334,7 +323,7 @@ new Vue({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
appendPaCode () {
|
appendPaCode () {
|
||||||
const paCode = this.config.paCode;
|
const paCode = this.$store.state.config.paCode;
|
||||||
if (!paCode) {
|
if (!paCode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -356,7 +345,8 @@ new Vue({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.parseConfig();
|
this.$store.commit('initConfig');
|
||||||
|
this.$store.commit('initWatchlist');
|
||||||
EventBus.$on('ajaxContentLoaded', () => {
|
EventBus.$on('ajaxContentLoaded', () => {
|
||||||
Vue.nextTick(() => {
|
Vue.nextTick(() => {
|
||||||
this.initContentsliders();
|
this.initContentsliders();
|
||||||
@@ -373,25 +363,6 @@ new Vue({
|
|||||||
EventBus.$on('scrollTo', (anchorId, offset) => {
|
EventBus.$on('scrollTo', (anchorId, offset) => {
|
||||||
this.scrollTo(anchorId, offset);
|
this.scrollTo(anchorId, offset);
|
||||||
});
|
});
|
||||||
EventBus.$on('watchlistToggle', uid => {
|
|
||||||
let list = this.watchlist;
|
|
||||||
let watchlistIndex = list.indexOf(uid);
|
|
||||||
if (watchlistIndex === -1) {
|
|
||||||
list.push(uid)
|
|
||||||
} else {
|
|
||||||
list.splice(watchlistIndex, 1)
|
|
||||||
}
|
|
||||||
this.watchlist = list;
|
|
||||||
this.$session.set('watchlist', this.watchlist);
|
|
||||||
|
|
||||||
});
|
|
||||||
if (!this.$session.exists()) {
|
|
||||||
this.$session.start();
|
|
||||||
}
|
|
||||||
if (!this.$session.has('watchlist')) {
|
|
||||||
this.$session.set('watchlist', []);
|
|
||||||
}
|
|
||||||
this.watchlist = this.$session.get('watchlist');
|
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
Vue.nextTick(() => {
|
Vue.nextTick(() => {
|
||||||
|
|||||||
+65
-21
@@ -2,16 +2,11 @@ import Vue from 'vue'
|
|||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
import AddressStore from './stores/address'
|
import AddressStore from './myep/stores/address'
|
||||||
import CrmDataStore from './stores/crmdata'
|
import CrmDataStore from './myep/stores/crmdata'
|
||||||
import TeamerStore from './stores/teamer'
|
import TeamerStore from './myep/stores/teamer'
|
||||||
import EventsStore from './stores/events'
|
import EventsStore from './myep/stores/events'
|
||||||
import NewsletterStore from './stores/newsletter'
|
import NewsletterStore from './myep/stores/newsletter'
|
||||||
|
|
||||||
const configElement = document.getElementById('appconfig');
|
|
||||||
const config = JSON.parse(configElement.innerHTML);
|
|
||||||
|
|
||||||
axios.defaults.baseURL = config.myEpApiBaseUrl;
|
|
||||||
|
|
||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
|
|
||||||
@@ -24,12 +19,14 @@ export default new Vuex.Store({
|
|||||||
newsletter: NewsletterStore
|
newsletter: NewsletterStore
|
||||||
},
|
},
|
||||||
state: {
|
state: {
|
||||||
config: config,
|
config: {},
|
||||||
|
watchlist: [],
|
||||||
|
watchlistId: null,
|
||||||
loading: false,
|
loading: false,
|
||||||
authToken: sessionStorage.getItem('token'),
|
authToken: sessionStorage.getItem('token'),
|
||||||
loggedIn: !!sessionStorage.getItem('token'),
|
loggedIn: !!sessionStorage.getItem('token'),
|
||||||
isTeamer: JSON.parse(sessionStorage.getItem('teamerId')) !== null,
|
isTeamer: JSON.parse(sessionStorage.getItem('isTeamer')),
|
||||||
teamerId: JSON.parse(sessionStorage.getItem('teamerId')),
|
memberId: JSON.parse(sessionStorage.getItem('memberId')),
|
||||||
countries: [],
|
countries: [],
|
||||||
abilities: [],
|
abilities: [],
|
||||||
timeFrames: [],
|
timeFrames: [],
|
||||||
@@ -40,6 +37,40 @@ export default new Vuex.Store({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
initConfig (state) {
|
||||||
|
const configElement = document.getElementById('appconfig');
|
||||||
|
state.config = JSON.parse(configElement.innerHTML);
|
||||||
|
axios.defaults.baseURL = state.config.myEpApiBaseUrl;
|
||||||
|
},
|
||||||
|
initWatchlist (state, list = null) {
|
||||||
|
if (list) {
|
||||||
|
sessionStorage.setItem('watchlist', JSON.stringify(list.items));
|
||||||
|
sessionStorage.setItem('watchlistId', JSON.stringify(list.id));
|
||||||
|
} else if (!sessionStorage.getItem('watchlist')) {
|
||||||
|
sessionStorage.setItem('watchlist', JSON.stringify([]));
|
||||||
|
sessionStorage.setItem('watchlistId', JSON.stringify(null));
|
||||||
|
}
|
||||||
|
state.watchlist = JSON.parse(sessionStorage.getItem('watchlist'));
|
||||||
|
state.watchlistId = JSON.parse(sessionStorage.getItem('watchlistId'));
|
||||||
|
},
|
||||||
|
watchlistToggle (state, uid) {
|
||||||
|
let list = state.watchlist;
|
||||||
|
let watchlistIndex = list.indexOf(uid);
|
||||||
|
if (watchlistIndex === -1) {
|
||||||
|
list.push(uid)
|
||||||
|
} else {
|
||||||
|
list.splice(watchlistIndex, 1)
|
||||||
|
}
|
||||||
|
state.watchlist = list;
|
||||||
|
sessionStorage.setItem('watchlist', JSON.stringify(list));
|
||||||
|
if (state.watchlistId) {
|
||||||
|
axios({
|
||||||
|
url: '/api/watchlists/' + state.watchlistId,
|
||||||
|
data: state.watchlist,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
loginSuccess (state, token) {
|
loginSuccess (state, token) {
|
||||||
state.loggedIn = true;
|
state.loggedIn = true;
|
||||||
state.authToken = token;
|
state.authToken = token;
|
||||||
@@ -54,16 +85,20 @@ export default new Vuex.Store({
|
|||||||
state.teamerId = null;
|
state.teamerId = null;
|
||||||
state.authToken = null;
|
state.authToken = null;
|
||||||
sessionStorage.removeItem('token');
|
sessionStorage.removeItem('token');
|
||||||
sessionStorage.removeItem('teamerId');
|
sessionStorage.removeItem('isTeamer');
|
||||||
|
sessionStorage.removeItem('memberId');
|
||||||
},
|
},
|
||||||
alert (state, payload) {
|
alert (state, payload) {
|
||||||
state.message.text = payload.message;
|
state.message.text = payload.message;
|
||||||
state.message.class = payload.class;
|
state.message.class = payload.class;
|
||||||
},
|
},
|
||||||
isTeamer (state, teamerId) {
|
isTeamer (state) {
|
||||||
state.isTeamer = true;
|
state.isTeamer = true;
|
||||||
state.teamerId = teamerId;
|
sessionStorage.setItem('isTeamer', JSON.stringify(true));
|
||||||
sessionStorage.setItem('teamerId', teamerId);
|
},
|
||||||
|
setMember (state, memberId) {
|
||||||
|
state.memberId = memberId;
|
||||||
|
sessionStorage.setItem('memberId', memberId);
|
||||||
},
|
},
|
||||||
loadingBegin (state) {
|
loadingBegin (state) {
|
||||||
state.loading = true;
|
state.loading = true;
|
||||||
@@ -98,9 +133,13 @@ export default new Vuex.Store({
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
let teamerId = parseInt(response.data.teamer_id);
|
let memberId = parseInt(response.data.member_id);
|
||||||
if (teamerId > 0) {
|
commit('setMember', memberId);
|
||||||
commit('isTeamer', teamerId);
|
if (response.data.watchlist) {
|
||||||
|
commit('initWatchlist', response.data.watchlist);
|
||||||
|
}
|
||||||
|
if (response.data.is_teamer) {
|
||||||
|
commit('isTeamer');
|
||||||
}
|
}
|
||||||
commit('loginSuccess', response.data.token);
|
commit('loginSuccess', response.data.token);
|
||||||
commit('loadingFinish');
|
commit('loadingFinish');
|
||||||
@@ -164,6 +203,12 @@ export default new Vuex.Store({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
|
watchlistCount: state => {
|
||||||
|
return state.watchlist.length;
|
||||||
|
},
|
||||||
|
onWatchlist: (state) => (uid) => {
|
||||||
|
return state.watchlist.indexOf(uid) !== -1;
|
||||||
|
},
|
||||||
authToken: state => {
|
authToken: state => {
|
||||||
return state.authToken;
|
return state.authToken;
|
||||||
},
|
},
|
||||||
@@ -175,4 +220,3 @@ export default new Vuex.Store({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -31,8 +31,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
if (this.$session.has('filterSettings')) {
|
if (sessionStorage.getItem('filterSettings')) {
|
||||||
this.filterSettings = this.$session.get('filterSettings')
|
this.filterSettings = JSON.parse(sessionStorage.getItem('filterSettings'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-11
@@ -72,12 +72,6 @@
|
|||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watchlist: {
|
|
||||||
type: Array,
|
|
||||||
default () {
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
daytrip: {
|
daytrip: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
@@ -188,12 +182,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
if (this.$session.has('filterSettings')) {
|
if (sessionStorage.getItem('filterSettings')) {
|
||||||
this.filterSettings = this.$session.get('filterSettings')
|
this.filterSettings = JSON.parse(sessionStorage.getItem('filterSettings'));
|
||||||
}
|
}
|
||||||
if (this.$session.has('referringPage')) {
|
if (sessionStorage.getItem('referringPage')) {
|
||||||
this.referringPage = this.$session.get('referringPage');
|
this.referringPage = JSON.parse(sessionStorage.getItem('referringPage'));
|
||||||
this.$session.remove('referringPage');
|
sessionStorage.removeItem('referringPage');
|
||||||
}
|
}
|
||||||
EventBus.$on('loadDatesTable', () => {
|
EventBus.$on('loadDatesTable', () => {
|
||||||
this.loadDatesView();
|
this.loadDatesView();
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
storeReferringPage () {
|
storeReferringPage () {
|
||||||
if (this.referringPage.url && this.referringPage.label) {
|
if (this.referringPage.url && this.referringPage.label) {
|
||||||
this.$session.set('referringPage', this.referringPage)
|
sessionStorage.setItem('referringPage', JSON.stringify(this.referringPage))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,12 +71,6 @@
|
|||||||
default () {
|
default () {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
},
|
|
||||||
watchlist: {
|
|
||||||
type: Array,
|
|
||||||
default () {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -211,14 +205,14 @@
|
|||||||
},
|
},
|
||||||
updateFilterSettings (settings) {
|
updateFilterSettings (settings) {
|
||||||
this.filterSettings = { ...this.filterSettings, ...settings };
|
this.filterSettings = { ...this.filterSettings, ...settings };
|
||||||
this.$session.set('filterSettings', this.filterSettings);
|
sessionStorage.setItem('filterSettings', JSON.stringify(this.filterSettings));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
if (!$.isEmptyObject(this.initialFilterSettings)) {
|
if (!$.isEmptyObject(this.initialFilterSettings)) {
|
||||||
this.updateFilterSettings(this.initialFilterSettings)
|
this.updateFilterSettings(this.initialFilterSettings)
|
||||||
} else if (this.$session.has('filterSettings')) {
|
} else if (sessionStorage.getItem('filterSettings')) {
|
||||||
this.updateFilterSettings(this.$session.get('filterSettings'))
|
this.updateFilterSettings(JSON.parse(sessionStorage.getItem('filterSettings')))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|||||||
+1
-7
@@ -62,7 +62,7 @@
|
|||||||
</referrer-link>
|
</referrer-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<watchlist-toggle :uid="item.key" :watchlist="watchlist" class="teaserbox-watchlist"></watchlist-toggle>
|
<watchlist-toggle :uid="item.key" class="teaserbox-watchlist"></watchlist-toggle>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -86,12 +86,6 @@
|
|||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
watchlist: {
|
|
||||||
type: Array,
|
|
||||||
default () {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
referringPage: {
|
referringPage: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default () {
|
default () {
|
||||||
|
|||||||
@@ -8,8 +8,7 @@
|
|||||||
:key="item.key"
|
:key="item.key"
|
||||||
:item="item"
|
:item="item"
|
||||||
:section="section"
|
:section="section"
|
||||||
:referring-page="referringPage"
|
:referring-page="referringPage"></search-result-item>
|
||||||
:watchlist="watchlist"></search-result-item>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="alert alert-info" v-if="total === 0">
|
<div class="alert alert-info" v-if="total === 0">
|
||||||
@@ -40,12 +39,6 @@
|
|||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
watchlist: {
|
|
||||||
type: Array,
|
|
||||||
default () {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
referringPageUrl: {
|
referringPageUrl: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
@@ -53,6 +46,7 @@
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
watchlist: [],
|
||||||
teasers: {},
|
teasers: {},
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -94,6 +88,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
this.watchlist = this.$store.state.watchlist;
|
||||||
Vue.nextTick(() => {
|
Vue.nextTick(() => {
|
||||||
this.loadList();
|
this.loadList();
|
||||||
})
|
})
|
||||||
|
|||||||
+3
-6
@@ -17,10 +17,6 @@
|
|||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
watchlist: {
|
|
||||||
type: Array,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
layout: {
|
layout: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'toggle'
|
default: 'toggle'
|
||||||
@@ -28,12 +24,13 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleWatchlist () {
|
toggleWatchlist () {
|
||||||
EventBus.$emit('watchlistToggle', this.uid);
|
this.$store.commit('watchlistToggle', this.uid);
|
||||||
|
EventBus.$emit('watchlistToggle');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
onWatchlist () {
|
onWatchlist () {
|
||||||
return this.watchlist.indexOf(this.uid) !== -1;
|
return this.$store.getters.onWatchlist(this.uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
import store from './_store';
|
import store from './../_store';
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import store from '../_store'
|
import store from '../../_store'
|
||||||
import router from '../_router'
|
import router from '../_router'
|
||||||
import EventBus from '../../_bus'
|
import EventBus from '../../_bus'
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return client.get('/api/teamers/' + rootState.teamerId)
|
return client.get('/api/teamers/' + rootState.memberId)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
commit('loadingFinish', null, { root: true });
|
commit('loadingFinish', null, { root: true });
|
||||||
return response.data;
|
return response.data;
|
||||||
@@ -38,7 +38,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return client.put('/api/teamers/' + rootState.teamerId, data)
|
return client.put('/api/teamers/' + rootState.memberId, data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
commit('loadingFinish', null, { root: true });
|
commit('loadingFinish', null, { root: true });
|
||||||
commit('alert', {
|
commit('alert', {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
|
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
|
||||||
<div class="ep-contactnav">
|
<div class="ep-contactnav">
|
||||||
<a href="{f:uri.typolink(parameter: settings.watchlistPageUid)}" class="bg-red watchlist"
|
<a href="{f:uri.typolink(parameter: settings.watchlistPageUid)}" class="bg-red watchlist"
|
||||||
v-show="watchlistCount > 0" v-cloak rel="nofollow">
|
v-show="$store.getters.watchlistCount > 0" v-cloak rel="nofollow">
|
||||||
<span class="fa fa-list" aria-hidden="true"></span>
|
<span class="fa fa-list" aria-hidden="true"></span>
|
||||||
<div>Merkliste ({{ watchlistCount }})</div>
|
<div>Merkliste ({{ $store.getters.watchlistCount }})</div>
|
||||||
</a>
|
</a>
|
||||||
<a href="tel:{settings.phoneNumberLink}" class="bg-red phone" title="Telefonische Beratung" rel="nofollow">
|
<a href="tel:{settings.phoneNumberLink}" class="bg-red phone" title="Telefonische Beratung" rel="nofollow">
|
||||||
<span class="fa fa-phone" aria-hidden="true"></span>
|
<span class="fa fa-phone" aria-hidden="true"></span>
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
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.busProId}</f:format.raw>, nameInternal: '<f:format.raw>{product.nameInternal}</f:format.raw>' }"
|
:fb-pixel-data="{ productUid: <f:format.raw>{product.busProId}</f:format.raw>, nameInternal: '<f:format.raw>{product.nameInternal}</f:format.raw>' }"
|
||||||
:watchlist="watchlist"
|
|
||||||
:daytrip="{product.daytrip -> v:variable.convert(type: 'int')}"
|
:daytrip="{product.daytrip -> v:variable.convert(type: 'int')}"
|
||||||
inline-template>
|
inline-template>
|
||||||
<article>
|
<article>
|
||||||
@@ -78,8 +77,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<p>
|
<p>
|
||||||
<watchlist-toggle :watchlist="watchlist" uid="{hotel.uid}:{product.uid}"
|
<watchlist-toggle uid="{hotel.uid}:{product.uid}" layout="link"></watchlist-toggle>
|
||||||
layout="link"></watchlist-toggle>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
<f:section name="Main">
|
<f:section name="Main">
|
||||||
<hotel-list
|
<hotel-list
|
||||||
:watchlist="watchlist"
|
|
||||||
referring-page-url="{f:uri.typolink(parameter: currentPageUid)}"
|
referring-page-url="{f:uri.typolink(parameter: currentPageUid)}"
|
||||||
inline-template>
|
inline-template>
|
||||||
<article>
|
<article>
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
referring-page-url="{f:uri.typolink(parameter: referringPageUid)}"
|
referring-page-url="{f:uri.typolink(parameter: referringPageUid)}"
|
||||||
argument-prefix="{ep:argumentPrefix(pluginName: 'ajax')}"
|
argument-prefix="{ep:argumentPrefix(pluginName: 'ajax')}"
|
||||||
:date-presets='{settings.datePickerPresets -> v:format.json.encode()}'
|
:date-presets='{settings.datePickerPresets -> v:format.json.encode()}'
|
||||||
:watchlist="watchlist"
|
|
||||||
inline-template>
|
inline-template>
|
||||||
<div class="searchresult-wrapper">
|
<div class="searchresult-wrapper">
|
||||||
<div class="pagehead pagehead--searchresult">
|
<div class="pagehead pagehead--searchresult">
|
||||||
@@ -303,8 +302,7 @@
|
|||||||
:key="item.key"
|
:key="item.key"
|
||||||
:item="item"
|
:item="item"
|
||||||
:section="section"
|
:section="section"
|
||||||
:referring-page="referringPage"
|
:referring-page="referringPage"></search-result-item>
|
||||||
:watchlist="watchlist"></search-result-item>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
|
|
||||||
<f:section name="Main">
|
<f:section name="Main">
|
||||||
|
|
||||||
<watchlist :watchlist="watchlist"
|
<watchlist loader-uri="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/ajax-loader-white.gif')}"
|
||||||
loader-uri="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/ajax-loader-white.gif')}"
|
|
||||||
referring-page-url="{f:uri.typolink(parameter: referringPageUid)}"
|
referring-page-url="{f:uri.typolink(parameter: referringPageUid)}"
|
||||||
watchlist-uri="{ep:uri.ajax(action: 'list', controller: 'AjaxWatchlist', pageUid: settings.defaultAjaxUid)}"></watchlist>
|
watchlist-uri="{ep:uri.ajax(action: 'list', controller: 'AjaxWatchlist', pageUid: settings.defaultAjaxUid)}"></watchlist>
|
||||||
</f:section>
|
</f:section>
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ Encore
|
|||||||
.addEntry('unichamp', './web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/unichamp.js')
|
.addEntry('unichamp', './web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/unichamp.js')
|
||||||
.addStyleEntry('rte', './web/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/rte.scss')
|
.addStyleEntry('rte', './web/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/rte.scss')
|
||||||
.createSharedEntry('vendor', [
|
.createSharedEntry('vendor', [
|
||||||
'jquery', 'vue', 'vue-session', 'vuex', 'vue-router', 'axios', 'flatpickr', 'lazysizes',
|
'jquery', 'vue', 'vuex', 'vue-router', 'axios', 'flatpickr', 'lazysizes',
|
||||||
'bootstrap-sass/assets/javascripts/bootstrap', 'slick-carousel',
|
'bootstrap-sass/assets/javascripts/bootstrap', 'slick-carousel',
|
||||||
'dayjs', 'cookieconsent', 'picturefill', '@fancyapps/fancybox', 'leaflet'
|
'dayjs', 'cookieconsent', 'picturefill', '@fancyapps/fancybox', 'leaflet'
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user