diff --git a/app/templates/appci_compare.html b/app/templates/appci_compare.html index 1ec4b32..9e33157 100644 --- a/app/templates/appci_compare.html +++ b/app/templates/appci_compare.html @@ -6,6 +6,10 @@
+
+ + +
@@ -18,7 +22,7 @@ {% for result in results %} - +
{% if result.app.list.name == "official" %} @@ -75,7 +79,22 @@ window.onload = function () { }] }); chart.render(); + update_filters(); } + +function toggle(e) { + $(e).toggleClass("btn-default"); + $(e).toggleClass("btn-primary"); + update_filters(); +} +function update_filters() { + var onlyDiffs = $("#filter_onlyDiffs").hasClass("btn-primary"); + var onlyOfficials = $("#filter_onlyOfficials").hasClass("btn-primary"); + $(".ci-branch-comparison").show(); + if (onlyDiffs) { $(".ci-branch-comparison[value='same']").hide(); } + if (onlyOfficials) { $(".ci-branch-comparison:not(.official)").hide(); } +} +