mirror of
https://tt-rss.org/git/tt-rss.git
synced 2024-06-29 12:20:51 +02:00
label help uses infoboxes, real help system
This commit is contained in:
parent
76332f3c90
commit
01c9c74ab7
63
backend.php
63
backend.php
|
@ -1939,7 +1939,7 @@
|
||||||
|
|
||||||
print "<tr class=\"title\">
|
print "<tr class=\"title\">
|
||||||
<td width=\"5%\">Select</td><td width=\"40%\">SQL expression
|
<td width=\"5%\">Select</td><td width=\"40%\">SQL expression
|
||||||
<a class=\"helpLink\" href=\"javascript:popupHelp(1)\">(?)</a>
|
<a class=\"helpLink\" href=\"javascript:displayHelpInfobox(1)\">(?)</a>
|
||||||
</td>
|
</td>
|
||||||
<td width=\"40%\">Caption</td></tr>";
|
<td width=\"40%\">Caption</td></tr>";
|
||||||
|
|
||||||
|
@ -2044,53 +2044,34 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($op == "help") {
|
if ($op == "help") {
|
||||||
print "<html><head>
|
if (!$_GET["noheaders"]) {
|
||||||
<title>Tiny Tiny RSS : Help</title>
|
print "<html><head>
|
||||||
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">
|
<title>Tiny Tiny RSS : Help</title>
|
||||||
<script type=\"text/javascript\" src=\"functions.js\"></script>
|
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">
|
||||||
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
|
<script type=\"text/javascript\" src=\"functions.js\"></script>
|
||||||
</head><body>";
|
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
|
||||||
|
</head><body>";
|
||||||
|
}
|
||||||
|
|
||||||
$tid = sprintf("%d", $_GET["tid"]);
|
$tid = sprintf("%d", $_GET["tid"]);
|
||||||
|
|
||||||
/* FIXME this badly needs real implementation */
|
print "<div class='infoBoxContents'>";
|
||||||
|
|
||||||
print "<div class='helpResponse'>";
|
if (file_exists("help/$tid.php")) {
|
||||||
|
include("help/$tid.php");
|
||||||
?>
|
} else {
|
||||||
|
print "<p>Help topic not found.</p>";
|
||||||
<h1>Help for SQL expressions</h1>
|
}
|
||||||
|
|
||||||
<h2>Description</h2>
|
|
||||||
|
|
||||||
<p>The «SQL expression» is added to WHERE clause of
|
|
||||||
view feed query. You can match on ttrss_entries table fields
|
|
||||||
and even use subselect to query additional information. This
|
|
||||||
functionality is considered to be advanced and requires basic
|
|
||||||
understanding of SQL.</p>
|
|
||||||
|
|
||||||
<h2>Examples</h2>
|
|
||||||
|
|
||||||
<pre>unread = true</pre>
|
|
||||||
|
|
||||||
Matches all unread articles
|
|
||||||
|
|
||||||
<pre>title like '%Linux%'</pre>
|
|
||||||
|
|
||||||
Matches all articles which mention Linux in the title. You get the idea.
|
|
||||||
|
|
||||||
<p>See the database schema included in the distribution package for gruesome
|
|
||||||
details.</p>
|
|
||||||
|
|
||||||
<?
|
|
||||||
|
|
||||||
print "<div align='center'>
|
|
||||||
<a class=\"helpLink\"
|
|
||||||
href=\"javascript:window.close()\">(Close this window)</a></div>";
|
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
print "</body></html>";
|
print "<div align='center'>
|
||||||
|
<input type='submit' class='button'
|
||||||
|
onclick=\"closeInfoBox()\" value=\"Close this window\"></div>";
|
||||||
|
|
||||||
|
if (!$_GET["noheaders"]) {
|
||||||
|
print "</body></html>";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
23
help/1.php
Normal file
23
help/1.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<h1>Help for SQL expressions</h1>
|
||||||
|
|
||||||
|
<h2>Description</h2>
|
||||||
|
|
||||||
|
<p>The «SQL expression» is added to WHERE clause of
|
||||||
|
view feed query. You can match on ttrss_entries table fields
|
||||||
|
and even use subselect to query additional information. This
|
||||||
|
functionality is considered to be advanced and requires basic
|
||||||
|
understanding of SQL.</p>
|
||||||
|
|
||||||
|
<h2>Examples</h2>
|
||||||
|
|
||||||
|
<p>Match all unread articles:</p>
|
||||||
|
|
||||||
|
<pre>unread = true</pre>
|
||||||
|
|
||||||
|
<p>Matches all articles which mention Linux in the title:</p>
|
||||||
|
|
||||||
|
<pre>title like '%Linux%'</pre>
|
||||||
|
|
||||||
|
<p>See the database schema included in the distribution package for gruesome
|
||||||
|
details.</p>
|
||||||
|
|
10
prefs.js
10
prefs.js
|
@ -695,6 +695,16 @@ function labelTest() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function displayHelpInfobox(topic_id) {
|
||||||
|
|
||||||
|
xmlhttp.open("GET", "backend.php?op=help&tid=" +
|
||||||
|
param_escape(topic_id) + "&noheaders=1", true);
|
||||||
|
|
||||||
|
xmlhttp.onreadystatechange=infobox_callback;
|
||||||
|
xmlhttp.send(null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function labelEditCancel() {
|
function labelEditCancel() {
|
||||||
|
|
||||||
if (!xmlhttp_ready(xmlhttp)) {
|
if (!xmlhttp_ready(xmlhttp)) {
|
||||||
|
|
|
@ -534,6 +534,7 @@ pre {
|
||||||
border : 1px solid #c0c0c0;
|
border : 1px solid #c0c0c0;
|
||||||
padding : 5px;
|
padding : 5px;
|
||||||
background : #f0f0f0;
|
background : #f0f0f0;
|
||||||
|
margin : 5px 10px 5px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.extSearch {
|
input.extSearch {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user