]> git.wh0rd.org Git - tt-rss.git/commitdiff
add SQL expression help and placeholder for help mechanism
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 16 Oct 2005 15:17:12 +0000 (16:17 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 16 Oct 2005 15:17:12 +0000 (16:17 +0100)
backend.php
functions.js
tt-rss.css
tt-rss_compact.css

index 41b2c29db905c81ffd78f2c1caeb8f177f357486..3975cd3b72f4f831084166f6afa83322ecc5efec 100644 (file)
                print "<p><table width=\"100%\" class=\"prefLabelList\" id=\"prefLabelList\">";
 
                print "<tr class=\"title\">
-                                       <td width=\"5%\">Select</td><td width=\"40%\">SQL expression</td>
+                                       <td width=\"5%\">Select</td><td width=\"40%\">SQL expression
+                                       <a class=\"helpLink\" href=\"javascript:popupHelp(1)\">(?)</a>
+                                       </td>
                                        <td width=\"40%\">Caption</td></tr>";
                
                $lnum = 0;
                print "</div>";
        }
 
+       if ($op == "help") {
+               print "<html><head>
+                       <title>Tiny Tiny RSS : Help</title>
+                       <link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">
+                       <script type=\"text/javascript\" src=\"functions.js\"></script>
+                       <script type=\"text/javascript\" src=\"feedlist.js\"></script>
+                       <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
+                       </head><body>";
+
+               $tid = sprintf("%d", $_GET["tid"]);
+
+               /* FIXME this badly needs real implementation */
+
+               print "<div class='helpResponse'>";
+
+               ?>
+
+               <h1>Help for 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 most fields of ttrss_entries table
+                       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 "</body></html>";
+
+       }
+
        db_close($link);
 ?>
index 323d7d8af4060bf35923d68510fe26be1c460d06..5bf5e6973c102f8c960e20bb5942326e7a677306 100644 (file)
@@ -356,3 +356,9 @@ function update_label_counters(feed) {
                xmlhttp_rpc.send(null);
        }
 }
+
+function popupHelp(tid) {
+       var w = window.open("backend.php?op=help&tid=" + tid,
+               "Popup Help", 
+               "menubar=no,location=no,resizable=yes,scrollbars=yes,status=no");
+}
index 2a9af4ae66fad0f3c893d1ca117e8d89123a8e93..5c81a3154bb2571d2db0337898c45a259b6ff19f 100644 (file)
@@ -352,3 +352,38 @@ table.prefFeedList tr.title td, table.prefFilterList tr.title td,
        border-style : solid;
 }
 
+a.helpLink {
+       color : #808080;
+}
+
+a.helpLink:hover {
+       color : #5050aa;
+}
+
+div.helpResponse {
+       margin : 10px;
+       background-image : url("images/vgrad_light_rev2.png");
+       background-position : top left;
+       background-repeat : repeat-x;
+       padding : 10px 20px 10px 20px;
+       border : 1px solid #f0f0f0;
+}
+
+div.helpResponse h1 {
+       border-width : 0px 0px 1px 0px;
+       border-style : solid;
+       border-color : #c0c0c0;
+       font-size : 16pt;
+}
+
+div.helpResponse h2 {
+       border-width : 0px 0px 0px 0px;
+       font-size : 12pt;
+
+}
+
+pre {
+       border : 1px solid #c0c0c0;
+       padding : 5px;
+       background : #f0f0f0;
+}
index 7f49402de201a284cb245f10c9ea812702401008..cef4e47dcb44509739be0776d9336f03f02f6677 100644 (file)
@@ -379,3 +379,38 @@ table.prefFeedList tr.title td, table.prefFilterList tr.title td,
        font-size:9pt;
 }
 
+a.helpLink {
+       color : #808080;
+}
+
+a.helpLink:hover {
+       color : #5050aa;
+}
+
+div.helpResponse {
+       margin : 10px;
+       background-image : url("images/vgrad_light_rev2.png");
+       background-position : top left;
+       background-repeat : repeat-x;
+       padding : 10px 20px 10px 20px;
+       border : 1px solid #f0f0f0;
+}
+
+div.helpResponse h1 {
+       border-width : 0px 0px 1px 0px;
+       border-style : solid;
+       border-color : #c0c0c0;
+       font-size : 16pt;
+}
+
+div.helpResponse h2 {
+       border-width : 0px 0px 0px 0px;
+       font-size : 12pt;
+
+}
+
+pre {
+       border : 1px solid #c0c0c0;
+       padding : 5px;
+       background : #f0f0f0;
+}