label editor: bugfixes

This commit is contained in:
Andrew Dolgov 2008-08-07 09:12:24 +01:00
parent 5be2805bce
commit 8c96d4b1da
2 changed files with 25 additions and 3 deletions

View File

@ -1768,21 +1768,43 @@ function addLabelExample() {
} }
if (op == "kw_title") { if (op == "kw_title") {
if (p.value == "") {
alert("This action requires a parameter.");
return false;
}
tmp = tmp + "ttrss_entries.title like '%"+p.value+"%'"; tmp = tmp + "ttrss_entries.title like '%"+p.value+"%'";
} }
if (op == "kw_content") { if (op == "kw_content") {
if (p.value == "") {
alert("This action requires a parameter.");
return false;
}
tmp = tmp + "ttrss_entries.content like '%"+p.value+"%'"; tmp = tmp + "ttrss_entries.content like '%"+p.value+"%'";
} }
if (op == "scoreE") { if (op == "scoreE") {
if (isNaN(parseInt(p.value))) {
alert("This action expects numeric parameter.");
return false;
}
tmp = tmp + "score = " + p.value; tmp = tmp + "score = " + p.value;
} }
if (op == "scoreG") { if (op == "scoreG") {
if (isNaN(parseInt(p.value))) {
alert("This action expects numeric parameter.");
return false;
}
tmp = tmp + "score > " + p.value; tmp = tmp + "score > " + p.value;
} }
if (op == "scoreL") { if (op == "scoreL") {
if (isNaN(parseInt(p.value))) {
alert("This action expects numeric parameter.");
return false;
}
tmp = tmp + "score < " + p.value; tmp = tmp + "score < " + p.value;
} }

View File

@ -5660,9 +5660,9 @@
print "<option value=\"updated\">".__("Updated articles")."</option>"; print "<option value=\"updated\">".__("Updated articles")."</option>";
print "<option value=\"kw_title\">".__("Title contains")."</option>"; print "<option value=\"kw_title\">".__("Title contains")."</option>";
print "<option value=\"kw_content\">".__("Content contains")."</option>"; print "<option value=\"kw_content\">".__("Content contains")."</option>";
print "<option value=\"scoreE\">".__("Score is equals")."</option>"; print "<option value=\"scoreE\">".__("Score equals")."</option>";
print "<option value=\"scoreG\">".__("Score is less than")."</option>"; print "<option value=\"scoreG\">".__("Score is greater than")."</option>";
print "<option value=\"scoreL\">".__("Score is greater than")."</option>"; print "<option value=\"scoreL\">".__("Score is less than")."</option>";
print "<option value=\"newerH\">".__("Articles newer than X hours")."</option>"; print "<option value=\"newerH\">".__("Articles newer than X hours")."</option>";
print "<option value=\"newerD\">".__("Articles newer than X days")."</option>"; print "<option value=\"newerD\">".__("Articles newer than X days")."</option>";