diff options
-rw-r--r-- | pages/channels_widget.ecpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pages/channels_widget.ecpp b/pages/channels_widget.ecpp index f1506bf..5bd69b2 100644 --- a/pages/channels_widget.ecpp +++ b/pages/channels_widget.ecpp @@ -11,16 +11,17 @@ name = "channel"; int lastChannel = LiveSetup().GetLastChannel(); selected; onchange; +bool channelId = false; </%args> <select name="<$ name $>" <{ reply.out() << ( !onchange.empty() ? "onchange=\""+onchange+"\"" : "" ); }>> <{ for (cChannel *listChannel = Channels.First(); listChannel && listChannel->Number() <= lastChannel; listChannel = Channels.Next(listChannel)) { if (!listChannel->GroupSep() && *listChannel->Name()) { - std::string channelId = *listChannel->GetChannelID().ToString(); + std::string listChannelId = *listChannel->GetChannelID().ToString(); }> - <option value="<$ listChannel->Number() $>" - <{ reply.out() << ( channelId == selected ? "selected=\"selected\"" : "" ); }>><$ listChannel->Name() $></option> + <option value="<? channelId ? *listChannel->GetChannelID().ToString() ?><? !channelId ? listChannel->Number() ?>" + <{ reply.out() << ( listChannelId == selected ? "selected=\"selected\"" : "" ); }>><$ listChannel->Name() $></option> <{ } } |