]> git.wh0rd.org - tt-rss.git/commitdiff
interface tweaks, add info/question/exclamation pics
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 2 Mar 2007 19:16:45 +0000 (20:16 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 2 Mar 2007 19:16:45 +0000 (20:16 +0100)
13 files changed:
functions.js
functions.php
help/1.php
help/2.php [new file with mode: 0644]
images/sign_excl.png [new file with mode: 0644]
images/sign_info.png [new file with mode: 0644]
images/sign_quest.png [new file with mode: 0644]
modules/pref-feeds.php
modules/pref-filters.php
modules/pref-labels.php
modules/pref-prefs.php
tt-rss.css
tt-rss.js

index 991c0715da6dd55f66f021cdfd8d161aae3176c4..da12a3c366f669cbe72e4e052e0a759e59ba034b 100644 (file)
@@ -155,11 +155,13 @@ function notify_real(msg, doc, no_hide, is_err) {
 //             n.style.backgroundColor = "#ffcccc";
 //             n.style.color = "black";
 //             n.style.borderColor = "#ff0000";
+               msg = "<img src='images/sign_excl.png'> " + msg;
        } else {
                n.className = "notify";
 //             n.style.backgroundColor = "#fff7d5";
 //             n.style.borderColor = "#d7c47a";
 //             n.style.color = "black";
+               msg = "<img src='images/sign_info.png'> " + msg;
        }
 
 //     msg = "<img src='images/live_com_loading.gif'> " + msg;
@@ -1396,7 +1398,7 @@ function toggleSubmitNotEmpty(e, submit_id) {
 }
 
 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() {
index 10b45d29977274eb0ae65bf138c67148d285ee0c..9733747014cc28480d309775082d95556c63971c 100644 (file)
 
                        if (version_compare(VERSION, $latest_version) == -1) {
                                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>
-                                               <div id=\"milestoneDetails\">$content</div></div>";
+                                               <div id=\"milestoneDetails\">$content</div>");
                                } else {
                                        return "New version of Tiny-Tiny RSS ($latest_version) is available:
                                                <div class='milestoneDetails'>$content</div>
                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>";
+       }
+
 ?>
index 309783f436ec4115068941171ae9682c5b9eeaf2..fc7c2003d01ed41ab35346a3267511a695257c05 100644 (file)
@@ -1,12 +1,6 @@
-<h1>Help for SQL expressions</h1>
+<h1>Labels and SQL Expressions</h1>
 
-<h2>Description</h2>
-
-<p>The &laquo;SQL expression&raquo; 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>
+<p>Labels are generated by using SQL expressions. The &laquo;SQL expression&raquo; 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>
        
 <h2>Examples</h2>
 
diff --git a/help/2.php b/help/2.php
new file mode 100644 (file)
index 0000000..83cf5d4
--- /dev/null
@@ -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>
+
diff --git a/images/sign_excl.png b/images/sign_excl.png
new file mode 100644 (file)
index 0000000..c20b0cb
Binary files /dev/null and b/images/sign_excl.png differ
diff --git a/images/sign_info.png b/images/sign_info.png
new file mode 100644 (file)
index 0000000..bfd2759
Binary files /dev/null and b/images/sign_info.png differ
diff --git a/images/sign_quest.png b/images/sign_quest.png
new file mode 100644 (file)
index 0000000..d26e577
Binary files /dev/null and b/images/sign_quest.png differ
index 3b5ed89d43dbb24cf498ad26de719fbe70dd2721..d1ef0eae0905b282257b2600bc8efe8005f04569 100644 (file)
                        }
 
                        if (count($subscribed) > 0) {
-                               print "<div class=\"notice\">";
-                               print "<b>Subscribed to feeds:</b>";
-                               print "<ul class=\"nomarks\">";
+                               $msg = "<b>Subscribed to feeds:</b>".
+                                       "<ul class=\"nomarks\">";
+
                                foreach ($subscribed as $title) {
-                                       print "<li>$title</li>";
+                                       $msg .= "<li>$title</li>";
                                }
-                               print "</ul>";
-                               print "</div>";
+                               $msg .= "</ul>";
+
+                               print format_notice($msg);
                        }
                }               
 
                                }
 
                                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 {
-                                       print "<div class=\"warning\">
-                                               Already subscribed to <b>$feed_url</b>.
-                                       </div>";
+                                       print format_warning("Already subscribed to <b>$feed_url</b>.");
                                }
 
                                if ($p_from != 'tt-rss') {
        
                                        } else {
        
-                                               print "<div class=\"warning\">
-                                                       Category <b>$feed_cat</b> already exists in the database.
-                                               </div>";
+                                               print format_warning("Category <b>$feed_cat</b> already exists in the database.");
                                        }
 
                                }
                                                                WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]);
                                                } else {
        
-                                                       print "<div class=\"warning\">
-                                                               Unable to delete non empty feed categories.</div>";
+                                                       print format_warning("Unable to delete non empty feed categories.");
                                                                
                                                }
        
