mirror of
https://github.com/moparisthebest/mail
synced 2024-12-23 15:58:49 -05:00
set ctrl f for find
This commit is contained in:
parent
49884d94d5
commit
71357c2ccc
@ -118,7 +118,7 @@ define(function(require) {
|
|||||||
//
|
//
|
||||||
|
|
||||||
var ngModule = angular.module('navigation', []);
|
var ngModule = angular.module('navigation', []);
|
||||||
ngModule.directive('keyShortcuts', function() {
|
ngModule.directive('keyShortcuts', function($timeout) {
|
||||||
return function(scope, elm) {
|
return function(scope, elm) {
|
||||||
elm.bind('keydown', function(e) {
|
elm.bind('keydown', function(e) {
|
||||||
// global state is not yet set, ignore keybaord shortcuts
|
// global state is not yet set, ignore keybaord shortcuts
|
||||||
@ -133,6 +133,14 @@ define(function(require) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
scope.state.writer.write();
|
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) {
|
} else if (modifier && e.keyCode === 82 && scope.state.writer && !scope.state.writer.open && scope.state.mailList.selected) {
|
||||||
// r -> reply
|
// r -> reply
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="search">
|
<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>
|
||||||
|
|
||||||
<div class="list-wrapper" ng-iscroll="state.nav.currentFolder.messages.length">
|
<div class="list-wrapper" ng-iscroll="state.nav.currentFolder.messages.length">
|
||||||
|
Loading…
Reference in New Issue
Block a user