Skip to content
Snippets Groups Projects
Commit 702f30d7 authored by Eduard Moraru's avatar Eduard Moraru
Browse files

XWIKI-11366: Extended modalPopup.js to support specifying keyboard shortcut...

XWIKI-11366: Extended modalPopup.js to support specifying keyboard shortcut options for the defined actions
- Accepting keyboard shortcut 'options' map, for all the registered shortcuts of a defined action.
parent b66a91f9
No related branches found
No related tags found
No related merge requests found
...@@ -192,8 +192,9 @@ widgets.ModalPopup = Class.create({ ...@@ -192,8 +192,9 @@ widgets.ModalPopup = Class.create({
registerShortcuts : function(action) { registerShortcuts : function(action) {
var shortcuts = this.shortcuts[action].keys; var shortcuts = this.shortcuts[action].keys;
var method = this.shortcuts[action].method.bindAsEventListener(this, action); var method = this.shortcuts[action].method.bindAsEventListener(this, action);
var options = this.shortcuts[action].options;
for (var i = 0; i < shortcuts.size(); ++i) { for (var i = 0; i < shortcuts.size(); ++i) {
shortcut.add(shortcuts[i], method); shortcut.add(shortcuts[i], method, options);
} }
}, },
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment