summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2008-08-03 07:55:57 +0000
committerAndreas Brachold <vdr07@deltab.de>2008-08-03 07:55:57 +0000
commit55d618c0bfc2abb2deea764a4617cb0e4e84dfa0 (patch)
tree013280b77ad77dd2ad84e6376d9f7979b9dd2601
parent6033fafd7efae9185362fb0e22e1fe429a951405 (diff)
downloadxxv-55d618c0bfc2abb2deea764a4617cb0e4e84dfa0.tar.gz
xxv-55d618c0bfc2abb2deea764a4617cb0e4e84dfa0.tar.bz2
* xstyle: Fix menu was'nt showed if channels empty
-rw-r--r--skins/xstyle/mainmenu.inc21
1 files changed, 15 insertions, 6 deletions
diff --git a/skins/xstyle/mainmenu.inc b/skins/xstyle/mainmenu.inc
index c0d737c..f0e4fb1 100644
--- a/skins/xstyle/mainmenu.inc
+++ b/skins/xstyle/mainmenu.inc
@@ -14,18 +14,23 @@ var myBar = new WebFXMenuBar;
<?% IF allow('now') %?>
var runnow = new WebFXMenu;
+ <?% groupnames = getModule('CHANNELS').ChannelGroupsArray('Name') %?>
+ <?% IF groupnames.size %?>
var runnowGrp = new WebFXMenu;
- <?% FOREACH group = getModule('CHANNELS').ChannelGroupsArray('Name') %?>
+ <?% FOREACH group = groupnames%?>
runnowGrp.add(new WebFXMenuItem('<?% group.first %?>', "?cmd=now&data=&__cgrp=<?% group.last %?>"));
<?% END %?>
runnow.add(new WebFXMenuItem("<?% gettext("Running now",cuttext ) %?>",null,null,runnowGrp));
+ <?% END %?>
+ <?% IF groupnames.size %?>
var runnextGrp = new WebFXMenu;
- <?% FOREACH group = getModule('CHANNELS').ChannelGroupsArray('Name') %?>
+ <?% FOREACH group = groupnames %?>
runnextGrp.add(new WebFXMenuItem('<?% group.first %?>', "?cmd=next&data=&__cgrp=<?% group.last %?>"));
<?% END %?>
runnow.add(new WebFXMenuItem("<?% gettext("Next",cuttext ) %?>",null,null,runnextGrp));
runnow.add(new WebFXMenuSeparator());
+ <?% END %?>
<?% USE date %?>
<?% periods = getModule('EPG').periods %?>
@@ -61,21 +66,25 @@ var myBar = new WebFXMenuBar;
program.add(new WebFXMenuItem("<?% gettext("Schema") %?>", "?cmd=schema"));
<?% IF allow('topten') %?>program.add(new WebFXMenuItem("<?% gettext("Top ten entry") %?>", "?cmd=t10"));<?% END %?>
program.add(new WebFXMenuItem("<?% gettext("Search") %?>", "?cmd=search"));
+
+ <?% groups = getModule('CHANNELS').ChannelWithGroup('c.name,c.hash') %?>
+ <?% IF groups.size %?>
program.add(new WebFXMenuSeparator());
- <?% FOREACH ch = getModule('CHANNELS').ChannelWithGroup('c.name,c.hash') %?>
- <?% LAST IF global.cfgMaxChannelMenuEntrys && loop.count > global.cfgMaxChannelMenuEntrys %?>
+ <?% FOREACH ch=groups %?>
<?% IF ch.2 != lastgroup %?>
+ <?% LAST IF global.cfgMaxChannelMenuEntrys && loop.count > global.cfgMaxChannelMenuEntrys %?>
<?% IF lastgroup %?>
- program.add(new WebFXMenuItem('<?% chop(lastgroup,cuttext) %?>',null,null,programGrp<?% z %?>));
+ program.add(new WebFXMenuItem('<?% chop(lastgroup,cuttext) %?>',null,null,programGrp<?% z %?>));
<?% END %?>
<?% lastgroup = ch.2 %?>
<?% z = z + 1 %?>
- var programGrp<?% z %?> = new WebFXMenu;
+ var programGrp<?% z %?> = new WebFXMenu;
<?% END %?>
programGrp<?% z %?>.add(new WebFXMenuItem('<?% escape(chop(ch.0,cuttext)) %?>', '?cmd=program&data=<?% ch.1 %?>'));
<?% END %?>
program.add(new WebFXMenuItem('<?% chop(lastgroup,cuttext) %?>',null,null,programGrp<?% z %?>));
+ <?% END %?>
<?% IF allow('erestart') %?>
program.add(new WebFXMenuSeparator());