| 10737 | }, junctionChar: ",", combinationChar: "+", commandKeys: { shift: 16, alt: 18, ctrl: 17, meta: true }, specialKeys: { backspace: 8, tab: 9, enter: 13, esc: 27, space: 32, up: 38, down: 40, left: 37, right: 39, home: 36, end: 35, pageup: 33, pagedown: 34, delete: 46, insert: 45, plus: 107, f1: 112, f2: 113, f3: 114, f4: 115, f5: 116, f6: 117, f7: 118, f8: 119, f9: 120, f10: 121, f11: 122, f12: 123 } }; |
| 10738 | } |
| 10739 | function eventhandler(scheduler2) { |
| 10740 | scheduler2.$keyboardNavigation.EventHandler = { _handlers: null, findHandler: function(command) { |
| 10741 | if (!this._handlers) |
| 10742 | this._handlers = {}; |
| 10743 | var shortcuts = scheduler2.$keyboardNavigation.shortcuts; |
| 10744 | var hash = shortcuts.getHash(command); |
| 10745 | return this._handlers[hash]; |
| 10746 | }, doAction: function(command, e) { |
| 10747 | var handler = this.findHandler(command); |
| 10748 | if (handler) { |
| 10749 | handler.call(this, e); |
| 10750 | if (e.preventDefault) |
| 10751 | e.preventDefault(); |
| 10752 | else |
| 10753 | e.returnValue = false; |
| 10754 | } |
| 10755 | }, bind: function(shortcut, handler) { |
| 10756 | if (!this._handlers) |
| 10757 | this._handlers = {}; |
| 10758 | var shortcuts = scheduler2.$keyboardNavigation.shortcuts; |
| 10759 | var commands = shortcuts.parse(shortcut); |
| 10760 | for (var i = 0; i < commands.length; i++) { |
| 10761 | this._handlers[shortcuts.getHash(commands[i])] = handler; |
| 10762 | } |
| 10763 | }, unbind: function(shortcut) { |
| 10764 | var shortcuts = scheduler2.$keyboardNavigation.shortcuts; |
| 10765 | var commands = shortcuts.parse(shortcut); |
| 10766 | for (var i = 0; i < commands.length; i++) { |
| 10767 | if (this._handlers[shortcuts.getHash(commands[i])]) { |
| 10768 | delete this._handlers[shortcuts.getHash(commands[i])]; |
| 10769 | } |
| 10770 | } |
| 10771 | }, bindAll: function(map) { |
| 10772 | for (var i in map) { |
| 10773 | this.bind(i, map[i]); |
| 10774 | } |
| 10775 | }, initKeys: function() { |
| 10776 | if (!this._handlers) |
| 10777 | this._handlers = {}; |
| 10778 | if (this.keys) { |
| 10779 | this.bindAll(this.keys); |
| 10780 | } |
| 10781 | } }; |
| 10782 | } |
| 10783 | function trap_modal_focus(scheduler2) { |
| 10784 | (function() { |
| 10785 | scheduler2.$keyboardNavigation.getFocusableNodes = scheduler2._getFocusableNodes; |