diff options
-rw-r--r-- | CONTRIBUTORS | 6 | ||||
-rw-r--r-- | css/styles.css | 97 | ||||
-rw-r--r-- | epg_events.cpp | 18 | ||||
-rw-r--r-- | epg_events.h | 4 | ||||
-rw-r--r-- | i18n.cpp | 176 | ||||
-rw-r--r-- | images/Makefile | 2 | ||||
-rw-r--r-- | images/bg_line_top.png | bin | 0 -> 90 bytes | |||
-rw-r--r-- | javascript/ajax.js | 50 | ||||
-rw-r--r-- | pages/Makefile | 10 | ||||
-rw-r--r-- | pages/error.ecpp | 2 | ||||
-rw-r--r-- | pages/infobox.ecpp | 72 | ||||
-rw-r--r-- | pages/pageelems.ecpp | 49 | ||||
-rw-r--r-- | pages/recordings.ecpp | 8 | ||||
-rw-r--r-- | pages/remote.ecpp | 10 | ||||
-rw-r--r-- | pages/schedule.ecpp | 3 | ||||
-rw-r--r-- | pages/searchtimers.ecpp | 3 | ||||
-rw-r--r-- | pages/timers.ecpp | 3 | ||||
-rw-r--r-- | pages/tooltip.ecpp | 2 | ||||
-rw-r--r-- | pages/whats_on.ecpp | 10 | ||||
-rw-r--r-- | tools.cpp | 4 |
20 files changed, 403 insertions, 126 deletions
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 <dh+vdr@gekrumbel.de> - for helping improve the Makefile. + - for helping improve the Makefile. + - for writing the recordings page. + - for the epg-info tooltip boxes. Michael Brueckner <vdr@gekrumbel.de> - 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 ####################### @@ -140,6 +143,70 @@ div.inhalt { } /* ####################### + # 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 <time.h> + #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<EpgEventPtr>() { 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; @@ -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 Binary files differnew file mode 100644 index 0000000..49d3975 --- /dev/null +++ b/images/bg_line_top.png 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 = "<div>ERROR: " + message + "</div>"; + } + 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 @@ <body> <div class="left_area"> <& pageelems.logo &> - <& menu > + <& menu &> </div> <div class="right_area"> <div class="inhalt"> 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 <vdr/plugin.h> +#include <vdr/config.h> +#include <vdr/recording.h> +#include <vdr/channels.h> +#include <vdr/menu.h> +#include <vdr/device.h> + +#include "exception.h" +#include "tools.h" +#include "epg_events.h" + +using namespace vdrlive; +using namespace std; + +</%pre> +<%include>page_init.eh</%include> +<{ + 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<EpgEventPtr>::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</%include> 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> -<img src="logo.png" alt="VDR Live!" class="logo"/> +<div class="page_header"> + <img src="logo.png" alt="VDR Live!" class="logo"/> + <div id="infobox"> + </div> +</div> +<div style="clear: both"></div> +</%def> + +<# ---------------------------------------------------------------------- #> + +<%def progressbar> +<%args> + string progress; +</%args> +<div class="__progress"><div class="__elapsed" style="width: <$ progress $>px"></div></div> </%def> <# ---------------------------------------------------------------------- #> @@ -60,6 +74,7 @@ using namespace vdrlive; string title; string short_descr; string long_descr; + int elapsed = -1; </%args> <div class="epg_description" id="<$ (boxId) $>"> <div class="station"> @@ -71,6 +86,9 @@ using namespace vdrlive; </div> <div> <div class="info"><$ (time) $></div> +% if (elapsed >= 0) { + <div class="progress"><div><& pageelems.progressbar progress=(elapsed) &></div></div> +% } <div class="title"><$ (title) $></div> <div class="short"><$ (short_descr) $></div> <div class="description"> @@ -80,3 +98,32 @@ using namespace vdrlive; </div> </div> </%def> + +<# ---------------------------------------------------------------------- #> + +<%def status_box> +<%args> + string type; + string currentTime; + string caption; + string title; + string duration; + int elapsed; +</%args> + <div class="statuscontent"> + <div class="st_header"> + <div class="caption"><$ caption $></div> + <div class="now"> <$ currentTime $></div> + </div> + <div class="st_content"> + <div class="name"><$ title $></div> + <div class="duration"> <$ duration $></div> + </div> + <div class="st_controls"> + <div class="buttons"> </div> +% if (elapsed >= 0) { + <div class="progress"><& pageelems.progressbar progress=(elapsed) &></div> +% } + </div> + </div> +</%def> 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; <head> <title>VDR-Live - <$ pageTitle $></title> <link rel="stylesheet" type="text/css" href="styles.css" /> - <script type="text/javascript" language="javascript" src="treeview.js"></script> <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &> <& pageelems.ajax_js &> + <script type="text/javascript" language="javascript" src="treeview.js"></script> </head> - <body> + <body onload="LiveStatusAjaxRequest('infobox.html', 'infobox')"> <& pageelems.logo &> <& menu active=("recordings") &> - <div class="inhalt"> + <div class="inhalt"> % 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; <title>VDR-Live - <$ pageTitle $></title> <link rel="stylesheet" type="text/css" href="/styles.css" /> </head> - <body onload="StreamInit(); FillIntervals();"> - <div class="left_area"> - <& pageelems.logo &> - <& menu active="remote" &> - </div> - <div class="right_area" + <body onload="StreamInit(); FillIntervals()"> + <& pageelems.logo &> + <& menu active="remote" &> <div class="inhalt"> <div class="screenshot"> <img src="screenshot.jpg" name="vdrlive" /><br /> @@ -150,7 +147,6 @@ using namespace vdrlive; </tr> </table> </div> - </div> </body> </html> <%include>page_exit.eh</%include> 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; <head> <title>VDR Live - <$ pageTitle $></title> <link rel="stylesheet" type="text/css" href="styles.css" /> + <& pageelems.ajax_js &> </head> - <body> + <body onload="LiveStatusAjaxRequest('infobox.html', 'infobox')"> <& pageelems.logo &> <& menu active=("schedule") component=("schedule.channel_selection")> <div class="inhalt"> 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; <head> <title>VDR-Live - <$ pageTitle $></title> <link rel="stylesheet" type="text/css" href="/styles.css" /> + <& pageelems.ajax_js &> </head> - <body> + <body onload="LiveStatusAjaxRequest('infobox.html', 'infobox')"> <& pageelems.logo &> <& menu active=("searchtimers") &> <div class="inhalt"> 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; <head> <title>VDR-Live - <$ pageTitle $></title> <link rel="stylesheet" type="text/css" href="/styles.css" /> + <& pageelems.ajax_js &> </head> - <body> + <body onload="LiveStatusAjaxRequest('infobox.html', 'infobox')"> <& pageelems.logo &> <& menu active=("timers") &> <div class="inhalt"> 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; </%args> - <a href="#void" onclick="domTT_close('<$ (domId + "_tip") $>')"><img src="close.png" alt=""></a> + <a href="#void" onclick="domTT_close('<$ (domId + "_tip") $>')"><img src="close.png" alt="" /></a> </%def> 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 &> </head> - <body> + <body onload="LiveStatusAjaxRequest('infobox.html', 'infobox')"> <& pageelems.logo &> <& menu active=(type) &> <div class="inhalt"> @@ -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<std::string, int>(++evntNr); EpgEventPtr epgEvent(new EpgEvent(evntId, Event, Channel->Name())); epgEvents.push_back(epgEvent); @@ -81,10 +81,12 @@ if (type == "now") { <div class="short"><$ (epgEvent->ShortDescr()) $></div> <div class="description"><$ (StringWordTruncate(epgEvent->LongDescr(), 150, truncated)) $></div> <div class="more"<& tooltip.hint text=(StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), 300, truncated)) + string("<br />") + string(tr("Click to view details."))) &><& tooltip.display domId=(epgEvent->Id()) &>><$ (string(tr("more")) + string(" ...")) $></div> +% if (epgEvent->Elapsed() >= 0) { + <div class="progress"><div><& pageelems.progressbar progress=(epgEvent->Elapsed()) &></div></div> +% } </div> </div> </div> - <{ } } @@ -99,7 +101,7 @@ if (type == "now") { for (vector<EpgEventPtr>::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()) &> <{ } }> @@ -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; |