From a3aec3b4e041da40e293cb696453df9c24696a21 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 27 May 2015 00:17:32 +0200 Subject: [PATCH] Hide subpages when switching page --- couchpotato/static/scripts/page.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/couchpotato/static/scripts/page.js b/couchpotato/static/scripts/page.js index 7cc50eb..0bde619 100644 --- a/couchpotato/static/scripts/page.js +++ b/couchpotato/static/scripts/page.js @@ -134,7 +134,15 @@ var PageBase = new Class({ }, hide: function(){ - this.el.removeClass('active'); + var self = this; + + self.el.removeClass('active'); + + if(self.sub_pages){ + self.sub_pages.each(function(sub_page){ + sub_page['class'].hide(); + }); + } }, toElement: function(){