yweb: rework classifying slidertable in channellist for a smoother view

Origin commit data
------------------
Commit: 63173fd5e2
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-06-28 (Fri, 28 Jun 2013)

Origin message was:
------------------
- yweb: rework classifying slidertable in channellist for a smoother view
This commit is contained in:
vanhofen
2013-06-28 00:52:59 +02:00
parent 9ec912e1a7
commit 6de6fcef79
3 changed files with 34 additions and 18 deletions

View File

@@ -345,7 +345,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
int i = 1;
char classname;
t_channel_id current_channel = CZapit::getInstance()->GetCurrentChannelID();
int prozent;
int prozent = 100;
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
std::string timestr;
bool have_logos = false;
@@ -373,20 +373,31 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
/* timer slider */
if(event && event->duration > 0)
{
prozent = 100 * (time(NULL) - event->startTime) / event->duration;
else
prozent = 100;
yresult += string_printf("<td class=\"%c\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"3\"><tr><td>\n"
"\t<table border=\"0\" rules=\"none\" class=\"cslider_table\" width=\"32\">"
"\t<table border=\"0\" rules=\"none\" class=\"cslider cslider_table\">"
"<tr>"
"<td class=\"cslider_used\" width=\"%d\"></td>"
"<td class=\"cslider_free\" width=\"%d\"></td>"
"<td class=\"cslider cslider_used\" width=\"%d\"></td>"
"<td class=\"cslider cslider_free\" width=\"%d\"></td>"
"</tr>"
"</table>\n</td>\n"
, classname
, (prozent / 10) * 3
, (10 - (prozent / 10))*3
);
}
else
{
yresult += string_printf("<td class=\"%c\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"3\"><tr><td>\n"
"\t<table border=\"0\" rules=\"none\" class=\"cslider cslider_table\">"
"<tr>"
"<td class=\"cslider cslider_noepg\"></td>"
"</tr>"
"</table>\n</td>\n"
, classname
);
}
/* channel name and buttons */
yresult += string_printf("<td>\n%s<a class=\"clist\" href=\"javascript:do_zap('"

View File

@@ -771,9 +771,12 @@ a:hover.clistsmall
font-size:10pt;
padding-left: 10px;
}
.cslider_table
.cslider
{
height: 10px;
}
.cslider_table
{
border: 1px solid #6cafea;
width: 30px;
border-spacing: 0px;
@@ -783,12 +786,14 @@ a:hover.clistsmall
.cslider_used
{
background-color: #A1CCF2;
height: 10px;
}
.cslider_free
{
background-color: #EAEBFF;
height: 10px;
}
.cslider_noepg
{
background-color: #FAFAFF;
}
/*EPG*/
.epg

View File

@@ -1,4 +1,4 @@
version=2.8.0.34
date=24.06.2013
version=2.8.0.36
date=28.06.2013
type=Release
info=Port CST