index 052c5d44a187754bc86730288ccef905bea98e13..e348fe69cb6df6cbe562490b24158d7b19edd5fd 100644 (file)
                        $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\" 
                        class=\"button\" 
                        onclick=\"return displayDlg('quickAddFilter', false)\" 
 
                        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\">
                                First matching filter is used, filtering is performed
index 94e306a2176d00965e623048fc6d83e71ef20d40..3b7d7f79f55ded062a663441a32968ffe7a1272b 100644 (file)
                        $sort = "description";
                }
 
+               print "<a class='helpLinkPic' href=\"javascript:displayHelpInfobox(1)\">
+                       <img src='images/sign_quest.png'></a>";
+
                print "<div class=\"prefGenericAddBox\">";
 
                print"<input type=\"submit\" class=\"button\" 
                                                <td width=\"5%\">&nbsp;</td>
                                                <td width=\"30%\"><a href=\"javascript:updateLabelList('description')\">Caption</a></td>
                                                <td width=\"50%\"><a href=\"javascript:updateLabelList('sql_exp')\">SQL Expression</a>
-                                               <a class=\"helpLink\" href=\"javascript:displayHelpInfobox(1)\">(?)</a>
                                                </td>
                                                </tr>";
                        
index 524ab5a6b0c0655846823d319a86901092965003..fd796bcc13a8e2da99eda4592a4ce4c2469de74a 100644 (file)
                                                pwd_hash = 'SHA1:".sha1("password")."')");
 
                                if (db_num_rows($result) != 0) {
-                                       print "<div class=\"warning\"> 
-                                               Your password is at default value, please change it.
-                                       </div>";
+                                       print format_warning("Your password is at default value, please change it.");
                                }
 
                                if ($_SESSION["pwd_change_result"] == "failed") {
-                                       print "<div class=\"warning\"> 
-                                                       There was an error while changing your password.
-                                               </div>";
+                                       print format_warning("Could not change the password.");
                                }
 
                                if ($_SESSION["pwd_change_result"] == "ok") {
-                                       print "<div class=\"notice\"> 
-                                                       Password changed successfully.
-                                               </div>";
+                                       print format_notice("Password was changed.");
                                }
 
                                $_SESSION["pwd_change_result"] = "";
 
                                if ($_SESSION["prefs_op_result"] == "reset-to-defaults") {
-                                       print "<div class=\"notice\"> 
-                                                       Your configuration was reset to defaults.
-                                               </div>";
+                                       print format_notice("The configuration was reset to defaults.");
                                }
 
                                if ($_SESSION["prefs_op_result"] == "save-config") {
-                                       print "<div class=\"notice\"> 
-                                                       Your configuration was saved successfully.
-                                               </div>";
+                                       print format_notice("The configuration was saved.");
                                }
 
                                $_SESSION["prefs_op_result"] = "";
index 37c222810f9364a2dee51e0927daae09a9fb40eb..73c47598847644fc837f0c35cf17adda3026af71 100644 (file)
@@ -229,12 +229,15 @@ input.editbox {
        display : none;
        float : right;
        font-size : 9pt;
-       text-align : center;
        z-index : 999;
        -moz-border-radius : 2px;
        padding : 5px 5px 5px 5px;
 }
 
+#notify img {
+       vertical-align : middle;
+}
+
 .notify {
        border-color : #d7c47a;
        background-color : #fff7d5;
@@ -566,20 +569,28 @@ div.prefsTabSelected {
        text-align : center;
 }
 
+div.notice {
+       background : #ffffff;
+       border : 1px solid #88b0f0;
+       width : 50%;
+       padding : 5px;
+       margin : 0px 0px 5px 0px;
+       font-size : 9pt;
+}
+
 div.warning {
        background : #fff7d5;
        border : 1px solid #d7c47a;
+       font-size : 9pt;
+       width : 50%;
        padding : 5px;
        margin : 0px 0px 5px 0px;
-       font-size : 9pt;
 }
 
-div.notice {
-       background : #ffffff;
-       border : 1px solid #88b0f0;
+
+div.warning img, div.notice img {
+       vertical-align : middle;
        padding : 5px;
-       margin : 0px 0px 5px 0px;
-       font-size : 9pt;
 }
 
 div.error {
@@ -1468,3 +1479,7 @@ ul.headlineDropdownMenu ul li:hover {
        cursor : pointer;
        display : none;
 }
+
+a.helpLinkPic {
+       float : right;
+}
index 32c8c7665c0415908e2be4814e89b3ce950731b3..b9f3af113343ddeaa9ce94499924aa038e89ee41 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -552,7 +552,7 @@ function parse_runtime_info(elem) {
                }
 
                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");