Changeset 1714

Show
Ignore:
Timestamp:
05/21/07 08:51:36 (16 months ago)
Author:
mbonetti
Message:

Added: shift-m (mark all shown items as read)

Location:
trunk/gregarius
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/feed.php

    r1671 r1714  
    13681368        define ('MARK_READ_FEED_FORM',$cid); 
    13691369    } 
    1370     echo "\n\n<form action=\"". getPath() ."feed.php\" method=\"post\">\n" 
     1370    echo "\n\n<form class=\"markReadForm\" action=\"". getPath() ."feed.php\" method=\"post\">\n" 
    13711371    ."\t<p><input id=\"_markReadButton\" type=\"submit\" name=\"action\" accesskey=\"m\" value=\"". __('Mark These Items as Read') ."\"/>\n" 
    13721372    ."\t<input type=\"hidden\" name=\"metaaction\" value=\"ACT_MARK_CHANNEL_READ\"/>\n" 
     
    13841384        define ('MARK_READ_FOLDER_FORM',$fid); 
    13851385    } 
    1386     echo "\n\n<form action=\"". getPath() ."feed.php\" method=\"post\">\n" 
     1386    echo "\n\n<form class=\"markReadForm\" action=\"". getPath() ."feed.php\" method=\"post\">\n" 
    13871387    ."\t<p><input id=\"_markReadButton\" type=\"submit\" name=\"action\" accesskey=\"m\" value=\"". __('Mark These Items as Read') ."\"/>\n" 
    13881388    ."\t<input type=\"hidden\" name=\"metaaction\" value=\"ACT_MARK_FOLDER_READ\"/>\n" 
     
    14011401        define ('MARK_READ_VFOLDER_FORM',$vfid); 
    14021402    } 
    1403     echo "\n\n<form action=\"". getPath() ."feed.php\" method=\"post\">\n" 
     1403    echo "\n\n<form class=\"markReadForm\" action=\"". getPath() ."feed.php\" method=\"post\">\n" 
    14041404    ."\t<p><input id=\"_markReadButton\" type=\"submit\" name=\"action\" accesskey=\"m\" value=\"". __('Mark These Items as Read') ."\"/>\n" 
    14051405    ."\t<input type=\"hidden\" name=\"metaaction\" value=\"ACT_MARK_VFOLDER_READ\"/>\n" 
  • trunk/gregarius/index.php

    r1704 r1714  
    231231    }    
    232232     
    233    echo "<form action=\"". getPath() ."\" method=\"post\">\n" 
     233   echo "<form class=\"markReadForm\" action=\"". getPath() ."\" method=\"post\">\n" 
    234234      ."<p><input accesskey=\"m\" type=\"submit\" name=\"action\" value=\"". __('Mark These Items as Read') ." \"/></p>\n" 
    235235      ."<p><input type=\"hidden\" name=\"metaaction\" value=\"ACT_MARK_READ\"/>\n" 
  • trunk/gregarius/plugins/keyboardnavigation.php

    r1713 r1714  
    2424 
    2525/// Name: Keyboard naviation 
    26 /// Author: Marco Bonetti 
     26/// Author: Marco Bonetti &amp; Chris J. Friesen 
    2727/// Description: Navigate between items without using your mouse. 
    2828/// Version: 0.4 
     
    5757        '__kbnav_ToggleFlag' => 'Toggle Flagged state of the current item', 
    5858        '__kbnav_NextMarkRead' => 'Mark current item as read, move to the next one', 
     59        '__kbnav_MarkAllRead' => 'Mark all shown items as read', 
    5960        '__kbnav_ScrollTop' => 'Scroll to the top of the window', 
    6061        '__kbnav_ToggleCollapse' => 'In the Lilina theme, toggle the collapsed state of the current item', 
     
    7374    if (!isset($kmap['__kbnav_ToggleFlag']['key'])) {$kmap['__kbnav_ToggleFlag']['key'] = 'f';} 
    7475    if (!isset($kmap['__kbnav_NextMarkRead']['key'])) {$kmap['__kbnav_NextMarkRead']['key'] = 'm';} 
     76    if (!isset($kmap['__kbnav_MarkAllRead']['key'])) { 
     77        $kmap['__kbnav_MarkAllRead']['key'] = 'm'; 
     78        $kmap['__kbnav_MarkAllRead']['modifier'] = 'shift'; 
     79    }    
    7580    if (!isset($kmap['__kbnav_ScrollTop']['key'])) {$kmap['__kbnav_ScrollTop']['key'] = 'h';} 
    7681    if (!isset($kmap['__kbnav_ToggleCollapse']['key'])) {$kmap['__kbnav_ToggleCollapse']['key'] = 'c';} 
     
    342347        return false; 
    343348    } 
     349    function __kbnav_MarkAllRead() { 
     350        var forms = document.getElementsByTagName('form'); 
     351        for(var i=0;i<forms.length;i++) { 
     352            if (forms[i].className == 'markReadForm') { 
     353                forms[i].submit(); 
     354                break; 
     355            } 
     356        } 
     357        return false; 
     358    } 
    344359     
    345360<?php