@syncfusion/ej2-schedule
Advanced tools
Comparing version 16.4.42 to 16.4.44
@@ -7,2 +7,10 @@ # Changelog | ||
#### Bug Fixes | ||
- An issue with `quick popup` opening on blocked time ranges has been fixed. | ||
## 16.4.42 (2018-12-14) | ||
### Schedule | ||
#### New Features | ||
@@ -9,0 +17,0 @@ |
/*! | ||
* filename: index.d.ts | ||
* version : 16.4.42 | ||
* version : 16.4.44 | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"name": "@syncfusion/ej2-schedule", | ||
"version": "16.4.42", | ||
"version": "16.4.44", | ||
"author": "Syncfusion Inc.", | ||
@@ -12,9 +12,9 @@ "license": "SEE LICENSE IN license", | ||
"@syncfusion/ej2-data": "~16.4.42", | ||
"@syncfusion/ej2-popups": "~16.4.42", | ||
"@syncfusion/ej2-calendars": "~16.4.42", | ||
"@syncfusion/ej2-navigations": "~16.4.42", | ||
"@syncfusion/ej2-dropdowns": "~16.4.42", | ||
"@syncfusion/ej2-popups": "~16.4.44", | ||
"@syncfusion/ej2-calendars": "~16.4.44", | ||
"@syncfusion/ej2-navigations": "~16.4.44", | ||
"@syncfusion/ej2-dropdowns": "~16.4.44", | ||
"@syncfusion/ej2-buttons": "~16.4.42", | ||
"@syncfusion/ej2-inputs": "~16.4.42", | ||
"@syncfusion/ej2-lists": "~16.4.42" | ||
"@syncfusion/ej2-inputs": "~16.4.44", | ||
"@syncfusion/ej2-lists": "~16.4.44" | ||
}, | ||
@@ -21,0 +21,0 @@ "devDependencies": { |
@@ -19,3 +19,2 @@ import { CurrentAction } from '../base/type'; | ||
private excludeDateCheck; | ||
private checkBlockEvents; | ||
} |
@@ -53,3 +53,3 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base'; | ||
Crud.prototype.addEvent = function (eventData) { | ||
if (this.checkBlockEvents(eventData)) { | ||
if (this.parent.eventBase.isBlockRange(eventData)) { | ||
this.parent.quickPopup.openValidationError('blockAlert'); | ||
@@ -87,3 +87,3 @@ return; | ||
Crud.prototype.saveEvent = function (event, action) { | ||
if (this.checkBlockEvents(event)) { | ||
if (this.parent.eventBase.isBlockRange(event)) { | ||
this.parent.quickPopup.openValidationError('blockAlert'); | ||
@@ -281,29 +281,4 @@ return; | ||
}; | ||
Crud.prototype.checkBlockEvents = function (eventData) { | ||
var _this = this; | ||
var eventCollection = (eventData instanceof Array) ? eventData : [eventData]; | ||
var isBlockAlert = false; | ||
var fields = this.parent.eventFields; | ||
eventCollection.forEach(function (event) { | ||
var dataCol = []; | ||
if (!isNullOrUndefined(event[fields.recurrenceRule]) && isNullOrUndefined(event[fields.recurrenceID])) { | ||
dataCol = _this.parent.eventBase.generateOccurrence(event); | ||
} | ||
else { | ||
dataCol.push(event); | ||
} | ||
for (var _i = 0, dataCol_1 = dataCol; _i < dataCol_1.length; _i++) { | ||
var data = dataCol_1[_i]; | ||
var filterBlockEvents = _this.parent.eventBase.filterBlockEvents(data); | ||
if (filterBlockEvents.length > 0) { | ||
isBlockAlert = true; | ||
break; | ||
} | ||
} | ||
}); | ||
this.parent.uiStateValues.isBlock = isBlockAlert; | ||
return isBlockAlert; | ||
}; | ||
return Crud; | ||
}()); | ||
export { Crud }; |
@@ -108,2 +108,3 @@ var __extends = (this && this.__extends) || (function () { | ||
this.element.appendChild(this.createElement('div', { className: cls.TABLE_CONTAINER_CLASS })); | ||
this.activeViewOptions = this.getActiveViewOptions(); | ||
this.initializeResources(); | ||
@@ -1170,3 +1171,3 @@ }; | ||
Schedule.prototype.getCurrentViewDates = function () { | ||
return this.activeView.renderDates; | ||
return this.activeView ? this.activeView.renderDates : []; | ||
}; | ||
@@ -1173,0 +1174,0 @@ /** |
@@ -93,2 +93,3 @@ import { EventClickArgs, TdData } from '../base/interface'; | ||
}): string; | ||
isBlockRange(eventData: Object | Object[]): boolean; | ||
} |
@@ -745,4 +745,29 @@ import { isNullOrUndefined, closest, extend, EventHandler, uniqueID } from '@syncfusion/ej2-base'; | ||
}; | ||
EventBase.prototype.isBlockRange = function (eventData) { | ||
var _this = this; | ||
var eventCollection = (eventData instanceof Array) ? eventData : [eventData]; | ||
var isBlockAlert = false; | ||
var fields = this.parent.eventFields; | ||
eventCollection.forEach(function (event) { | ||
var dataCol = []; | ||
if (!isNullOrUndefined(event[fields.recurrenceRule]) && isNullOrUndefined(event[fields.recurrenceID])) { | ||
dataCol = _this.parent.eventBase.generateOccurrence(event); | ||
} | ||
else { | ||
dataCol.push(event); | ||
} | ||
for (var _i = 0, dataCol_1 = dataCol; _i < dataCol_1.length; _i++) { | ||
var data = dataCol_1[_i]; | ||
var filterBlockEvents = _this.parent.eventBase.filterBlockEvents(data); | ||
if (filterBlockEvents.length > 0) { | ||
isBlockAlert = true; | ||
break; | ||
} | ||
} | ||
}); | ||
this.parent.uiStateValues.isBlock = isBlockAlert; | ||
return isBlockAlert; | ||
}; | ||
return EventBase; | ||
}()); | ||
export { EventBase }; |
@@ -34,2 +34,3 @@ import { Dialog, Popup } from '@syncfusion/ej2-popups'; | ||
tapHoldEventPopup(e: Event): void; | ||
private isCellBlocked; | ||
private cellClick; | ||
@@ -36,0 +37,0 @@ private isSameEventClick; |
@@ -312,4 +312,15 @@ import { closest, EventHandler, isNullOrUndefined, formatUnit, append } from '@syncfusion/ej2-base'; | ||
}; | ||
QuickPopups.prototype.isCellBlocked = function (args) { | ||
var tempObj = {}; | ||
tempObj[this.parent.eventFields.startTime] = this.parent.activeCellsData.startTime; | ||
tempObj[this.parent.eventFields.endTime] = this.parent.activeCellsData.endTime; | ||
tempObj[this.parent.eventFields.isAllDay] = this.parent.activeCellsData.isAllDay; | ||
if (this.parent.activeViewOptions.group.resources.length > 0) { | ||
var targetCell = args.element instanceof Array ? args.element[0] : args.element; | ||
this.parent.resourceBase.setResourceValues(tempObj, true, parseInt(targetCell.getAttribute('data-group-index'), 10)); | ||
} | ||
return this.parent.eventBase.isBlockRange(tempObj); | ||
}; | ||
QuickPopups.prototype.cellClick = function (args) { | ||
if (!this.parent.showQuickInfo || this.parent.currentView === 'MonthAgenda') { | ||
if (!this.parent.showQuickInfo || this.parent.currentView === 'MonthAgenda' || this.isCellBlocked(args)) { | ||
this.quickPopupHide(); | ||
@@ -316,0 +327,0 @@ return; |
@@ -48,3 +48,3 @@ import { createElement, append, prepend, isNullOrUndefined, getValue, getDefaultDateObject, cldrData, addClass } from '@syncfusion/ej2-base'; | ||
eventContainer = createElement('div', { className: cls.APPOINTMENT_CONTAINER_CLASS }); | ||
if (!isNullOrUndefined(this.parent.resourceBase) && !this.parent.uiStateValues.isGroupAdaptive) { | ||
if (this.parent.resourceBase && !this.parent.uiStateValues.isGroupAdaptive && this.parent.resourceBase.renderedResources) { | ||
eventContainer.setAttribute('data-group-index', this.parent.resourceBase.renderedResources[row].groupIndex.toString()); | ||
@@ -51,0 +51,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10765861
107483