`, methods: { searchByORGUserEvent: function(payload){ window.location.href = window.location.origin + "/wikiloc/map.do?uid=" + payload.id + "&fitMapToTrails=1" } }, computed: {} }); } /** * Creates the vue login-modal */ function vueLoginModal() { var elementId = "vue-login-modal"; if (!document.getElementById(elementId)) { return; } new Vue({ el: '#' + elementId, data: { isLoginModalOpen: false, socialLoginState: INJECT.socialLoginState, recaptchaModule: INJECT.recaptchaModule, socialLoginModule: INJECT.socialLoginModule, i18n: INJECT.i18n }, template: ` `, methods: { openLoginModal: openLoginModal, closeLoginModal: closeLoginModal }, computed: {}, mounted: function () { this.$eventBus.$on("showLoginModal", () => { this.openLoginModal(); }); }, beforeDestroy: function () { this.$eventBus.$off("showLoginModal"); }, }); /** * ----------------- * ---- METHODS ---- * ----------------- * https://vuejs.org/v2/guide/instance.html#Data-and-Methods */ function openLoginModal() { this.isLoginModalOpen = true; } function closeLoginModal() { this.isLoginModalOpen = false; } } /** * Creates the vue premium modal component */ function vuePremiumModal(){ var elementId = "vue-premium-modal"; if(!document.getElementById(elementId)){ return; } new Vue({ el: '#' + elementId, data: { isPremiumModalOpen: false, selectedFeature: "GARMIN", isUserLoggedIn: INJECT.isUserLoggedIn, socialLoginState: INJECT.socialLoginState,	// login-modal recaptchaModule: INJECT.recaptchaModule,	// login-modal socialLoginModule: INJECT.socialLoginModule,	// login-modal i18n: INJECT.i18n, }, template: ` `, methods: { openPremiumModal: openPremiumModal, closePremiumModal: closePremiumModal }, computed: {}, mounted: function(){ this.$eventBus.$on("showPremiumModal", () => { this.openPremiumModal(); }); }, beforeDestroy: function(){ this.$eventBus.$off("showPremiumModal"); }, }); /** * ----------------- * ---- METHODS ---- * ----------------- * https://vuejs.org/v2/guide/instance.html#Data-and-Methods */ function openPremiumModal(){ this.isPremiumModalOpen = true; } function closePremiumModal(){ this.isPremiumModalOpen = false; } }