drop option ENABLE_SEARCH_TOOLBAR, use some more callbacks in filterCR
This commit is contained in:
parent
6e6504bc02
commit
c91c224952
8 changed files with 37 additions and 20 deletions
22
backend.php
22
backend.php
|
@ -1020,7 +1020,7 @@
|
||||||
print "<table width='100%'>";
|
print "<table width='100%'>";
|
||||||
|
|
||||||
print "<tr><td>Title:</td>";
|
print "<tr><td>Title:</td>";
|
||||||
print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event)\"
|
print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event, feedEditSave)\"
|
||||||
name=\"title\" value=\"$title\"></td></tr>";
|
name=\"title\" value=\"$title\"></td></tr>";
|
||||||
|
|
||||||
$feed_url = db_fetch_result($result, 0, "feed_url");
|
$feed_url = db_fetch_result($result, 0, "feed_url");
|
||||||
|
@ -1028,7 +1028,7 @@
|
||||||
0, "feed_url")));
|
0, "feed_url")));
|
||||||
|
|
||||||
print "<tr><td>Feed URL:</td>";
|
print "<tr><td>Feed URL:</td>";
|
||||||
print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event)\"
|
print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event, feedEditSave)\"
|
||||||
name=\"feed_url\" value=\"$feed_url\"></td></tr>";
|
name=\"feed_url\" value=\"$feed_url\"></td></tr>";
|
||||||
|
|
||||||
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
|
@ -1127,14 +1127,14 @@
|
||||||
$auth_login = escape_for_form(db_fetch_result($result, 0, "auth_login"));
|
$auth_login = escape_for_form(db_fetch_result($result, 0, "auth_login"));
|
||||||
|
|
||||||
print "<tr><td>Login:</td>";
|
print "<tr><td>Login:</td>";
|
||||||
print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event)\"
|
print "<td><input class=\"iedit\" onkeypress=\"return filterCR(event, feedEditSave)\"
|
||||||
name=\"auth_login\" value=\"$auth_login\"></td></tr>";
|
name=\"auth_login\" value=\"$auth_login\"></td></tr>";
|
||||||
|
|
||||||
$auth_pass = escape_for_form(db_fetch_result($result, 0, "auth_pass"));
|
$auth_pass = escape_for_form(db_fetch_result($result, 0, "auth_pass"));
|
||||||
|
|
||||||
print "<tr><td>Password:</td>";
|
print "<tr><td>Password:</td>";
|
||||||
print "<td><input class=\"iedit\" type=\"password\" name=\"auth_pass\"
|
print "<td><input class=\"iedit\" type=\"password\" name=\"auth_pass\"
|
||||||
onkeypress=\"return filterCR(event)\"
|
onkeypress=\"return filterCR(event, feedEditSave)\"
|
||||||
value=\"$auth_pass\"></td></tr>";
|
value=\"$auth_pass\"></td></tr>";
|
||||||
|
|
||||||
$private = sql_bool_to_bool(db_fetch_result($result, 0, "private"));
|
$private = sql_bool_to_bool(db_fetch_result($result, 0, "private"));
|
||||||
|
@ -1856,7 +1856,7 @@
|
||||||
print "<table width='100%'>";
|
print "<table width='100%'>";
|
||||||
|
|
||||||
print "<tr><td>Match:</td>
|
print "<tr><td>Match:</td>
|
||||||
<td><input onkeypress=\"return filterCR(event)\"
|
<td><input onkeypress=\"return filterCR(event, filterEditSave)\"
|
||||||
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
||||||
name=\"reg_exp\" class=\"iedit\" value=\"$reg_exp\">";
|
name=\"reg_exp\" class=\"iedit\" value=\"$reg_exp\">";
|
||||||
|
|
||||||
|
@ -1964,6 +1964,8 @@
|
||||||
$feed_id = db_escape_string($_GET["feed_id"]);
|
$feed_id = db_escape_string($_GET["feed_id"]);
|
||||||
$action_id = db_escape_string($_GET["action_id"]);
|
$action_id = db_escape_string($_GET["action_id"]);
|
||||||
|
|
||||||
|
if (!$regexp) return;
|
||||||
|
|
||||||
if (!$feed_id) {
|
if (!$feed_id) {
|
||||||
$feed_id = 'NULL';
|
$feed_id = 'NULL';
|
||||||
} else {
|
} else {
|
||||||
|
@ -2163,7 +2165,7 @@
|
||||||
print "<table width='100%'>";
|
print "<table width='100%'>";
|
||||||
|
|
||||||
print "<tr><td>Caption:</td>
|
print "<tr><td>Caption:</td>
|
||||||
<td><input onkeypress=\"return filterCR(event)\"
|
<td><input onkeypress=\"return filterCR(event, labelEditSave)\"
|
||||||
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
||||||
name=\"description\" class=\"iedit\" value=\"$description\">";
|
name=\"description\" class=\"iedit\" value=\"$description\">";
|
||||||
|
|
||||||
|
@ -2301,7 +2303,9 @@
|
||||||
// no escaping is done here on purpose
|
// no escaping is done here on purpose
|
||||||
$sql_exp = trim($_GET["sql_exp"]);
|
$sql_exp = trim($_GET["sql_exp"]);
|
||||||
$description = db_escape_string($_GET["description"]);
|
$description = db_escape_string($_GET["description"]);
|
||||||
|
|
||||||
|
if (!$sql_exp || !$description) return;
|
||||||
|
|
||||||
$result = db_query($link,
|
$result = db_query($link,
|
||||||
"INSERT INTO ttrss_labels (sql_exp,description,owner_uid)
|
"INSERT INTO ttrss_labels (sql_exp,description,owner_uid)
|
||||||
VALUES ('$sql_exp', '$description', '".$_SESSION["uid"]."')");
|
VALUES ('$sql_exp', '$description', '".$_SESSION["uid"]."')");
|
||||||
|
@ -2472,7 +2476,7 @@
|
||||||
print "<table width='100%'>
|
print "<table width='100%'>
|
||||||
<tr><td>Feed URL:</td><td>
|
<tr><td>Feed URL:</td><td>
|
||||||
<input class=\"iedit\" onblur=\"javascript:enableHotkeys()\"
|
<input class=\"iedit\" onblur=\"javascript:enableHotkeys()\"
|
||||||
onkeypress=\"return filterCR(event)\"
|
onkeypress=\"return filterCR(event, qafAdd)\"
|
||||||
onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
|
onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
|
||||||
onfocus=\"javascript:disableHotkeys()\" name=\"feed_url\"></td></tr>";
|
onfocus=\"javascript:disableHotkeys()\" name=\"feed_url\"></td></tr>";
|
||||||
|
|
||||||
|
@ -2585,7 +2589,7 @@
|
||||||
print "<table width='100%'>";
|
print "<table width='100%'>";
|
||||||
|
|
||||||
print "<tr><td>Caption:</td>
|
print "<tr><td>Caption:</td>
|
||||||
<td><input onkeypress=\"return filterCR(event)\"
|
<td><input onkeypress=\"return filterCR(event, addLabel)\"
|
||||||
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
||||||
name=\"description\" class=\"iedit\">";
|
name=\"description\" class=\"iedit\">";
|
||||||
|
|
||||||
|
|
16
functions.js
16
functions.js
|
@ -1223,6 +1223,14 @@ function qaddFilter() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var form = document.forms['filter_add_form'];
|
||||||
|
var reg_exp = form.reg_exp.value;
|
||||||
|
|
||||||
|
if (reg_exp == "") {
|
||||||
|
alert("Can't add filter: nothing to match on.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var query = Form.serialize("filter_add_form");
|
var query = Form.serialize("filter_add_form");
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?" + query, true);
|
xmlhttp.open("GET", "backend.php?" + query, true);
|
||||||
|
@ -1251,6 +1259,14 @@ function qafAdd() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var form = document.forms['feed_add_form'];
|
||||||
|
var feed_url = form.feed_url.value;
|
||||||
|
|
||||||
|
if (feed_url == "") {
|
||||||
|
alert("Can't subscribe: no feed URL given.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
notify("Adding feed...", true);
|
notify("Adding feed...", true);
|
||||||
|
|
||||||
closeInfoBox();
|
closeInfoBox();
|
||||||
|
|
|
@ -1877,7 +1877,9 @@
|
||||||
|
|
||||||
function subscribe_to_feed($link, $feed_link, $cat_id = 0) {
|
function subscribe_to_feed($link, $feed_link, $cat_id = 0) {
|
||||||
|
|
||||||
$feed_link = preg_replace("/^feed:/", "", $feed_link);
|
$feed_link = trim(preg_replace("/^feed:/", "", $feed_link));
|
||||||
|
|
||||||
|
if ($feed_link == "") return;
|
||||||
|
|
||||||
if ($cat_id == "0" || !$cat_id) {
|
if ($cat_id == "0" || !$cat_id) {
|
||||||
$cat_qpart = "NULL";
|
$cat_qpart = "NULL";
|
||||||
|
|
|
@ -241,8 +241,6 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('COMBINED_DISPLAY_MODE', 1, 'false', 'Combined feed display',2,
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('COMBINED_DISPLAY_MODE', 1, 'false', 'Combined feed display',2,
|
||||||
'Display expanded list of feed articles, instead of separate displays for headlines and article content');
|
'Display expanded list of feed articles, instead of separate displays for headlines and article content');
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_SEARCH_TOOLBAR', 1, 'false', 'Enable search toolbar',3);
|
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2);
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('OPEN_LINKS_IN_NEW_WINDOW', 1, 'true', 'Open article links in new browser window',2);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('OPEN_LINKS_IN_NEW_WINDOW', 1, 'true', 'Open article links in new browser window',2);
|
||||||
|
|
|
@ -221,8 +221,6 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('COMBINED_DISPLAY_MODE', 1, 'false', 'Combined feed display',2,
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('COMBINED_DISPLAY_MODE', 1, 'false', 'Combined feed display',2,
|
||||||
'Display expanded list of feed articles, instead of separate displays for headlines and article content');
|
'Display expanded list of feed articles, instead of separate displays for headlines and article content');
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_SEARCH_TOOLBAR', 1, 'false', 'Enable search toolbar',3);
|
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2);
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('OPEN_LINKS_IN_NEW_WINDOW', 1, 'true', 'Open article links in new browser window',2);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('OPEN_LINKS_IN_NEW_WINDOW', 1, 'true', 'Open article links in new browser window',2);
|
||||||
|
|
|
@ -2,9 +2,11 @@ begin;
|
||||||
|
|
||||||
delete FROM ttrss_user_prefs WHERE pref_name = 'DISPLAY_HEADER';
|
delete FROM ttrss_user_prefs WHERE pref_name = 'DISPLAY_HEADER';
|
||||||
delete FROM ttrss_user_prefs WHERE pref_name = 'DISPLAY_FOOTER';
|
delete FROM ttrss_user_prefs WHERE pref_name = 'DISPLAY_FOOTER';
|
||||||
|
delete FROM ttrss_user_prefs WHERE pref_name = 'ENABLE_SEARCH_TOOLBAR';
|
||||||
|
|
||||||
delete FROM ttrss_prefs WHERE pref_name = 'DISPLAY_HEADER';
|
delete FROM ttrss_prefs WHERE pref_name = 'DISPLAY_HEADER';
|
||||||
delete FROM ttrss_prefs WHERE pref_name = 'DISPLAY_FOOTER';
|
delete FROM ttrss_prefs WHERE pref_name = 'DISPLAY_FOOTER';
|
||||||
|
delete FROM ttrss_prefs WHERE pref_name = 'ENABLE_SEARCH_TOOLBAR';
|
||||||
|
|
||||||
insert into ttrss_themes (theme_name, theme_path)
|
insert into ttrss_themes (theme_name, theme_path)
|
||||||
values ('Graycube', 'graycube');
|
values ('Graycube', 'graycube');
|
||||||
|
|
|
@ -2,9 +2,11 @@ begin;
|
||||||
|
|
||||||
delete FROM ttrss_user_prefs WHERE pref_name = 'DISPLAY_HEADER';
|
delete FROM ttrss_user_prefs WHERE pref_name = 'DISPLAY_HEADER';
|
||||||
delete FROM ttrss_user_prefs WHERE pref_name = 'DISPLAY_FOOTER';
|
delete FROM ttrss_user_prefs WHERE pref_name = 'DISPLAY_FOOTER';
|
||||||
|
delete FROM ttrss_user_prefs WHERE pref_name = 'ENABLE_SEARCH_TOOLBAR';
|
||||||
|
|
||||||
delete FROM ttrss_prefs WHERE pref_name = 'DISPLAY_HEADER';
|
delete FROM ttrss_prefs WHERE pref_name = 'DISPLAY_HEADER';
|
||||||
delete FROM ttrss_prefs WHERE pref_name = 'DISPLAY_FOOTER';
|
delete FROM ttrss_prefs WHERE pref_name = 'DISPLAY_FOOTER';
|
||||||
|
delete FROM ttrss_prefs WHERE pref_name = 'ENABLE_SEARCH_TOOLBAR';
|
||||||
|
|
||||||
insert into ttrss_themes (theme_name, theme_path)
|
insert into ttrss_themes (theme_name, theme_path)
|
||||||
values ('Graycube', 'graycube');
|
values ('Graycube', 'graycube');
|
||||||
|
|
|
@ -152,15 +152,10 @@ window.onload = init;
|
||||||
|
|
||||||
<form id="main_toolbar_form">
|
<form id="main_toolbar_form">
|
||||||
|
|
||||||
<?php if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
|
Search: <input name="query"
|
||||||
<input name="query"
|
|
||||||
onKeyPress="return filterCR(event, viewCurrentFeed)"
|
onKeyPress="return filterCR(event, viewCurrentFeed)"
|
||||||
onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();">
|
onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();">
|
||||||
<input class="button" type="submit"
|
|
||||||
onclick="return viewCurrentFeed(0)" value="Search">
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
View:
|
View:
|
||||||
<select name="view_mode" onchange="viewCurrentFeed(0, '')">
|
<select name="view_mode" onchange="viewCurrentFeed(0, '')">
|
||||||
<option selected value="adaptive">Adaptive</option>
|
<option selected value="adaptive">Adaptive</option>
|
||||||
|
|
Loading…
Reference in a new issue