summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-02-24 19:37:21 +0100
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-02-24 19:37:21 +0100
commit41298f1f32e40644b2837c96c45b02e9ad27f95f (patch)
tree19d0ba2874a237e27344a0b56c2e881d0f65f5f6 /pages
parent503a94cd38b65b686fe898aba960b55ab47ddbf5 (diff)
downloadvdr-plugin-live-41298f1f32e40644b2837c96c45b02e9ad27f95f.tar.gz
vdr-plugin-live-41298f1f32e40644b2837c96c45b02e9ad27f95f.tar.bz2
Added functionality to display timer conflicts when polled through the
statusbox updates. Created the layout and look of the status message.
Diffstat (limited to 'pages')
-rw-r--r--pages/ibox.ecpp19
-rw-r--r--pages/menu.ecpp17
-rw-r--r--pages/xmlresponse.ecpp12
3 files changed, 44 insertions, 4 deletions
diff --git a/pages/ibox.ecpp b/pages/ibox.ecpp
index 147dcfa..eeada61 100644
--- a/pages/ibox.ecpp
+++ b/pages/ibox.ecpp
@@ -11,6 +11,7 @@
#include "tools.h"
#include "epg_events.h"
#include "recman.h"
+#include "timerconflict.h"
using namespace vdrlive;
using namespace std;
@@ -22,6 +23,7 @@ using namespace std;
<%session scope="global">
bool logged_in(false);
int update_status(1);
+TimerConflictNotifier timerNotifier();
</%session>
<%cpp>
if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
@@ -33,6 +35,15 @@ int update_status(1);
if (update_status != update) {
update_status = update;
}
+
+ string infoMsg;
+ string infoUrl;
+
+ if (timerNotifier.ShouldNotify()) {
+ infoMsg = timerNotifier.Message();
+ infoUrl = "timerconflicts.html";
+ }
+
#if VDRVERSNUM >= 10403
const char* NowReplaying = cReplayControl::NowReplaying();
#else
@@ -110,22 +121,22 @@ int update_status(1);
if (prev_chan.Valid() && next_chan.Valid())
{
</%cpp>
-<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) prev_chan=(prev_chan) next_chan=(next_chan) &>
+ <& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) prev_chan=(prev_chan) next_chan=(next_chan) infoMsg=(infoMsg) infoUrl=(infoUrl) &>
<%cpp>
}
else if (prev_chan.Valid()) {
</%cpp>
-<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) prev_chan=(prev_chan) &>
+<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) prev_chan=(prev_chan) infoMsg=(infoMsg) infoUrl=(infoUrl) &>
<%cpp>
}
else if (next_chan.Valid()) {
</%cpp>
-<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) next_chan=(next_chan) &>
+<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) next_chan=(next_chan) infoMsg=(infoMsg) infoUrl=(infoUrl) &>
<%cpp>
}
else {
</%cpp>
-<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) &>
+<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) infoMsg=(infoMsg) infoUrl=(infoUrl) &>
<%cpp>
}
}
diff --git a/pages/menu.ecpp b/pages/menu.ecpp
index bb7f47a..a998169 100644
--- a/pages/menu.ecpp
+++ b/pages/menu.ecpp
@@ -60,6 +60,23 @@ if (LiveSetup().UseAuth()) {
</%cpp>
| <a <& tooltip.display domId=("aboutBox") &>>?</a>
</div>
+<div id="messagebar" class="<? !timerNotifier.ShouldNotify() ? "notpresent" ?>">
+ <div> <!-- outer -->
+ <div><!-- inner -->
+ <$ tr("Your attention is required") $>:
+ <span id="mbmessage"><$ timerNotifier.Message() $></span>
+ <a id="mbreact" href="<$ timerNotifier.Url() $>"><$ tr("React") $></a>
+<%cpp>
+if (LiveSetup().GetUseAjax()) {
+</%cpp>
+ <span id="mbdelimiter" class="<? timerNotifier.Url().empty() ? "notpresent" ?>">|</span>
+ <span id="mbdismiss"><a href="" onclick="$('messagebar').addClass('notpresent'); return false"><$ tr("Dismiss") $></a></span>
+<%cpp>
+}
+</%cpp>
+ </div>
+ </div>
+</div>
<%cpp>
if (!component.empty()) {
</%cpp>
diff --git a/pages/xmlresponse.ecpp b/pages/xmlresponse.ecpp
index 4bca87f..bf0a6c1 100644
--- a/pages/xmlresponse.ecpp
+++ b/pages/xmlresponse.ecpp
@@ -42,6 +42,8 @@ string const XMLHEADER = "<?xml version=\"1.0\" encoding=\"" + LiveI18n().Charac
int elapsed;
string prev_chan;
string next_chan;
+ string infoMsg;
+ string infoUrl;
</%args>
<$$ XMLHEADER $>
<service>
@@ -63,5 +65,15 @@ string const XMLHEADER = "<?xml version=\"1.0\" encoding=\"" + LiveI18n().Charac
<prevchan><$ prev_chan $></prevchan>
</epginfo>
</values>
+<%cpp>
+if (!infoMsg.empty()) {
+</%cpp>
+ <info>
+ <message><$ infoMsg $></message>
+ <url><$ infoUrl $></url>
+ </info>
+<%cpp>
+}
+</%cpp>
</service>
</%def>