From fd00729e88003b51c9d9957b0e8b117a0494aeeb Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Fri, 27 Apr 2007 15:13:52 +0000 Subject: - added a check for search terms shorter then 4 chars --- i18n.cpp | 23 +++++++++++++++++++++++ pages/edit_searchtimer.ecpp | 13 ++++++++++--- 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("Search term") $>: - + @@ -799,8 +806,8 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); - - + + -- cgit v1.2.3