summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2007-04-27 15:13:52 +0000
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2007-04-27 15:13:52 +0000
commitfd00729e88003b51c9d9957b0e8b117a0494aeeb (patch)
treefcb8f14ffb5d71f35043d6482eb726ee69f8027e
parent4eaf2d9d55cf668d1cbc7676e5bd44bb6eb69d3b (diff)
downloadvdr-plugin-live-fd00729e88003b51c9d9957b0e8b117a0494aeeb.tar.gz
vdr-plugin-live-fd00729e88003b51c9d9957b0e8b117a0494aeeb.tar.bz2
- added a check for search terms shorter then 4 chars
-rw-r--r--i18n.cpp23
-rw-r--r--pages/edit_searchtimer.ecpp13
2 files changed, 33 insertions, 3 deletions
diff --git a/i18n.cpp b/i18n.cpp
index 35407a5..6c7c233 100644
--- a/i18n.cpp
+++ b/i18n.cpp
@@ -2757,6 +2757,29 @@ const tI18nPhrase Phrases[] = {
"", // Dansk
"", // Czech
},
+ { "Search text too short - use anyway?",
+ "Suchtext zu kurz - trotzdem verwenden?",
+ "",// TODO
+ "Il testo da cercare è troppo corto. Continuare lo stesso?",// Italiano
+ "Zoek tekst tekort - toch gebruiken?",
+ "",// TODO
+ "Texte de recherche est trop court - l'utiliser comme même?",
+ "",// TODO
+ "Liian suppea hakuehto - etsitäänkö silti?",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO Eesti
+ "",// TODO Dansk
+ "",// TODO Èesky (Czech)
+
+ },
{ "User", // English
"Benutzer", // Deutsch
"", // Slovenski
diff --git a/pages/edit_searchtimer.ecpp b/pages/edit_searchtimer.ecpp
index b7fd7b4..0ba9bcc 100644
--- a/pages/edit_searchtimer.ecpp
+++ b/pages/edit_searchtimer.ecpp
@@ -342,6 +342,13 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
changedblacklistmode(document.getElementById("blacklistmode"));
}
+ function checksearch()
+ {
+ if (document.getElementById("searchterm").value.length <= 3)
+ return confirm('<$ tr("Search text too short - use anyway?") $>');
+ return true;
+ }
+
function changedsearchmode(selection)
{
document.getElementById("tolerance").style.display = (selection.options[selection.selectedIndex].value == 5 ? "block" : "none");
@@ -453,7 +460,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<tr>
<td class="border" style="border-left: 1px solid black"></td>
<td class="label"><$ tr("Search term") $>:</td>
- <td><input type="text" name="search" value="<$ search $>" size="90" /></td>
+ <td><input type="text" name="search" value="<$ search $>" size="90" id="searchterm" /></td>
<td class="border" style="border-right: 1px solid black"></td>
</tr>
@@ -799,8 +806,8 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<tr>
<td class="border" style="border-left: 1px solid black"></td>
<td class="buttonpanel" colspan="2">
- <button class="green" type="submit" name="test" value="test"><$ tr("Test") $></button>
- <button class="green" type="submit" name="save"><$ tr("Save") $></button>
+ <button class="green" type="submit" name="test" value="test" onclick="return checksearch();"><$ tr("Test") $></button>
+ <button class="green" type="submit" name="save" onclick="return checksearch();"><$ tr("Save") $></button>
<button type="button" class="red" onclick="location.href='searchtimers.html';"><$ tr("Cancel") $></button>
</td>
<td class="border" style="border-right: 1px solid black"></td>