mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-21 15:11:28 +00:00
rework filter editor/add infobox layout, misc fixes
This commit is contained in:
32
backend.php
32
backend.php
@@ -2132,12 +2132,14 @@
|
|||||||
print "<tr><td>Match:</td>
|
print "<tr><td>Match:</td>
|
||||||
<td><input onkeypress=\"return filterCR(event)\"
|
<td><input onkeypress=\"return filterCR(event)\"
|
||||||
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
||||||
name=\"reg_exp\" size=\"30\" value=\"$reg_exp\"> ";
|
name=\"reg_exp\" class=\"iedit\" value=\"$reg_exp\">";
|
||||||
|
|
||||||
print_select_hash("filter_type", $filter_type, $filter_types);
|
print "</td><td>";
|
||||||
|
|
||||||
|
print_select_hash("filter_type", $filter_type, $filter_types, "class=\"iedit\"");
|
||||||
|
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
print "<tr><td>Feed:</td><td>";
|
print "<tr><td>Feed:</td><td colspan='2'>";
|
||||||
|
|
||||||
print_feed_select($link, "feed_id", $feed_id);
|
print_feed_select($link, "feed_id", $feed_id);
|
||||||
|
|
||||||
@@ -2145,7 +2147,7 @@
|
|||||||
|
|
||||||
print "<tr><td>Action:</td>";
|
print "<tr><td>Action:</td>";
|
||||||
|
|
||||||
print "<td><select name=\"action_id\">";
|
print "<td colspan='2'><select name=\"action_id\">";
|
||||||
|
|
||||||
$result = db_query($link, "SELECT id,description FROM ttrss_filter_actions
|
$result = db_query($link, "SELECT id,description FROM ttrss_filter_actions
|
||||||
ORDER BY name");
|
ORDER BY name");
|
||||||
@@ -2254,6 +2256,7 @@
|
|||||||
print "<input type=\"submit\"
|
print "<input type=\"submit\"
|
||||||
class=\"button\"
|
class=\"button\"
|
||||||
onclick=\"javascript:displayDlg('quickAddFilter', false)\"
|
onclick=\"javascript:displayDlg('quickAddFilter', false)\"
|
||||||
|
id=\"create_filter_btn\"
|
||||||
value=\"Create filter\">";
|
value=\"Create filter\">";
|
||||||
|
|
||||||
$result = db_query($link, "SELECT
|
$result = db_query($link, "SELECT
|
||||||
@@ -2346,22 +2349,14 @@
|
|||||||
|
|
||||||
print "<p id=\"filterOpToolbar\">";
|
print "<p id=\"filterOpToolbar\">";
|
||||||
|
|
||||||
if ($subop == "edit") {
|
|
||||||
print "Edit filter:
|
|
||||||
<input type=\"submit\" class=\"button\"
|
|
||||||
onclick=\"javascript:filterEditSave()\" value=\"Save\">
|
|
||||||
<input type=\"submit\" class=\"button\"
|
|
||||||
onclick=\"javascript:filterEditCancel()\" value=\"Cancel\">";
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
print "
|
print "
|
||||||
Selection:
|
Selection:
|
||||||
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:editSelectedFilter()\" value=\"Edit\">
|
onclick=\"javascript:editSelectedFilter()\" value=\"Edit\">
|
||||||
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
||||||
onclick=\"javascript:removeSelectedFilters()\" value=\"Remove\">";
|
onclick=\"javascript:removeSelectedFilters()\" value=\"Remove\">";
|
||||||
}
|
|
||||||
|
print "</p>";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -2793,12 +2788,13 @@
|
|||||||
print "<tr><td>Match:</td>
|
print "<tr><td>Match:</td>
|
||||||
<td><input onkeypress=\"return filterCR(event)\"
|
<td><input onkeypress=\"return filterCR(event)\"
|
||||||
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
||||||
name=\"reg_exp\" size=\"30\"> ";
|
name=\"reg_exp\" class=\"iedit\">";
|
||||||
|
print "</td><td>";
|
||||||
|
|
||||||
print_select_hash("filter_type", 1, $filter_types);
|
print_select_hash("filter_type", 1, $filter_types, "class=\"iedit\"");
|
||||||
|
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
print "<tr><td>Feed:</td><td>";
|
print "<tr><td>Feed:</td><td colspan='2'>";
|
||||||
|
|
||||||
print_feed_select($link, "feed_id");
|
print_feed_select($link, "feed_id");
|
||||||
|
|
||||||
@@ -2806,7 +2802,7 @@
|
|||||||
|
|
||||||
print "<tr><td>Action:</td>";
|
print "<tr><td>Action:</td>";
|
||||||
|
|
||||||
print "<td><select name=\"action_id\">";
|
print "<td colspan='2'><select name=\"action_id\">";
|
||||||
|
|
||||||
$result = db_query($link, "SELECT id,description FROM ttrss_filter_actions
|
$result = db_query($link, "SELECT id,description FROM ttrss_filter_actions
|
||||||
ORDER BY name");
|
ORDER BY name");
|
||||||
|
|||||||
@@ -364,6 +364,11 @@ function disableContainerChildren(id, disable, doc) {
|
|||||||
|
|
||||||
var container = doc.getElementById(id);
|
var container = doc.getElementById(id);
|
||||||
|
|
||||||
|
if (!container) {
|
||||||
|
//alert("disableContainerChildren: element " + id + " not found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0; i < container.childNodes.length; i++) {
|
for (var i = 0; i < container.childNodes.length; i++) {
|
||||||
var child = container.childNodes[i];
|
var child = container.childNodes[i];
|
||||||
|
|
||||||
|
|||||||
8
prefs.js
8
prefs.js
@@ -338,6 +338,8 @@ function editFilter(id) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.getElementById("create_filter_btn").disabled = true;
|
||||||
|
|
||||||
selectTableRowsByIdPrefix('prefFilterList', 'FILRR-', 'FICHK-', false);
|
selectTableRowsByIdPrefix('prefFilterList', 'FILRR-', 'FICHK-', false);
|
||||||
selectTableRowById('FILRR-'+id, 'FICHK-'+id, true);
|
selectTableRowById('FILRR-'+id, 'FICHK-'+id, true);
|
||||||
|
|
||||||
@@ -706,6 +708,8 @@ function filterEditCancel() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.getElementById("create_filter_btn").disabled = false;
|
||||||
|
|
||||||
selectPrefRows('filter', false); // cleanup feed selection
|
selectPrefRows('filter', false); // cleanup feed selection
|
||||||
closeInfoBox();
|
closeInfoBox();
|
||||||
}
|
}
|
||||||
@@ -761,6 +765,8 @@ function userEditSave() {
|
|||||||
|
|
||||||
notify("Saving user...");
|
notify("Saving user...");
|
||||||
|
|
||||||
|
closeInfoBox();
|
||||||
|
|
||||||
var query = Form.serialize("user_edit_form");
|
var query = Form.serialize("user_edit_form");
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?" + query, true);
|
xmlhttp.open("GET", "backend.php?" + query, true);
|
||||||
@@ -789,6 +795,8 @@ function filterEditSave() {
|
|||||||
|
|
||||||
closeInfoBox();
|
closeInfoBox();
|
||||||
|
|
||||||
|
document.getElementById("create_filter_btn").disabled = false;
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?" + query, true);
|
xmlhttp.open("GET", "backend.php?" + query, true);
|
||||||
xmlhttp.onreadystatechange=filterlist_callback;
|
xmlhttp.onreadystatechange=filterlist_callback;
|
||||||
xmlhttp.send(null);
|
xmlhttp.send(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user