1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-23 07:48:48 -05:00

set ctrl f for find

This commit is contained in:
Tankred Hase 2013-12-06 17:30:49 +01:00
parent 49884d94d5
commit 71357c2ccc
2 changed files with 10 additions and 2 deletions

View File

@ -118,7 +118,7 @@ define(function(require) {
//
var ngModule = angular.module('navigation', []);
ngModule.directive('keyShortcuts', function() {
ngModule.directive('keyShortcuts', function($timeout) {
return function(scope, elm) {
elm.bind('keydown', function(e) {
// global state is not yet set, ignore keybaord shortcuts
@ -133,6 +133,14 @@ define(function(require) {
e.preventDefault();
scope.state.writer.write();
} else if (modifier && e.keyCode === 70 && !scope.state.writer.open) {
// f -> find
e.preventDefault();
scope.state.mailList.searching = true;
$timeout(function() {
scope.state.mailList.searching = false;
}, 200);
} else if (modifier && e.keyCode === 82 && scope.state.writer && !scope.state.writer.open && scope.state.mailList.selected) {
// r -> reply
e.preventDefault();

View File

@ -5,7 +5,7 @@
</header>
<div class="search">
<input class="input-text input-search" type="search" results="5" ng-model="searchText" placeholder=" Filter...">
<input class="input-text input-search" type="search" results="5" ng-model="searchText" placeholder=" Filter..." focus-me="state.mailList.searching">
</div>
<div class="list-wrapper" ng-iscroll="state.nav.currentFolder.messages.length">