summaryrefslogtreecommitdiff
path: root/pages/edit_timer.ecpp
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-03-23 01:01:32 +0100
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-03-23 01:01:32 +0100
commit78ffd15e485fe3ba341bf7d5e7479ff9a5a6de4b (patch)
tree76f900ca7235290c88a2fce69b451714de734bbf /pages/edit_timer.ecpp
parent0f276e51c7dbf0e36baf35823f8b17163d094b39 (diff)
downloadvdr-plugin-live-78ffd15e485fe3ba341bf7d5e7479ff9a5a6de4b.tar.gz
vdr-plugin-live-78ffd15e485fe3ba341bf7d5e7479ff9a5a6de4b.tar.bz2
Some clean up in the timer editing call.
Prepeared timer edititing to be a popup like the epg-data. This is not finished yet and seems to have some problems with the form and the popup. So the overall functionality is disabled. Never the less some of the changes for this are of general interrest, so current work was commited. Changes in the styles for this.
Diffstat (limited to 'pages/edit_timer.ecpp')
-rw-r--r--pages/edit_timer.ecpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/pages/edit_timer.ecpp b/pages/edit_timer.ecpp
index 7b92551..f1c6ca2 100644
--- a/pages/edit_timer.ecpp
+++ b/pages/edit_timer.ecpp
@@ -20,6 +20,7 @@ using namespace vdrlive;
// input parameters
string timerid;
string epgid;
+ string async;
// form parameters
tChannelID channel;
bool active = true;
@@ -53,6 +54,8 @@ cTimer* timer;
<%cpp>
if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+ bool ajaxReq = !async.empty() && (lexical_cast<int>(async) != 0);
+
tChannelID channelid = tChannelID();
tEventID eventid = tEventID();
@@ -62,7 +65,9 @@ cTimer* timer;
timer = 0;
if ( !timerid.empty() ) {
- timer = timers.GetByTimerId( timerid );
+ string tId = SortedTimers::DecodeDomId(timerid);
+ dsyslog("DEBUG: TIMER: tId = %s", tId.c_str());
+ timer = timers.GetByTimerId(tId);
if ( timer == 0 )
throw HtmlError( tr("Couldn't find timer. Maybe you mistyped your request?") );
}
@@ -134,19 +139,31 @@ cTimer* timer;
<html>
<head>
<title>VDR Live - <$ timer ? tr("Edit timer") : tr("New timer") $></title>
+<%cpp>
+ if (!ajaxReq) {
+</%cpp>
<& pageelems.stylesheets &>
<& pageelems.ajax_js &>
+<%cpp>
+ }
+</%cpp>
</head>
<body>
+<%cpp>
+ if (!ajaxReq) {
+</%cpp>
<& pageelems.logo &>
<& menu active=("timers") &>
+<%cpp>
+ }
+</%cpp>
<div class="inhalt">
- <form method="post" name="edit_timer" action="edit_timer.ecpp">
+ <form method="post" name="edit_timer" id="<$ timerid $>" action="edit_timer.ecpp">
<input type="hidden" name="timerid" value="<$ timerid $>"/>
<input type="hidden" name="aux" value="<$ aux $>"/>
<table class="formular" cellpadding="0" cellspacing="0">
<tr class="head">
- <td class="toprow leftcol rightcol" colspan="2"><div class="boxheader"><div><div><$ timer ? tr("Edit timer") : tr("New timer") $></div></div></div></td>
+ <td class="toprow leftcol rightcol" colspan="2"><div class="boxheader"><div><div class="caption"><$ timer ? tr("Edit timer") : tr("New timer") $></div></div></div></td>
</tr>
<tr>