fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Wersja CSS do druku.
[redakcja.git]
/
project
/
static
/
js
/
views
/
xml.js
diff --git
a/project/static/js/views/xml.js
b/project/static/js/views/xml.js
index
d24dfa9
..
00547d1
100644
(file)
--- a/
project/static/js/views/xml.js
+++ b/
project/static/js/views/xml.js
@@
-98,20
+98,23
@@
var XMLView = View.extend({
getHotkey: function(event) {
var code = event.keyCode;
getHotkey: function(event) {
var code = event.keyCode;
+ if(!((code >= 97 && code <= 122)
+ || (code >= 65 && code <= 90)) ) return null;
+
var ch = String.fromCharCode(code & 0xff).toLowerCase();
var ch = String.fromCharCode(code & 0xff).toLowerCase();
- var button = $('.buttontoolbarview-button[title='+ch+']', this.element)[0]
+ /* # console.log(ch.charCodeAt(0), '#', buttons); */
- console.log(ch, '#', button);
+ var buttons = $('.buttontoolbarview-button[title='+ch+']', this.element);
var mod = 0;
if(event.altKey) mod |= 0x01;
if(event.ctrlKey) mod |= 0x02;
if(event.shiftKey) mod |= 0x04;
var mod = 0;
if(event.altKey) mod |= 0x01;
if(event.ctrlKey) mod |= 0x02;
if(event.shiftKey) mod |= 0x04;
- if(button) {
+ if(button
s.length
) {
var match = null;
var match = null;
-
$(button)
.each(function() {
+
buttons
.each(function() {
if( parseInt($(this).attr('ui:hotkey_mod')) == mod ) {
match = this;
return;
if( parseInt($(this).attr('ui:hotkey_mod')) == mod ) {
match = this;
return;
@@
-126,8
+129,7
@@
var XMLView = View.extend({
},
isHotkey: function() {
},
isHotkey: function() {
- console.log(arguments);
-
+ /* console.log(arguments); */
if(this.getHotkey.apply(this, arguments))
return true;
else
if(this.getHotkey.apply(this, arguments))
return true;
else