| 12042 | scheduler2.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler2.$keyboardNavigation.TimeSlot.prototype.keys); |
| 12043 | } |
| 12044 | function minical_button(scheduler2) { |
| 12045 | scheduler2.$keyboardNavigation.MinicalButton = function(div, index) { |
| 12046 | this.container = div; |
| 12047 | this.index = index || 0; |
| 12048 | }; |
| 12049 | scheduler2.$keyboardNavigation.MinicalButton.prototype = scheduler2._compose(scheduler2.$keyboardNavigation.KeyNavNode, { isValid: function() { |
| 12050 | var container = this.container; |
| 12051 | return !!container.offsetWidth; |
| 12052 | }, fallback: function() { |
| 12053 | var defaultSlot = new scheduler2.$keyboardNavigation.TimeSlot(); |
| 12054 | if (defaultSlot.isValid()) { |
| 12055 | return defaultSlot; |
| 12056 | } else { |
| 12057 | return new scheduler2.$keyboardNavigation.DataArea(); |
| 12058 | } |
| 12059 | }, focus: function() { |
| 12060 | scheduler2.$keyboardNavigation.dispatcher.globalNode.disable(); |
| 12061 | this.container.removeAttribute("tabindex"); |
| 12062 | scheduler2.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this); |
| 12063 | }, blur: function() { |
| 12064 | this.container.setAttribute("tabindex", "0"); |
| 12065 | scheduler2.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this); |
| 12066 | }, getNode: function() { |
| 12067 | if (!this.index) { |
| 12068 | return this.container.querySelector(".dhx_cal_prev_button"); |
| 12069 | } else { |
| 12070 | return this.container.querySelector(".dhx_cal_next_button"); |
| 12071 | } |
| 12072 | }, keys: { right: function(e) { |
| 12073 | this.moveTo(new scheduler2.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1)); |
| 12074 | }, left: function(e) { |
| 12075 | this.moveTo(new scheduler2.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1)); |
| 12076 | }, down: function() { |
| 12077 | var next = new scheduler2.$keyboardNavigation.MinicalCell(this.container, 0, 0); |
| 12078 | if (next && !next.isValid()) { |
| 12079 | next = next.fallback(); |
| 12080 | } |
| 12081 | this.moveTo(next); |
| 12082 | }, enter: function(e) { |
| 12083 | this.getNode().click(); |
| 12084 | } } }); |
| 12085 | scheduler2.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler2.$keyboardNavigation.MinicalButton.prototype.keys); |
| 12086 | } |
| 12087 | function minical_cell(scheduler2) { |
| 12088 | scheduler2.$keyboardNavigation.MinicalCell = function(div, row, col) { |
| 12089 | this.container = div; |