From ce740b61ec601a6b91086891da653a51ca9ba035 Mon Sep 17 00:00:00 2001 From: Xenia Date: Tue, 23 Jul 2019 18:39:31 +0200 Subject: [PATCH 1/2] Suche nach Links --- public/routes/home.js | 6 +++--- public/routes/msgCard.js | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/public/routes/home.js b/public/routes/home.js index aabe37e..c8ede17 100644 --- a/public/routes/home.js +++ b/public/routes/home.js @@ -35,16 +35,16 @@ const HomeRouter = { }, changeSubscribtion: function(){ var btnString = $("#btn-text").text(); - //console.log(btnString); + console.log(btnString); if($("#btn-text").hasClass("subscribed")){ $("#btn-text").removeClass("subscribed"); - var newBtnString = "#" + $("#btn-text").text(/deabonnieren/g, '') + "abonnieren"; + var newBtnString = btnString.replace(/deabonnieren/g, '') + "abonnieren"; //console.log(btnString); $("#btn-text").text(newBtnString); }else{ $("#btn-text").addClass("subscribed"); - var newBtnString = "#" + $("#btn-text").text(/abonnieren/g, '') + "deabonnieren"; + var newBtnString = btnString.replace(/abonnieren/g, '') + "deabonnieren"; //console.log(newBtnString); $("#btn-text").text(newBtnString); diff --git a/public/routes/msgCard.js b/public/routes/msgCard.js index b093abf..a06c00c 100644 --- a/public/routes/msgCard.js +++ b/public/routes/msgCard.js @@ -68,7 +68,10 @@ Vue.component('MsgCard', { }*/ }, filterForTag: function (tag) { - console.log("link: " + tag); + var btnString = "#" + tag + " abonnieren" + $("#btn-text").text(btnString); + $("#subscribe-btn").css("visibility", "visible"); + //console.log("link: " + tag); searching(tag); }, isBookmarkActive: function (msgid) { From 9a16ed0480665816fe3cee2505fdc4ae3d201e69 Mon Sep 17 00:00:00 2001 From: Xenia Date: Tue, 23 Jul 2019 21:25:44 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Geht=20bei=20der=20Suche=20zur=C3=BCck=20zu?= =?UTF-8?q?m=20Dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/routes/home.js | 5 +---- public/routes/msgCard.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/public/routes/home.js b/public/routes/home.js index c8ede17..a489dc3 100644 --- a/public/routes/home.js +++ b/public/routes/home.js @@ -26,10 +26,7 @@ const HomeRouter = { messages(); }, goBackToDashboard: function() { - //Home neu rendern ... - //windows.history.go(); - router.push('/files') - router.push('/home') + vueForceRender(); $("#escape-search-link").css("visibility", "hidden"); $("#subscribe-btn").css("visibility", "hidden"); }, diff --git a/public/routes/msgCard.js b/public/routes/msgCard.js index a06c00c..fe24c1d 100644 --- a/public/routes/msgCard.js +++ b/public/routes/msgCard.js @@ -68,7 +68,7 @@ Vue.component('MsgCard', { }*/ }, filterForTag: function (tag) { - var btnString = "#" + tag + " abonnieren" + var btnString = "#" + tag + " abonnieren"; $("#btn-text").text(btnString); $("#subscribe-btn").css("visibility", "visible"); //console.log("link: " + tag);