const HomeRouter = { template: `
zurück zu allen Einträgen

`, data: function () { return { messagelist: _messagelist, messages: _messages, isSearchActiv: _isSearchActiv, isSubscripeButtonActiv: _isSubscripeButtonActiv, isSubscriped: false, subscripeTagName: '', bookmarkArray: auth.bookmarks, vueRender: vueRender, }; }, methods: { updateHomeAboButton: function(content) { this.subscripeTagName = content; console.info( this.subscripeTagName); vueForceRender('key'); }, toggleEscapeSearchLink: function() { console.info('got called'); this.isSearchActive = !this.isSearchActive; vueForceRender('key'); console.info( this.isSearchActive); }, list_messages: function() { messages(); }, goBackToDashboard: function() { _isSearchActiv = false; this.$emit('reset-searchtext',''); // $("#escape-search-link").css("visibility", "hidden"); // $("#subscribe-btn").css("visibility", "hidden"); _isSubscripeButtonActiv = false; vueForceRender('key'); vueForceRender('search'); }, changeSubscribtion: function(){ var btnString = $("#btn-text").text(); console.log(btnString); if(this.isSubscriped){ this.subscripeTagName.replace(/deabonnieren/g, '') + "abonnieren"; //console.log(btnString); // $("#btn-text").text(newBtnString); }else{ this.subscripeTagName.replace(/abonnieren/g, '') + "deabonnieren"; //console.log(newBtnString); // $("#btn-text").text(newBtnString); } this.isSubscriped = !this.isSubscriped; vueForceRender('key'); } }, mounted: function () { this.list_messages(); //this.refresh_messages(); } }; function get_insert_message(id) { $.ajax({ url: "api/msg/id/"+id, method: "GET" }).done(function (msg) { Vue.set(_messages, id, msg); }).fail(function (e, f, g) { console.log("cannot load " + id + ".json: " + e + f + g); }) }