]> git.wh0rd.org Git - tt-rss.git/commitdiff
hotkey s stars/unstars selected article
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 1 Dec 2005 12:43:13 +0000 (13:43 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 1 Dec 2005 12:43:13 +0000 (13:43 +0100)
README
backend.php
viewfeed.js

diff --git a/README b/README
index 01bb0d26b180b277b6e4544ff30dabbadd062301..2dac46a9453f8de67850825daf82feaa1a08c899 100644 (file)
--- a/README
+++ b/README
@@ -34,6 +34,7 @@ Interface:
        "a" hides or shows only unread feeds in the feedlist;
        "j" move to previous feed
        "k" move to next feed
+       "s" star/unstar selected article
 
 Requirements:
        
index 9307f78adf4e7a653c8de7b5fd390dc64de12d97..6969b378383eb457e30b8792e8cb26215433d096 100644 (file)
        
                                if ($line["marked"] == "t" || $line["marked"] == "1") {
                                        $marked_pic = "<img id=\"FMARKPIC-$id\" src=\"images/mark_set.png\" 
-                                               alt=\"Reset mark\" onclick='javascript:toggleMark($id, false)'>";
+                                               alt=\"Reset mark\" onclick='javascript:toggleMark($id)'>";
                                } else {
                                        $marked_pic = "<img id=\"FMARKPIC-$id\" src=\"images/mark_unset.png\" 
-                                               alt=\"Set mark\" onclick='javascript:toggleMark($id, true)'>";
+                                               alt=\"Set mark\" onclick='javascript:toggleMark($id)'>";
                                }
        
                                $content_link = "<a href=\"javascript:view($id,$feed_id);\">" .
index 4aa7f4f5e0cc4ef254bb9ab172dc9fdf0b7b2a76..0dae392df3750041ad724b51078104db74641c0b 100644 (file)
@@ -77,13 +77,7 @@ function view(id, feed_id) {
 
 }
 
-function rowToggleMark(row) {
-
-
-
-}
-
-function toggleMark(id, toggle) {
+function toggleMark(id) {
 
        var f_document = parent.frames["feeds-frame"].document;
 
@@ -100,10 +94,10 @@ function toggleMark(id, toggle) {
 
 //     alert(vfeedu);
 
-       if (toggle == true) {
+       if (mark_img.alt != "Reset mark") {
                mark_img.src = "images/mark_set.png";
                mark_img.alt = "Reset mark";
-               mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+', false)');
+               mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+')');
                query = query + "&mark=1";
 
                if (vfeedu && crow.className.match("Unread")) {
@@ -113,7 +107,7 @@ function toggleMark(id, toggle) {
        } else {
                mark_img.src = "images/mark_unset.png";
                mark_img.alt = "Set mark";
-               mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+', true)');
+               mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+')');
                query = query + "&mark=0";
 
                if (vfeedu && crow.className.match("Unread")) {
@@ -224,6 +218,10 @@ function localHotkeyHandler(keycode) {
 //             return viewfeed(active_feed_id, active_offset, "ForceUpdate");
 //     }
 
+       if (keycode == 83) { // s
+               if (active_post_id) toggleMark(active_post_id);
+       }
+       
 //     alert("KC: " + keycode);
 
 }