fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bugfix
[redakcja.git]
/
src
/
redakcja
/
static
/
js
/
wiki
/
base.js
diff --git
a/src/redakcja/static/js/wiki/base.js
b/src/redakcja/static/js/wiki/base.js
index
ad0ca83
..
574dd59
100644
(file)
--- a/
src/redakcja/static/js/wiki/base.js
+++ b/
src/redakcja/static/js/wiki/base.js
@@
-249,10
+249,8
@@
var self = this;
/* bind buttons */
var self = this;
/* bind buttons */
- $('button[data-ui-action]', self.$elem).click(function(event) {
- event.preventDefault();
-
- var action = $(this).attr('data-ui-action');
+ function dataUiAction(elem) {
+ var action = $(elem).attr('data-ui-action');
console.log("Button pressed, action: ", action);
try {
console.log("Button pressed, action: ", action);
try {
@@
-263,6
+261,15
@@
if(action == 'cancel')
self.hide();
}
if(action == 'cancel')
self.hide();
}
+ }
+ $('button[data-ui-action]', self.$elem).click(function(event) {
+ event.preventDefault();
+ dataUiAction(this);
+ }).on('keydown', function(event) {
+ if (event.key == 'Enter') {
+ event.preventDefault();
+ dataUiAction(this);
+ }
});
}
});
}