From 4b8eb8291b188fc332edc6d158c476c19d2305b5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 21 May 2018 22:12:53 +0000 Subject: [PATCH] Also add official filter on branch page --- app/templates/appci_branch.html | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/app/templates/appci_branch.html b/app/templates/appci_branch.html index 640c7bb..f7a50dc 100644 --- a/app/templates/appci_branch.html +++ b/app/templates/appci_branch.html @@ -6,6 +6,9 @@
+
+ +
@@ -21,7 +24,7 @@ {% for result in app_results %} - +
{% if result.app.list.name == "official" %} @@ -106,7 +109,21 @@ window.onload = function () { }] }); chart.render(); + update_filters(); } + +function toggle(e) { + $(e).toggleClass("btn-default"); + $(e).toggleClass("btn-primary"); + update_filters(); +} +function update_filters() { + var onlyOfficials = $("#filter_onlyOfficials").hasClass("btn-primary"); + $(".resultline").show(); + if (onlyOfficials) { $(".resultline:not(.official)").hide(); } +} + + {% endblock %}