From 4c0d3398fc6444169ee47935b9ab814eb3929e72 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Sun, 18 Feb 2007 22:22:35 +0000 Subject: - Added status box with current channel, program and elapsed time in the logo area. - Added support for progress bars to display elapsed content. - Extendend ajax.js to be usable for non xml requests. - adapted styles for the new features. --- CONTRIBUTORS | 6 +- css/styles.css | 97 ++++++++++++++++++++++++-- epg_events.cpp | 18 +++++ epg_events.h | 4 ++ i18n.cpp | 176 +++++++++++++++++++++++++++--------------------- images/Makefile | 2 +- images/bg_line_top.png | Bin 0 -> 90 bytes javascript/ajax.js | 50 ++++++++++---- pages/Makefile | 10 +-- pages/error.ecpp | 2 +- pages/infobox.ecpp | 72 ++++++++++++++++++++ pages/pageelems.ecpp | 49 +++++++++++++- pages/recordings.ecpp | 8 +-- pages/remote.ecpp | 10 +-- pages/schedule.ecpp | 3 +- pages/searchtimers.ecpp | 3 +- pages/timers.ecpp | 3 +- pages/tooltip.ecpp | 2 +- pages/whats_on.ecpp | 10 +-- tools.cpp | 4 +- 20 files changed, 403 insertions(+), 126 deletions(-) create mode 100644 images/bg_line_top.png create mode 100644 pages/infobox.ecpp diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d874f14..6ab172c 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -4,7 +4,9 @@ Special thanks go to the following individuals (if your name is missing here, please send an email to tkeil@datacrystal.de): Dieter Hametner - for helping improve the Makefile. + - for helping improve the Makefile. + - for writing the recordings page. + - for the epg-info tooltip boxes. Michael Brueckner - for icons and images. + for icons and images and parts of the overall visual design. diff --git a/css/styles.css b/css/styles.css index 3a7968b..cd5b8c7 100644 --- a/css/styles.css +++ b/css/styles.css @@ -85,8 +85,12 @@ div.domTTepg { vertical-align: top; } +.domTTepg div.epg_content div div.progress div { + padding-left: 0px; +} + .domTTepg div.epg_content div div { - margin-left: 40px; + padding-left: 35px; } .domTTepg div.epg_content div.epg_tools img { @@ -96,7 +100,6 @@ div.domTTepg { .domTTepg div.boxheader div div a { } - /* ####################### # Menue ####################### @@ -139,6 +142,70 @@ div.inhalt { padding: 10px; } +/* ####################### + # Info Box (near logo) + ####################### +*/ +img.logo { + float: left; + margin-top: 5px; + margin-left: 5px; + margin-right: 25px; +} + +div#infobox { + float: left; + border: 1px solid #C0C1DA; + margin: 5px; + width: 300px; +} + +div#infobox div.st_header { + overflow: hidden; + padding: 4px; + background: #E9EFFF; + border-bottom: 1px solid #C0C1DA; +} + +div#infobox div.st_header div.now { + float: right; +} + +div#infobox div.st_header div.caption { + float: left; + overflow: hidden; + font-weight: bold; +} + +div#infobox div.st_content { + overflow: hidden; + padding: 4px; + background: white url('bg_line_top.png') top left repeat-x; +} + +div#infobox div.st_content div.duration { + float: right; +} + +div#infobox div.st_content div.name { + float: left; + overflow: hidden; + font-weight: bold; +} + +div#infobox div.st_controls { + overflow: hidden; + padding: 4px; +} + +div#infobox div.st_controls div.progress { + float: right; +} + +div#infobox div.st_controls div.buttons { + float: left; +} + /* ####################### # Head Box ####################### @@ -195,11 +262,11 @@ table td.buttonpanel { text-align: right; } - /* ################ # Event ################ */ + div.event { width: 255px; height: 255px; @@ -278,6 +345,16 @@ div.info { padding: 5px; } +div.progress { + overflow: hidden; + padding-right: 4px; +} + +div.progress div { + float: right; + padding: 0px; +} + div.title { font-weight: bold; margin: 5px; @@ -294,6 +371,19 @@ div.more { cursor: pointer; } +div.__progress { + overflow: hidden; + width: 100px; + height: 8px; + border: 1px solid #C0C1DA; +} + +div.__progress div.__elapsed { + float: left; + height: 8px; + background-color: #E9EFFF; +} + /* ############# # Timers ############# @@ -387,7 +477,6 @@ div.boxheader div div { line-height: 20px; } - /* ############################## # Recordings diff --git a/epg_events.cpp b/epg_events.cpp index 3940a57..2619b46 100644 --- a/epg_events.cpp +++ b/epg_events.cpp @@ -1,3 +1,5 @@ +#include + #include "tools.h" #include "epg_events.h" @@ -46,6 +48,22 @@ namespace vdrlive return FormatDateTime(format, m_end_time); } + const std::string EpgEvent::CurrentTime(const char* format) const + { + return FormatDateTime(format, time(0)); + } + + int EpgEvent::Elapsed() const + { + if (m_end_time > m_start_time) { + time_t now = time(0); + if ((m_start_time <= now) && (now <= m_end_time)) { + return 100 * (now - m_start_time) / (m_end_time - m_start_time); + } + } + return -1; + } + EpgEvents::EpgEvents() : std::vector() { diff --git a/epg_events.h b/epg_events.h index d70ad26..75bfa98 100644 --- a/epg_events.h +++ b/epg_events.h @@ -47,6 +47,10 @@ namespace vdrlive const std::string EndTime(const char* format) const; + const std::string CurrentTime(const char* format) const; + + int Elapsed() const; + private: std::string m_eventId; std::string m_caption; diff --git a/i18n.cpp b/i18n.cpp index 9895e5b..eeb7408 100644 --- a/i18n.cpp +++ b/i18n.cpp @@ -3,49 +3,71 @@ namespace vdrlive { const tI18nPhrase Phrases[] = { - { "What's running at", - "Was läuft um", - "", // Slovenski - "", // Italiono - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "", // Finnish - "", // Polski - "", // Español - "", // Greek - "", // Svenska - "", // Românã - "", // Magyar - "", // Català - "", // Russian - "", // Hrvatski - "", // Eesti - "", // Dansk - "", //Czech - }, - { "%I:%M %p", // Time formatting string - "%H:%M Uhr", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + { "What's running at", + "Was läuft um", + "", // Slovenski + "", // Italiono + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // Finnish + "", // Polski + "", // Español + "", // Greek + "", // Svenska + "", // Românã + "", // Magyar + "", // Català + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + "", // Czech + }, + { "%I:%M %p", // Time formatting string (Hour:Minute suffix) + "%H:%M Uhr", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // Finnish + "", // Polski + "", // Español + "", // Greek + "", // Svenska + "", // Românã + "", // Magyar + "", // Català + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + "", // Czech + }, + { "%I:%M:%S %p", // Time formatting string (Hour:Minute:Seconds suffix) + "%H:%M:%S Uhr", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // Finnish + "", // Polski + "", // Español + "", // Greek + "", // Svenska + "", // Românã + "", // Magyar + "", // Català + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + "", // Czech }, { "%a, %b %d", // English "%a, %d.%m.", // Deutsch @@ -67,7 +89,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "%A, %b %d %Y", // English "%A, %d.%m.%Y", // Deutsch @@ -89,7 +111,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "%b %d %y", // English "%d.%m.%y", // Deutsch @@ -111,7 +133,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Date", // English "Datum", // Deutsch @@ -133,7 +155,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Time", // English "Zeit", // Deutsch @@ -155,7 +177,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Recordings", // English "Aufnahmen", // Deutsch @@ -177,7 +199,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Remote Control", // English "Fernbedienung", // Deutsch @@ -199,7 +221,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Interval:", // English "Intervall:", // Deutsch @@ -221,7 +243,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Save", // English "Speichern", // Deutsch @@ -243,7 +265,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Menu", // English "Menü", // Deutsch @@ -265,7 +287,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Back", // English "Zurück", // Deutsch @@ -287,7 +309,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Ok", // English "Ok", // Deutsch @@ -309,7 +331,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Vol+", // English "Laut+", // Deutsch @@ -331,7 +353,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Vol-", // English "Laut-", // Deutsch @@ -353,7 +375,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Mute", // English "Stumm", // Deutsch @@ -375,7 +397,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "New timer", // English "Neuer Timer", // Deutsch @@ -397,7 +419,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Edit", // English "Ändern", // Deutsch @@ -419,7 +441,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Weekday", // English "Wochentag", // Deutsch @@ -441,7 +463,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Use VPS", // English "VPS verwenden", // Deutsch @@ -463,7 +485,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Monday", // English "Montag", // Deutsch @@ -485,7 +507,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Tuesday", // English "Dienstag", // Deutsch @@ -507,7 +529,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Wednesday", // English "Mittwoch", // Deutsch @@ -529,7 +551,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Thursday", // English "Donnerstag", // Deutsch @@ -551,7 +573,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Friday", // English "Freitag", // Deutsch @@ -573,7 +595,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Saturday", // English "Samstag", // Deutsch @@ -595,7 +617,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Sunday", // English "Sonntag", // Deutsch @@ -617,7 +639,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Yes", // English "Ja", // Deutsch @@ -639,7 +661,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "No", // English "Nein", // Deutsch @@ -661,7 +683,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Record this", // English "Diese Sendung aufnehmen", // Deutsch @@ -683,7 +705,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Click to view details.", // English "Für Details klicken.", // Deutsch @@ -705,7 +727,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "more", // English "mehr", // Deutsch @@ -727,7 +749,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "Switch to this channel.", // English "Zu diesem Kanal umschalten.", // Deutsch @@ -749,7 +771,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, { "play this recording.", // English "Diese Aufnahme abspielen.", // Deutsch @@ -771,7 +793,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, /* @@ -795,7 +817,7 @@ const tI18nPhrase Phrases[] = { "", // Hrvatski "", // Eesti "", // Dansk - "", //Czech + "", // Czech }, */ { 0 }, diff --git a/images/Makefile b/images/Makefile index 09a1029..738ecd7 100644 --- a/images/Makefile +++ b/images/Makefile @@ -20,7 +20,7 @@ OBJS = logo.o record.o active.o inactive.o button_blue.o \ bg_header_h.o bg_header_l.o bg_header_r.o \ bg_box_h.o bg_box_l.o bg_box_r.o \ movie.o menu_line_bg.o bg_line.o bg_tools.o \ - zap.o favicon.o + zap.o favicon.o bg_line_top.o ### Default rules: diff --git a/images/bg_line_top.png b/images/bg_line_top.png new file mode 100644 index 0000000..49d3975 Binary files /dev/null and b/images/bg_line_top.png differ diff --git a/javascript/ajax.js b/javascript/ajax.js index 50bec25..4db64e5 100644 --- a/javascript/ajax.js +++ b/javascript/ajax.js @@ -1,9 +1,9 @@ -function LiveAjaxCall(url) +function LiveAjaxCall(mode, url) { var xml = null; if (window.XMLHttpRequest) { xml = new XMLHttpRequest(); - if (xml.overrideMimeType) + if (("xml" == mode) && xml.overrideMimeType) xml.overrideMimeType('text/xml'); } else if (window.ActiveXObject) { try { @@ -14,16 +14,19 @@ function LiveAjaxCall(url) } catch (e) {} } } - + this.url = url; this.xml = xml; this.onerror = function(message) {}; this.oncomplete = function() {}; - this.request = function(param, value) + this.request = function(param, value) { - var url = this.url+'?'+param+"="+value; + var url = this.url; + if (param != "") { + var url = this.url+'?'+param+"="+value; + } var obj = this; this.xml.onreadystatechange = function() { obj.readystatechanged(); } this.xml.open('GET', url, true); @@ -35,27 +38,46 @@ function LiveAjaxCall(url) try { if (this.xml.readyState == 4) { if (this.xml.status == 200) { - var xmldoc = xml.responseXML; - var result = Number(xmldoc.getElementsByTagName('response').item(0).firstChild.data); - if (!result) { - var error = xmldoc.getElementsByTagName('error').item(0).firstChild.data; - this.onerror(error); - } else + if ("xml" == mode) { + var xmldoc = xml.responseXML; + var result = Number(xmldoc.getElementsByTagName('response').item(0).firstChild.data); + if (!result) { + var error = xmldoc.getElementsByTagName('error').item(0).firstChild.data; + this.onerror(error); + } else { + this.oncomplete(); + } + } else { this.oncomplete(); + } } else { this.onerror('Invocation of webservice "'+this.url+'" failed with http status code '+this.xml.status); } } } catch (e) { - this.onerror('Invocation of webservice "'+this.url+'" failed with exception: '+e.description); + this.onerror('Invocation of webservice "'+this.url+'" failed with exception: '+e.message); } }; } - + function LiveSimpleAjaxRequest(url, param, value) { - var xml = new LiveAjaxCall(url); + var xml = new LiveAjaxCall("xml", url); xml.onerror = function(message) { alert(message); } xml.request(param, value); }; +function LiveStatusAjaxRequest(url, containerid) +{ + var xml = new LiveAjaxCall("text", url); + xml.oncomplete = function() + { + document.getElementById(containerid).innerHTML = this.xml.responseText; + window.setTimeout("LiveStatusAjaxRequest('" + url + "', '" + containerid + "')", 1000); + } + xml.onerror = function(message) + { + document.getElementById(containerid).innerHTML = "
ERROR: " + message + "
"; + } + xml.request("", ""); +} diff --git a/pages/Makefile b/pages/Makefile index bebbd6f..805c556 100644 --- a/pages/Makefile +++ b/pages/Makefile @@ -15,11 +15,11 @@ VDRDIR ?= ../../../.. ### The object files (add further files here): -OBJS = menu.o channels.o recordings.o schedule.o \ - screenshot.o timers.o whats_on.o switch_channel.o \ - keypress.o remote.o channels_widget.o edit_timer.o \ - error.o pageelems.o tooltip.o play_recording.o \ - searchtimers.o +OBJS = menu.o channels.o recordings.o schedule.o \ + screenshot.o timers.o whats_on.o switch_channel.o \ + keypress.o remote.o channels_widget.o edit_timer.o \ + error.o pageelems.o tooltip.o play_recording.o \ + searchtimers.o infobox.o ### Default rules: diff --git a/pages/error.ecpp b/pages/error.ecpp index 116d3b4..e7bc8c5 100644 --- a/pages/error.ecpp +++ b/pages/error.ecpp @@ -16,7 +16,7 @@
<& pageelems.logo &> - <& menu > + <& menu &>
diff --git a/pages/infobox.ecpp b/pages/infobox.ecpp new file mode 100644 index 0000000..b338015 --- /dev/null +++ b/pages/infobox.ecpp @@ -0,0 +1,72 @@ +<%pre> +#include +#include +#include +#include +#include +#include + +#include "exception.h" +#include "tools.h" +#include "epg_events.h" + +using namespace vdrlive; +using namespace std; + + +<%include>page_init.eh +<{ + EpgEvents epgEvents; + + if (cReplayControl::NowReplaying()) { + cThreadLock RecordingsLock(&Recordings); + cRecording *Recording = Recordings.GetByName(cReplayControl::NowReplaying()); + if (Recording) { + const cRecordingInfo* info = Recording->Info(); + if (info) { + EpgEventPtr epgEvent(new EpgEvent("recording", + Recording->Name(), + info->Title() ? info->Title() : Recording->Name(), + info->ShortText() ? info->ShortText() : "", + info->Description() ? info->Description() : "", + Recording->start, + Recording->start)); + epgEvents.push_back(epgEvent); + } + } + } + else { + ReadLock channelsLock( Channels ); + if (cDevice::CurrentChannel()) { + cChannel* Channel = Channels.GetByNumber(cDevice::CurrentChannel()); + if (!Channel) + throw HtmlError("got invalid channel number!"); + cSchedulesLock schedulesLock; + const cSchedules* Schedules = cSchedules::Schedules(schedulesLock); + const cSchedule *Schedule = Schedules->GetSchedule(Channel); + if (Schedule) { + const cEvent *Event = Schedule->GetPresentEvent(); + if (Event) { + EpgEventPtr epgEvent(new EpgEvent("channel", + Event, + Channel->Name())); + epgEvents.push_back(epgEvent); + } + } + } + } + if (epgEvents.size() > 0) { + for (vector::iterator i = epgEvents.begin(); i != epgEvents.end(); ++i) { + EpgEventPtr epg = *i; +}> + <& pageelems.status_box type=(epg->Id()) caption=(epg->Caption()) currentTime=(epg->CurrentTime(tr("%I:%M:%S %p"))) duration=(epg->StartTime(tr("%I:%M %p")) + string(" - ") + epg->EndTime(tr("%I:%M %p"))) title=(epg->Title()) elapsed=(epg->Elapsed()) &> +<{ + } + } + else { +}> + No relevant information could be retrieved! +<{ + } +}> +<%include>page_exit.eh diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index 8cc94fd..92afc5a 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -17,7 +17,21 @@ using namespace vdrlive; <# ---------------------------------------------------------------------- #> <%def logo> - + +
+ + +<# ---------------------------------------------------------------------- #> + +<%def progressbar> +<%args> + string progress; + +
<# ---------------------------------------------------------------------- #> @@ -60,6 +74,7 @@ using namespace vdrlive; string title; string short_descr; string long_descr; + int elapsed = -1;
@@ -71,6 +86,9 @@ using namespace vdrlive;
<$ (time) $>
+% if (elapsed >= 0) { +
<& pageelems.progressbar progress=(elapsed) &>
+% }
<$ (title) $>
<$ (short_descr) $>
@@ -80,3 +98,32 @@ using namespace vdrlive;
+ +<# ---------------------------------------------------------------------- #> + +<%def status_box> +<%args> + string type; + string currentTime; + string caption; + string title; + string duration; + int elapsed; + +
+
+
<$ caption $>
+
 <$ currentTime $>
+
+
+
<$ title $>
+
 <$ duration $>
+
+
+
 
+% if (elapsed >= 0) { +
<& pageelems.progressbar progress=(elapsed) &>
+% } +
+
+ diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index 1901b78..755a3bc 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -27,14 +27,14 @@ EpgEvents epgEvents; VDR-Live - <$ pageTitle $> - <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &> <& pageelems.ajax_js &> + - + <& pageelems.logo &> <& menu active=("recordings") &> -
+
% if (Recordings.Count() == 0) { Keine Aufnahmen vorhanden % } else { @@ -154,7 +154,7 @@ for (iter = recordingsTree.begin(path); iter != end; ++iter) { + epg->StartTime(tr("%b %d %y")) + string(" ") + epg->StartTime(tr("%I:%M %p"))); }> - <& pageelems.epg_tt_box boxId=(epg->Id()) caption=(epg->Caption()) tools_comp=("recordings.rec_tools") time=(start) title=(epg->Title()) short_descr=(epg->ShortDescr()) long_descr=(epg->LongDescr()) &> + <& pageelems.epg_tt_box boxId=(epg->Id()) caption=(epg->Caption()) tools_comp=("recordings.rec_tools") time=(start) title=(epg->Title()) short_descr=(epg->ShortDescr()) long_descr=(epg->LongDescr()) elapsed=(epg->Elapsed()) &> <{ } }> diff --git a/pages/remote.ecpp b/pages/remote.ecpp index 4565680..16033ff 100644 --- a/pages/remote.ecpp +++ b/pages/remote.ecpp @@ -64,12 +64,9 @@ using namespace vdrlive; VDR-Live - <$ pageTitle $> - -
- <& pageelems.logo &> - <& menu active="remote" &> -
-
+ <& pageelems.logo &> + <& menu active="remote" &>

@@ -150,7 +147,6 @@ using namespace vdrlive;
-
<%include>page_exit.eh diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp index f524c7f..5e04264 100644 --- a/pages/schedule.ecpp +++ b/pages/schedule.ecpp @@ -46,8 +46,9 @@ using namespace vdrlive; VDR Live - <$ pageTitle $> + <& pageelems.ajax_js &> - + <& pageelems.logo &> <& menu active=("schedule") component=("schedule.channel_selection")>
diff --git a/pages/searchtimers.ecpp b/pages/searchtimers.ecpp index cf3ee1a..1915cd2 100644 --- a/pages/searchtimers.ecpp +++ b/pages/searchtimers.ecpp @@ -18,8 +18,9 @@ using namespace vdrlive; VDR-Live - <$ pageTitle $> + <& pageelems.ajax_js &> - + <& pageelems.logo &> <& menu active=("searchtimers") &>
diff --git a/pages/timers.ecpp b/pages/timers.ecpp index 84d8371..d24a2d5 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -18,8 +18,9 @@ using namespace vdrlive; VDR-Live - <$ pageTitle $> + <& pageelems.ajax_js &> - + <& pageelems.logo &> <& menu active=("timers") &>
diff --git a/pages/tooltip.ecpp b/pages/tooltip.ecpp index acdf567..32ce737 100644 --- a/pages/tooltip.ecpp +++ b/pages/tooltip.ecpp @@ -44,5 +44,5 @@ domId; <%args> domId; - ')"> + ')"> diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp index 78a6347..555b6ed 100644 --- a/pages/whats_on.ecpp +++ b/pages/whats_on.ecpp @@ -38,7 +38,7 @@ if (type == "now") { <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &> <& pageelems.ajax_js &> - + <& pageelems.logo &> <& menu active=(type) &>
@@ -54,7 +54,7 @@ if (type == "now") { if (Schedule) { const cEvent *Event = (type == "now" ? Schedule->GetPresentEvent() : Schedule->GetFollowingEvent()); if (Event) { - std::string evntId("eventId_"); + string evntId("eventId_"); evntId += lexical_cast(++evntNr); EpgEventPtr epgEvent(new EpgEvent(evntId, Event, Channel->Name())); epgEvents.push_back(epgEvent); @@ -81,10 +81,12 @@ if (type == "now") {
<$ (epgEvent->ShortDescr()) $>
<$ (StringWordTruncate(epgEvent->LongDescr(), 150, truncated)) $>
LongDescr(), 300, truncated)) + string("
") + string(tr("Click to view details."))) &><& tooltip.display domId=(epgEvent->Id()) &>><$ (string(tr("more")) + string(" ...")) $>
+% if (epgEvent->Elapsed() >= 0) { +
<& pageelems.progressbar progress=(epgEvent->Elapsed()) &>
+% }
- <{ } } @@ -99,7 +101,7 @@ if (type == "now") { for (vector::iterator i = epgEvents.begin(); i != epgEvents.end(); ++i) { EpgEventPtr epg = *i; }> - <& pageelems.epg_tt_box boxId=(epg->Id()) caption=(epg->Caption()) time=(epg->StartTime(tr("%I:%M %p")) + string(" - ") + epg->EndTime(tr("%I:%M %p"))) title=(epg->Title()) short_descr=(epg->ShortDescr()) long_descr=(epg->LongDescr()) &> + <& pageelems.epg_tt_box boxId=(epg->Id()) caption=(epg->Caption()) time=(epg->StartTime(tr("%I:%M %p")) + string(" - ") + epg->EndTime(tr("%I:%M %p"))) title=(epg->Title()) short_descr=(epg->ShortDescr()) long_descr=(epg->LongDescr()) elapsed=(epg->Elapsed()) &> <{ } }> diff --git a/tools.cpp b/tools.cpp index 1cdd447..677ce02 100644 --- a/tools.cpp +++ b/tools.cpp @@ -10,7 +10,7 @@ using namespace std; using namespace tnt; - + istream& operator>>( istream& is, tChannelID& ret ) { if ( is.rdbuf()->in_avail() > 0 ) { @@ -31,7 +31,7 @@ string FormatDateTime( char const* format, time_t time ) builder << "cannot represent timestamp " << time << " as local time"; throw runtime_error( builder.str() ); } - + char result[ 256 ]; if ( strftime( result, sizeof( result ), format, &tm_r ) == 0 ) { ostringstream builder; -- cgit v1.2.3