From 423b3f2852a891c8f92bad46f349826b7e8abe5f Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Sun, 23 Nov 2008 17:49:51 +0100 Subject: Visual enhancement: Make progress bar invisible if duration is 0. Visual enhancement: fixed and changed several access path to the img/transparent.png invisible image. --- css/styles.css | 7 +++++++ pages/pageelems.ecpp | 17 ++++++++++++----- pages/recordings.ecpp | 6 +++--- pages/schedule.ecpp | 2 +- pages/searchtimers.ecpp | 2 +- pages/timerconflicts.ecpp | 10 +++++----- pages/timers.ecpp | 8 ++++---- pages/whats_on.ecpp | 10 +++------- 8 files changed, 36 insertions(+), 26 deletions(-) diff --git a/css/styles.css b/css/styles.css index 16ae529..7c36def 100644 --- a/css/styles.css +++ b/css/styles.css @@ -786,6 +786,13 @@ div.__progress { border: 1px solid #C0C1DA; } +div.__progress_invisible { + overflow: hidden; + width: 100px; + height: 10px; + border: 0px none transparent; +} + div.__progress div.__elapsed { float: left; height: 8px; diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index 8327d47..90cbaa7 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -71,10 +71,16 @@ int update_status(1); <%def progressbar> <%args> - string progress = "0"; + int progress = 0; string id; + int duration = -1; // invalid duration as default -
if (!id.empty()) { id="<$ id $>"<%cpp> } style="width: <$ progress $>px">
+<%cpp> + string cls("__progress"); + if ((duration >= 0) && ((progress < 0) || (duration == 0))) + cls +="_invisible"; + +
if (!id.empty()) { id="<$ id $>"<%cpp> } style="width: <$ progress $>px">
<# ---------------------------------------------------------------------- #> @@ -256,6 +262,7 @@ int update_status(1); int lastCurrentChanel = int(); <%cpp> + int duration = EpgEvents::Duration(startTime, endTime); int elapsed = EpgEvents::ElapsedTime(startTime, endTime); tEventID eventId = tEventID(); tChannelID channelId = tChannelID(); @@ -271,7 +278,7 @@ int update_status(1); " alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>> <%cpp> } - if (elapsed >= 0) { + if ((duration == 0) || (elapsed >= 0)) { <& pageelems.vlc_stream_channel channelId=(channelId) &> <%cpp> @@ -286,8 +293,8 @@ int update_status(1); "><& pageelems.event_timer epgid=(epgid) &> "><& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &> - "><%cpp>if (LiveFeatures().Recent() && eventId != 0) { " alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>><%cpp> } else { <%cpp> } - "><%cpp>if (LiveSetup().GetUseStreamdev() && elapsed > 0 && LiveFeatures().Loaded()) { " alt="" <& tooltip.hint text=(tr("Stream this channel into browser.")) &>><%cpp> } else { <%cpp> } + "><%cpp>if (LiveFeatures().Recent() && eventId != 0) { " alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>><%cpp> } else { <%cpp> } + "><%cpp>if ((duration == 0) || (elapsed > 0)) { <& pageelems.vlc_stream_channel channelId=(channelId) &><%cpp> } else { <%cpp> } "> <%cpp> if (eventId != 0) { diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index fbd29ab..ea18800 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -197,7 +197,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { string folderimg = "folder_closed.png";
-
<%cpp> reply.out() << StringRepeat(level, "\"\""); " alt="" />" alt="" />
+
<%cpp> reply.out() << StringRepeat(level, "\"\""); " alt="" />" alt="" />
<$ name $>
@@ -221,7 +221,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { string archived;
-
<%cpp> reply.out() << StringRepeat(level + 1, "\"\""); <%cpp> if (!archived.empty()) { " alt="on_dvd" <& tooltip.hint text=(archived) &> /><%cpp> } else { " alt="movie" /><%cpp> }
+
<%cpp> reply.out() << StringRepeat(level + 1, "\"\""); <%cpp> if (!archived.empty()) { " alt="on_dvd" <& tooltip.hint text=(archived) &> /><%cpp> } else { " alt="movie" /><%cpp> }
<$ day $>
<$ FormatDateTime(tr("%b %d %y"), startTime) $>
@@ -238,7 +238,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { } else { - + <& pageelems.imdb_info_href title=(name) &> <%cpp> } diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp index 1417eee..f8623da 100644 --- a/pages/schedule.ecpp +++ b/pages/schedule.ecpp @@ -127,7 +127,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); "><& pageelems.event_timer epgid=(epgid) &> - "><%cpp>if (LiveFeatures().Recent() ) { " alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>><%cpp> } else { <%cpp> } + "><%cpp>if (LiveFeatures().Recent() ) { " alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>><%cpp> } else { <%cpp> } "><& pageelems.imdb_info_href title=(title) &> ">
<$ start $> - <$ end $>
topaligned rightcol "> diff --git a/pages/searchtimers.ecpp b/pages/searchtimers.ecpp index 73255e4..fc2eaf8 100644 --- a/pages/searchtimers.ecpp +++ b/pages/searchtimers.ecpp @@ -51,7 +51,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); - +
<$ tr("Expression") $>
<$ tr("Channel") $>
<$ tr("Starts between") $>
diff --git a/pages/timerconflicts.ecpp b/pages/timerconflicts.ecpp index 4e2c15c..b9e3669 100644 --- a/pages/timerconflicts.ecpp +++ b/pages/timerconflicts.ecpp @@ -56,16 +56,16 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); - +
<$ trVDR("Channel") $>
<$ trVDR("Start") $>
<$ trVDR("Stop") $>
<$ trVDR("Priority") $>
<$ trVDR("File") $>
- - - - + + + + <%cpp> for (std::list::const_iterator timerIndex = confltimer->concurrentTimerIndices.begin(); timerIndex != confltimer->concurrentTimerIndices.end(); ++timerIndex) { diff --git a/pages/timers.ecpp b/pages/timers.ecpp index 8ed41c0..15839a1 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -110,14 +110,14 @@ static const size_t maximumDescriptionLength = 300; - +
<$ trVDR("Channel") $>
<$ trVDR("Start") $>
<$ trVDR("Stop") $>
<$ trVDR("File") $>
- - - + + + <%cpp> } diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp index ea5d222..dc348be 100644 --- a/pages/whats_on.ecpp +++ b/pages/whats_on.ecpp @@ -190,9 +190,7 @@ if (type == "now") {
<$ (timeSpan) $>
-% if (epgEvent->Elapsed() >= 0) { -
<& pageelems.progressbar progress=(epgEvent->Elapsed()) &>
-% } +
<& pageelems.progressbar progress=(epgEvent->Elapsed()) duration=(epgEvent->Duration()) &>
<$ (epgEvent->Title()) $>
<$ (epgEvent->ShortDescr()) $>
<$ truncDescription $>
@@ -215,15 +213,13 @@ if (type == "now") { ">
<$ (timeSpan) $>
-% if (epgEvent->Elapsed() >= 0) { -
<& pageelems.progressbar progress=(epgEvent->Elapsed()) &>
-% } +
<& pageelems.progressbar progress=(epgEvent->Elapsed()) duration=(epgEvent->Duration()) &>
">