From 10968a546d2a1a723c364884d4e70725f6d858ca Mon Sep 17 00:00:00 2001 From: wes Date: Tue, 5 Sep 2017 18:06:31 -0400 Subject: [PATCH] fix links --- src/scripts/app.tag | 22 ++++++++++++++++++---- src/scripts/categorymodal.tag | 3 ++- src/scripts/githubsocial.tag | 21 +++++++++++++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 src/scripts/githubsocial.tag diff --git a/src/scripts/app.tag b/src/scripts/app.tag index 0e68753..2758225 100644 --- a/src/scripts/app.tag +++ b/src/scripts/app.tag @@ -11,7 +11,22 @@ >
-
+
+
{ self.one("updated", () => { document.addEventListener("click", function(event) { - console.log("detected click"); - event.preventDefault(); if (!event.target.closest('#categorymodal')) { - window.RiotControl.trigger("closecategories"); + window.RiotControl.trigger("closecategories", event); } }); }); diff --git a/src/scripts/categorymodal.tag b/src/scripts/categorymodal.tag index cd9b011..7eee93d 100644 --- a/src/scripts/categorymodal.tag +++ b/src/scripts/categorymodal.tag @@ -62,7 +62,7 @@ self.toggle = (ev) => { } self.on("mount", () => { - RiotControl.on("closecategories", () => { + RiotControl.on("closecategories", (ev) => { if (self.active && self.opened) { self.update({ "active" : false, @@ -70,6 +70,7 @@ self.on("mount", () => { }); } else if (self.active && !self.opened) { + ev.preventDefault(); self.update({"opened" : true}); } }); diff --git a/src/scripts/githubsocial.tag b/src/scripts/githubsocial.tag new file mode 100644 index 0000000..3ebbff3 --- /dev/null +++ b/src/scripts/githubsocial.tag @@ -0,0 +1,21 @@ + +
+ +
+