Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions src/calendar/view/AbstractCalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ Ext.define('Extensible.calendar.view.AbstractCalendar', {

requires: [
'Ext.CompositeElement',
'Ext.EventObject',
'Extensible.calendar.form.EventDetails',
'Extensible.calendar.form.EventWindow',
'Extensible.calendar.menu.Event',
'Extensible.calendar.dd.DragZone',
'Extensible.calendar.dd.DropZone',
'Extensible.form.recurrence.RangeEditWindow'
],
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please discard whitespace-only changes prior to committing




/**
* @cfg {Ext.data.Store} eventStore
* The {@link Ext.data.Store store} which is bound to this calendar and contains {@link Extensible.calendar.data.EventModel EventRecords}.
Expand Down Expand Up @@ -570,6 +572,8 @@ viewConfig: {

this.on('resize', this.onResize, this);

Ext.getBody().on('keyup', this.onKeyUp, this);

this.el.on({
'mouseover': this.onMouseOver,
'mouseout': this.onMouseOut,
Expand Down Expand Up @@ -1878,7 +1882,8 @@ Ext.override(Extensible.calendar.view.AbstractCalendar, {
}

me.eventMenu.showForEvent(me.getEventRecordFromEl(el), el, xy);
me.menuActive = true;
me.menuActive = true;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing, this line is just whitespace

},

// private
Expand Down Expand Up @@ -2076,7 +2081,8 @@ Ext.override(Extensible.calendar.view.AbstractCalendar, {
// ignore the first click if a context menu is active (let it close)
me.menuActive = false;
return true;
}
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing

if (el) {
var id = me.getEventIdFromEl(el),
rec = me.getEventRecord(id);
Expand Down Expand Up @@ -2108,6 +2114,13 @@ Ext.override(Extensible.calendar.view.AbstractCalendar, {
}
},

// private
onKeyUp: function(e, t) {
if (e.getCharCode( ) === Ext.EventObject.ESC) {
this.menuActive = false;
}
},

// private
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but please stick to 4-char indentation for consistency with the existing code.

handleEventMouseEvent: function(e, t, type) {
var el = e.getTarget(this.eventSelector, this.eventSelectorDepth, true);
Expand Down