Changeset 1718

Show
Ignore:
Timestamp:
05/21/07 12:55:15 (3 years ago)
Author:
mbonetti
Message:

kbnav: edit tags of current item (t), ajax: fix to actually submit the
edited tags, duh.

Location:
trunk/gregarius
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/ajax.php

    r1717 r1718  
    262262                if (!e) { e = event; e.which = e.keyCode; } 
    263263                switch (e.which) { 
    264                  case 10: // return 
    265                  case 13: // enter 
    266                  setTags(id,control.value);  
    267                  return false; 
    268                  break; 
    269                  default: return true;   
     264                 case 10: case 13: _et(id); return false; break; 
     265                 default: return true;  break; 
    270266                } 
    271267          }; 
  • trunk/gregarius/plugins/keyboardnavigation.php

    r1716 r1718  
    6161        '__kbnav_OpenUrl' => 'Navigate to the URL of the current item', 
    6262        '__kbnav_OpenUrlNW' => 'Navigate to the URL of the current item in a new window',         
     63        '__kbnav_EditTags' => 'Edit tags of the current item',         
    6364    ); 
    6465} 
     
    8485        $kmap['__kbnav_OpenUrlNW']['modifier'] = 'shift'; 
    8586    } 
     87    if (!isset($kmap['__kbnav_EditTags']['key'])) {$kmap['__kbnav_EditTags']['key'] = 't';} 
    8688    return $kmap; 
    8789} 
     
    354356        return false; 
    355357    } 
    356      
     358    function __kbnav_EditTags() { 
     359        var r = __kbnav_CurrentItemData(); 
     360        if (null != r && r.id && 'function' == typeof(_et)) { 
     361            _et(r.id); 
     362        } 
     363    } 
    357364<?php 
    358365    flush();