From f9da987ba37efb231d47880dd0bb90576bb85601 Mon Sep 17 00:00:00 2001 From: John Cleaver Date: Wed, 13 Apr 2016 23:49:05 -0400 Subject: [PATCH 1/4] Added an "All" Season. --- bundles.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bundles.json b/bundles.json index 4d19792..589cacf 100644 --- a/bundles.json +++ b/bundles.json @@ -1230,6 +1230,10 @@ } ], "seasons": [ + { + "id": "allseasons", + "name": "All Seasons" + }, { "id": "spring", "name": "Spring" From d6b46b5a381190be6d5901a17eaca6d3e046ad25 Mon Sep 17 00:00:00 2001 From: John Cleaver Date: Wed, 13 Apr 2016 23:49:23 -0400 Subject: [PATCH 2/4] Added a special filter for seasons. --- main.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main.js b/main.js index 3e6a8a3..28f43d2 100644 --- a/main.js +++ b/main.js @@ -176,3 +176,17 @@ Vue.filter('filterByArray', function(array1, array2){ } }); }); + +Vue.filter('seasonFilter', function(items, season_id){ + return items.filter(function(element){ + if(season_id == "allseasons" && element.seasons.length > 3){ + return true; + } + else if(element.seasons.length < 4 && element.seasons.indexOf(season_id) > -1){ + return true; + } + else{ + return false; + } + }); +}); From c0d4317a30afef2ad993caef82f6d606143b1957 Mon Sep 17 00:00:00 2001 From: John Cleaver Date: Wed, 13 Apr 2016 23:49:42 -0400 Subject: [PATCH 3/4] Updated to the new season filter. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 08b110e..6c870cc 100644 --- a/index.html +++ b/index.html @@ -353,7 +353,7 @@

{{ getSeasonName(active_season) }}

-