From 7b51144a9afb3a499d78dd3e7f5ddfd00ecaee40 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Wed, 30 May 2007 09:01:53 +0000 Subject: - code review - replacing javascript parts with tntnet --- pages/searchresults.ecpp | 4 +--- pages/whats_on.ecpp | 44 +++++++++++++++++--------------------------- 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/pages/searchresults.ecpp b/pages/searchresults.ecpp index 99bebf6..4a183ef 100644 --- a/pages/searchresults.ecpp +++ b/pages/searchresults.ecpp @@ -33,11 +33,9 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); results.GetByQuery(SearchResults::PopQuery(searchtimerquery)); if (!searchplain.empty()) { - string query = searchplain; - StringReplace(query, "&", "&"); SearchTimer s; s.SetId(0); - s.SetSearch(query); + s.SetSearch(searchplain); s.SetSearchMode(0); s.SetUseTitle(true); s.SetUseSubtitle(false); diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp index cccfbb6..7b73d5c 100644 --- a/pages/whats_on.ecpp +++ b/pages/whats_on.ecpp @@ -21,6 +21,13 @@ string fixtime; <%session scope="global"> bool logged_in(false); +<%request scope="page"> +string current_type; +string current_attime; +string current_fixtime; +string current_displaytime; + + <%include>page_init.eh <{ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); @@ -33,6 +40,10 @@ string head; time_t seektime = 0; string displaytime; +current_type = type; +current_attime = attime; +current_fixtime = fixtime; + if (type == "now") { head = tr("What's running at")+string(" ")+FormatDateTime(tr("%I:%M %p"), time(0)); } else if (type == "next") { @@ -42,6 +53,7 @@ if (type == "now") { displaytime = ExpandTimeString(attime); else if (fixtime != "") displaytime = ExpandTimeString(fixtime); + current_displaytime = displaytime; seektime = GetTimeT(displaytime); if (seektime - time(0) + 3600 < 0) // if wanted time is past more then 1h, then use tomorrow @@ -58,28 +70,6 @@ if (type == "now") { <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &> <& pageelems.ajax_js &> - + <& pageelems.logo &> <& menu active=("whats_on") component=("whats_on.whats_on_actions")>
@@ -176,9 +166,9 @@ if (type == "now") { <%include>page_exit.eh <%def whats_on_actions> -<$ tr("Now") $> +" href="whats_on.html?type=now" id="nowhref"><$ tr("Now") $> | -<$ tr("Next") $> +" href="whats_on.html?type=next" id="nexthref"><$ tr("Next") $> | <$ tr("What's on") $> | <$ tr("at") $> - +" onchange="showspectime(this)"/> -- cgit v1.2.3