interface tweaks, add info/question/exclamation pics
This commit is contained in:
parent
b05d782d90
commit
0d32b41e36
13 changed files with 73 additions and 54 deletions
|
@ -155,11 +155,13 @@ function notify_real(msg, doc, no_hide, is_err) {
|
||||||
// n.style.backgroundColor = "#ffcccc";
|
// n.style.backgroundColor = "#ffcccc";
|
||||||
// n.style.color = "black";
|
// n.style.color = "black";
|
||||||
// n.style.borderColor = "#ff0000";
|
// n.style.borderColor = "#ff0000";
|
||||||
|
msg = "<img src='images/sign_excl.png'> " + msg;
|
||||||
} else {
|
} else {
|
||||||
n.className = "notify";
|
n.className = "notify";
|
||||||
// n.style.backgroundColor = "#fff7d5";
|
// n.style.backgroundColor = "#fff7d5";
|
||||||
// n.style.borderColor = "#d7c47a";
|
// n.style.borderColor = "#d7c47a";
|
||||||
// n.style.color = "black";
|
// n.style.color = "black";
|
||||||
|
msg = "<img src='images/sign_info.png'> " + msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
// msg = "<img src='images/live_com_loading.gif'> " + msg;
|
// msg = "<img src='images/live_com_loading.gif'> " + msg;
|
||||||
|
@ -1396,7 +1398,7 @@ function toggleSubmitNotEmpty(e, submit_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function isValidURL(s) {
|
function isValidURL(s) {
|
||||||
return s.match("http://") != null || s.match("https://") != null;
|
return s.match("http://") != null || s.match("https://") != null || s.match("feed://") != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function qafAdd() {
|
function qafAdd() {
|
||||||
|
|
|
@ -2619,9 +2619,9 @@
|
||||||
|
|
||||||
if (version_compare(VERSION, $latest_version) == -1) {
|
if (version_compare(VERSION, $latest_version) == -1) {
|
||||||
if ($brief_fmt) {
|
if ($brief_fmt) {
|
||||||
return "<div class=\"notice\"><a href=\"javascript:showBlockElement('milestoneDetails')\">
|
return format_notice("<a href=\"javascript:showBlockElement('milestoneDetails')\">
|
||||||
New version of Tiny-Tiny RSS ($latest_version) is available (click for details)</a>
|
New version of Tiny-Tiny RSS ($latest_version) is available (click for details)</a>
|
||||||
<div id=\"milestoneDetails\">$content</div></div>";
|
<div id=\"milestoneDetails\">$content</div>");
|
||||||
} else {
|
} else {
|
||||||
return "New version of Tiny-Tiny RSS ($latest_version) is available:
|
return "New version of Tiny-Tiny RSS ($latest_version) is available:
|
||||||
<div class='milestoneDetails'>$content</div>
|
<div class='milestoneDetails'>$content</div>
|
||||||
|
@ -3174,4 +3174,14 @@
|
||||||
header("Pragma: no-cache"); // HTTP/1.0
|
header("Pragma: no-cache"); // HTTP/1.0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function format_warning($msg) {
|
||||||
|
return "<div class=\"warning\">
|
||||||
|
<img src=\"images/sign_excl.png\">$msg</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
function format_notice($msg) {
|
||||||
|
return "<div class=\"notice\">
|
||||||
|
<img src=\"images/sign_info.png\">$msg</div>";
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
10
help/1.php
10
help/1.php
|
@ -1,12 +1,6 @@
|
||||||
<h1>Help for SQL expressions</h1>
|
<h1>Labels and SQL Expressions</h1>
|
||||||
|
|
||||||
<h2>Description</h2>
|
<p>Labels are generated by using SQL expressions. 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 some understanding of SQL.</p>
|
||||||
|
|
||||||
<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>
|
<h2>Examples</h2>
|
||||||
|
|
||||||
|
|
10
help/2.php
Normal file
10
help/2.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<h1>Content filters</h1>
|
||||||
|
|
||||||
|
<p>TT-RSS has support for filtering (or processing) articles. Filtering is done once, when new article is imported to the database from the newsfeed, specified field is matched against regular expression and some action is taken. Regular expression matching is case-insensitive.</p>
|
||||||
|
|
||||||
|
<p>Supported actions: filter (do not import) article, mark article as read, set starred, assign tag(s). Filters can be defined globally and for some specific feed.</p>
|
||||||
|
|
||||||
|
<p>Multiple and inverse matching are supported. All matching filters are considered when article is being imported and all actions executed in sequence. Inverse matching reverts matching result, e.g. filter matching XYZZY in title with inverse flag will match all articles, except those containing string XYZZY in title.</p>
|
||||||
|
|
||||||
|
<p>See <a target="_new" href="http://tt-rss.spb.ru/trac/wiki/ContentFilters">this page</a> for additional information on filtering.</p>
|
||||||
|
|
BIN
images/sign_excl.png
Normal file
BIN
images/sign_excl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1,006 B |
BIN
images/sign_info.png
Normal file
BIN
images/sign_info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
images/sign_quest.png
Normal file
BIN
images/sign_quest.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -35,14 +35,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($subscribed) > 0) {
|
if (count($subscribed) > 0) {
|
||||||
print "<div class=\"notice\">";
|
$msg = "<b>Subscribed to feeds:</b>".
|
||||||
print "<b>Subscribed to feeds:</b>";
|
"<ul class=\"nomarks\">";
|
||||||
print "<ul class=\"nomarks\">";
|
|
||||||
foreach ($subscribed as $title) {
|
foreach ($subscribed as $title) {
|
||||||
print "<li>$title</li>";
|
$msg .= "<li>$title</li>";
|
||||||
}
|
}
|
||||||
print "</ul>";
|
$msg .= "</ul>";
|
||||||
print "</div>";
|
|
||||||
|
print format_notice($msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,11 +443,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subscribe_to_feed($link, $feed_url, $cat_id)) {
|
if (subscribe_to_feed($link, $feed_url, $cat_id)) {
|
||||||
print "Subscribed to <b>$feed_url</b>.";
|
print format_notice("Subscribed to <b>$feed_url</b>.");
|
||||||
} else {
|
} else {
|
||||||
print "<div class=\"warning\">
|
print format_warning("Already subscribed to <b>$feed_url</b>.");
|
||||||
Already subscribed to <b>$feed_url</b>.
|
|
||||||
</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($p_from != 'tt-rss') {
|
if ($p_from != 'tt-rss') {
|
||||||
|
@ -548,9 +547,7 @@
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
print "<div class=\"warning\">
|
print format_warning("Category <b>$feed_cat</b> already exists in the database.");
|
||||||
Category <b>$feed_cat</b> already exists in the database.
|
|
||||||
</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -577,8 +574,7 @@
|
||||||
WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]);
|
WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
print "<div class=\"warning\">
|
print format_warning("Unable to delete non empty feed categories.");
|
||||||
Unable to delete non empty feed categories.</div>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,9 @@
|
||||||
$filter_types[$line["id"]] = $line["description"];
|
$filter_types[$line["id"]] = $line["description"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<a class='helpLinkPic' href=\"javascript:displayHelpInfobox(2)\">
|
||||||
|
<img src='images/sign_quest.png'></a>";
|
||||||
|
|
||||||
print "<input type=\"submit\"
|
print "<input type=\"submit\"
|
||||||
class=\"button\"
|
class=\"button\"
|
||||||
onclick=\"return displayDlg('quickAddFilter', false)\"
|
onclick=\"return displayDlg('quickAddFilter', false)\"
|
||||||
|
@ -336,9 +339,6 @@
|
||||||
|
|
||||||
print "</p>";
|
print "</p>";
|
||||||
|
|
||||||
print "<div class=\"insensitive\" style=\"float : right\">See
|
|
||||||
<a target=\"_new\" href=\"http://tt-rss.spb.ru/trac/wiki/ContentFilters\">this page</a>
|
|
||||||
for additional information on filtering</div>";
|
|
||||||
|
|
||||||
/* print "<div class=\"insensitive\" style=\"float : right\">
|
/* print "<div class=\"insensitive\" style=\"float : right\">
|
||||||
First matching filter is used, filtering is performed
|
First matching filter is used, filtering is performed
|
||||||
|
|
|
@ -190,6 +190,9 @@
|
||||||
$sort = "description";
|
$sort = "description";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<a class='helpLinkPic' href=\"javascript:displayHelpInfobox(1)\">
|
||||||
|
<img src='images/sign_quest.png'></a>";
|
||||||
|
|
||||||
print "<div class=\"prefGenericAddBox\">";
|
print "<div class=\"prefGenericAddBox\">";
|
||||||
|
|
||||||
print"<input type=\"submit\" class=\"button\"
|
print"<input type=\"submit\" class=\"button\"
|
||||||
|
@ -222,7 +225,6 @@
|
||||||
<td width=\"5%\"> </td>
|
<td width=\"5%\"> </td>
|
||||||
<td width=\"30%\"><a href=\"javascript:updateLabelList('description')\">Caption</a></td>
|
<td width=\"30%\"><a href=\"javascript:updateLabelList('description')\">Caption</a></td>
|
||||||
<td width=\"50%\"><a href=\"javascript:updateLabelList('sql_exp')\">SQL Expression</a>
|
<td width=\"50%\"><a href=\"javascript:updateLabelList('sql_exp')\">SQL Expression</a>
|
||||||
<a class=\"helpLink\" href=\"javascript:displayHelpInfobox(1)\">(?)</a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
|
|
|
@ -164,35 +164,25 @@
|
||||||
pwd_hash = 'SHA1:".sha1("password")."')");
|
pwd_hash = 'SHA1:".sha1("password")."')");
|
||||||
|
|
||||||
if (db_num_rows($result) != 0) {
|
if (db_num_rows($result) != 0) {
|
||||||
print "<div class=\"warning\">
|
print format_warning("Your password is at default value, please change it.");
|
||||||
Your password is at default value, please change it.
|
|
||||||
</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_SESSION["pwd_change_result"] == "failed") {
|
if ($_SESSION["pwd_change_result"] == "failed") {
|
||||||
print "<div class=\"warning\">
|
print format_warning("Could not change the password.");
|
||||||
There was an error while changing your password.
|
|
||||||
</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_SESSION["pwd_change_result"] == "ok") {
|
if ($_SESSION["pwd_change_result"] == "ok") {
|
||||||
print "<div class=\"notice\">
|
print format_notice("Password was changed.");
|
||||||
Password changed successfully.
|
|
||||||
</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION["pwd_change_result"] = "";
|
$_SESSION["pwd_change_result"] = "";
|
||||||
|
|
||||||
if ($_SESSION["prefs_op_result"] == "reset-to-defaults") {
|
if ($_SESSION["prefs_op_result"] == "reset-to-defaults") {
|
||||||
print "<div class=\"notice\">
|
print format_notice("The configuration was reset to defaults.");
|
||||||
Your configuration was reset to defaults.
|
|
||||||
</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_SESSION["prefs_op_result"] == "save-config") {
|
if ($_SESSION["prefs_op_result"] == "save-config") {
|
||||||
print "<div class=\"notice\">
|
print format_notice("The configuration was saved.");
|
||||||
Your configuration was saved successfully.
|
|
||||||
</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION["prefs_op_result"] = "";
|
$_SESSION["prefs_op_result"] = "";
|
||||||
|
|
31
tt-rss.css
31
tt-rss.css
|
@ -229,12 +229,15 @@ input.editbox {
|
||||||
display : none;
|
display : none;
|
||||||
float : right;
|
float : right;
|
||||||
font-size : 9pt;
|
font-size : 9pt;
|
||||||
text-align : center;
|
|
||||||
z-index : 999;
|
z-index : 999;
|
||||||
-moz-border-radius : 2px;
|
-moz-border-radius : 2px;
|
||||||
padding : 5px 5px 5px 5px;
|
padding : 5px 5px 5px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#notify img {
|
||||||
|
vertical-align : middle;
|
||||||
|
}
|
||||||
|
|
||||||
.notify {
|
.notify {
|
||||||
border-color : #d7c47a;
|
border-color : #d7c47a;
|
||||||
background-color : #fff7d5;
|
background-color : #fff7d5;
|
||||||
|
@ -566,20 +569,28 @@ div.prefsTabSelected {
|
||||||
text-align : center;
|
text-align : center;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.warning {
|
div.notice {
|
||||||
background : #fff7d5;
|
background : #ffffff;
|
||||||
border : 1px solid #d7c47a;
|
border : 1px solid #88b0f0;
|
||||||
|
width : 50%;
|
||||||
padding : 5px;
|
padding : 5px;
|
||||||
margin : 0px 0px 5px 0px;
|
margin : 0px 0px 5px 0px;
|
||||||
font-size : 9pt;
|
font-size : 9pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.notice {
|
div.warning {
|
||||||
background : #ffffff;
|
background : #fff7d5;
|
||||||
border : 1px solid #88b0f0;
|
border : 1px solid #d7c47a;
|
||||||
|
font-size : 9pt;
|
||||||
|
width : 50%;
|
||||||
padding : 5px;
|
padding : 5px;
|
||||||
margin : 0px 0px 5px 0px;
|
margin : 0px 0px 5px 0px;
|
||||||
font-size : 9pt;
|
}
|
||||||
|
|
||||||
|
|
||||||
|
div.warning img, div.notice img {
|
||||||
|
vertical-align : middle;
|
||||||
|
padding : 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.error {
|
div.error {
|
||||||
|
@ -1468,3 +1479,7 @@ ul.headlineDropdownMenu ul li:hover {
|
||||||
cursor : pointer;
|
cursor : pointer;
|
||||||
display : none;
|
display : none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.helpLinkPic {
|
||||||
|
float : right;
|
||||||
|
}
|
||||||
|
|
|
@ -552,7 +552,7 @@ function parse_runtime_info(elem) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k == "daemon_is_running" && v != 1) {
|
if (k == "daemon_is_running" && v != 1) {
|
||||||
notify("<span onclick=\"javascript:explainError(1)\">Warning: Update daemon is not runing.</span>", true, true);
|
notify("<span onclick=\"javascript:explainError(1)\">Update daemon is not runing.</span>", true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* var w = document.getElementById("noDaemonWarning");
|
/* var w = document.getElementById("noDaemonWarning");
|
||||||
|
|
Loading…
Reference in a new issue