diff options
| author | 2014-10-04 15:38:39 +0200 | |
|---|---|---|
| committer | 2014-10-04 15:38:39 +0200 | |
| commit | 0a60a1a71e32fa29518705a4f194c8025d8164bf (patch) | |
| tree | decacd78b29c45fb08b34e2e38f00f37d7b6e46e /p/scripts | |
| parent | 783171011dc6256f37cbd4365f5405b5e8a4b44e (diff) | |
| parent | 7a59568dfc20589c0495235679a96a375e36cfee (diff) | |
Merge pull request #653 from aledeg/fix-shortcut
Fix shortcut
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 2 | ||||
| -rw-r--r-- | p/scripts/shortcut.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 37281a907..02d16ca64 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -384,8 +384,6 @@ function collapse_entry() { } function user_filter(key) { - console.log('user filter'); - console.warn(key); var filter = $('#dropdown-query'); var filters = filter.siblings('.dropdown-menu').find('.item.query a'); if (typeof key === "undefined") { diff --git a/p/scripts/shortcut.js b/p/scripts/shortcut.js index debaffbaa..4137172c3 100644 --- a/p/scripts/shortcut.js +++ b/p/scripts/shortcut.js @@ -43,7 +43,9 @@ shortcut = { //Find Which key is pressed if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; - var character = String.fromCharCode(code).toLowerCase(); + if( code == 32 || (code >= 48 && code <= 90) || (code >= 96 && code <= 111) || (code >= 186 && code <= 192) || (code >= 219 && code <= 222)) { + var character = String.fromCharCode(code).toLowerCase(); + } if(code == 188) character=","; //If the user presses , when the type is onkeydown if(code == 190) character="."; //If the user presses , when the type is onkeydown |
