@syncfusion/ej2-schedule
Advanced tools
Comparing version 16.3.23 to 16.3.24
@@ -5,2 +5,16 @@ # Changelog | ||
### Schedule | ||
#### Bug Fixes | ||
- Misalignment issue with header cells of timeline views in Safari browser has been fixed. | ||
## 16.3.23 (2018-10-03) | ||
### Schedule | ||
#### Bug Fixes | ||
- An issue with scheduler throwing script error while rendering it as hidden element has been fixed. | ||
## 16.3.17 (2018-09-12) | ||
@@ -7,0 +21,0 @@ |
/*! | ||
* filename: index.d.ts | ||
* version : 16.3.23 | ||
* version : 16.3.24 | ||
* 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.3.23", | ||
"version": "16.3.24", | ||
"author": "Syncfusion Inc.", | ||
@@ -10,11 +10,11 @@ "license": "SEE LICENSE IN license", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~16.3.21", | ||
"@syncfusion/ej2-data": "~16.3.22", | ||
"@syncfusion/ej2-popups": "~16.3.21", | ||
"@syncfusion/ej2-calendars": "~16.3.21", | ||
"@syncfusion/ej2-navigations": "~16.3.23", | ||
"@syncfusion/ej2-dropdowns": "~16.3.23", | ||
"@syncfusion/ej2-buttons": "~16.3.21", | ||
"@syncfusion/ej2-inputs": "~16.3.22", | ||
"@syncfusion/ej2-lists": "~16.3.23" | ||
"@syncfusion/ej2-base": "~16.3.24", | ||
"@syncfusion/ej2-data": "~16.3.24", | ||
"@syncfusion/ej2-popups": "~16.3.24", | ||
"@syncfusion/ej2-calendars": "~16.3.24", | ||
"@syncfusion/ej2-navigations": "~16.3.24", | ||
"@syncfusion/ej2-dropdowns": "~16.3.24", | ||
"@syncfusion/ej2-buttons": "~16.3.24", | ||
"@syncfusion/ej2-inputs": "~16.3.24", | ||
"@syncfusion/ej2-lists": "~16.3.24" | ||
}, | ||
@@ -21,0 +21,0 @@ "devDependencies": { |
@@ -40,3 +40,2 @@ import { Schedule } from '../base/schedule'; | ||
private getTopValue(date, day, resource); | ||
private getAppointmentHeight(cellHeight, startDate, endDate); | ||
private getOverlapIndex(record, day, isAllDay, resource); | ||
@@ -43,0 +42,0 @@ private adjustOverlapElements(args); |
@@ -361,16 +361,8 @@ var __extends = (this && this.__extends) || (function () { | ||
var schedule = util.getStartEndHours(currentDate, this.startHour, this.endHour); | ||
if (eStart <= eEnd && !(eStart.getTime() >= schedule.endHour.getTime() || eEnd.getTime() <= schedule.startHour.getTime())) { | ||
var appHeight = 0; | ||
if (schedule.endHour.getTime() <= eEnd.getTime() && schedule.startHour.getTime() >= eStart.getTime()) { | ||
appHeight = this.getAppointmentHeight(this.cellHeight, schedule.startHour, schedule.endHour); | ||
} | ||
else if (schedule.endHour.getTime() <= eEnd.getTime()) { | ||
appHeight = this.getAppointmentHeight(this.cellHeight, eStart, schedule.endHour); | ||
} | ||
else if (schedule.startHour.getTime() >= eStart.getTime()) { | ||
appHeight = this.getAppointmentHeight(this.cellHeight, schedule.startHour, eEnd); | ||
} | ||
else { | ||
appHeight = (eEnd.getTime() - eStart.getTime()) / (60 * 1000) * (this.cellHeight * this.slotCount) / this.interval; | ||
} | ||
var isHourRange = eEnd.getTime() > schedule.startHour.getTime() && eStart.getTime() < schedule.endHour.getTime(); | ||
var isSameRange = schedule.startHour.getTime() <= eStart.getTime() && | ||
eventObj[this.fields.startTime].getTime() >= schedule.startHour.getTime() && | ||
eventObj[this.fields.endTime].getTime() < schedule.endHour.getTime() && eStart.getTime() === eEnd.getTime(); | ||
if (eStart <= eEnd && (isHourRange || isSameRange)) { | ||
var appHeight = (eEnd.getTime() - eStart.getTime()) / (60 * 1000) * (this.cellHeight * this.slotCount) / this.interval; | ||
appHeight = (appHeight < this.cellHeight) ? this.cellHeight : appHeight; | ||
@@ -436,5 +428,2 @@ if (eStart.getTime() > schedule.startHour.getTime()) { | ||
}; | ||
VerticalEvent.prototype.getAppointmentHeight = function (cellHeight, startDate, endDate) { | ||
return (((endDate.getTime() - startDate.getTime()) / (1000 * 60)) / (this.interval / this.slotCount)) * cellHeight; | ||
}; | ||
VerticalEvent.prototype.getOverlapIndex = function (record, day, isAllDay, resource) { | ||
@@ -441,0 +430,0 @@ var _this = this; |
@@ -36,3 +36,2 @@ import { Dialog, Popup } from '@syncfusion/ej2-popups'; | ||
private isSameEventClick(events); | ||
private getInnerHtmlFromElements(elements); | ||
private eventClick(events); | ||
@@ -39,0 +38,0 @@ private getResourceText(args, type); |
@@ -327,17 +327,20 @@ import { closest, EventHandler, isNullOrUndefined, formatUnit, append } from '@syncfusion/ej2-base'; | ||
var cellDetails = this.getFormattedString(temp); | ||
var headerTemplate; | ||
var quickCellPopup = createElement('div', { className: cls.CELL_POPUP_CLASS }); | ||
var templateArgs = extend({}, temp, { elementType: 'cell' }, true); | ||
if (this.parent.quickInfoTemplates.header) { | ||
headerTemplate = this.getInnerHtmlFromElements(this.parent.getQuickInfoTemplatesHeader()(templateArgs)); | ||
append(this.parent.getQuickInfoTemplatesHeader()(templateArgs), quickCellPopup); | ||
} | ||
if (!headerTemplate) { | ||
headerTemplate = "<div class=\"" + cls.POPUP_HEADER_CLASS + "\"><div class=\"" + cls.POPUP_HEADER_ICON_WRAPPER + "\">" + | ||
("<button class=\"" + cls.CLOSE_CLASS + "\" title=\"" + this.l10n.getConstant('close') + "\"></button></div></div>"); | ||
else { | ||
var headerTemplate = createElement('div', { | ||
className: cls.POPUP_HEADER_CLASS, | ||
innerHTML: "<div class=\"" + cls.POPUP_HEADER_ICON_WRAPPER + "\">" + | ||
("<button class=\"" + cls.CLOSE_CLASS + "\" title=\"" + this.l10n.getConstant('close') + "\"></button></div>") | ||
}); | ||
quickCellPopup.appendChild(headerTemplate); | ||
} | ||
var contentTemplate; | ||
if (this.parent.quickInfoTemplates.content) { | ||
contentTemplate = this.getInnerHtmlFromElements(this.parent.getQuickInfoTemplatesContent()(templateArgs)); | ||
append(this.parent.getQuickInfoTemplatesContent()(templateArgs), quickCellPopup); | ||
} | ||
if (!contentTemplate) { | ||
contentTemplate = "<div class=\"" + cls.POPUP_CONTENT_CLASS + "\"><table class=\"" + cls.POPUP_TABLE_CLASS + "\"><tbody><tr><td>" + | ||
else { | ||
var tempStr = "<table class=\"" + cls.POPUP_TABLE_CLASS + "\"><tbody><tr><td>" + | ||
("<form class=\"" + cls.FORM_CLASS + "\" onsubmit=\"return false;\"><input class=\"" + cls.SUBJECT_CLASS + " " + EVENT_FIELD + "\" type=\"text\" ") + | ||
@@ -349,16 +352,20 @@ ("name=\"" + this.parent.eventFields.subject + "\" /></form></td></tr><tr><td><div class=\"" + cls.DATE_TIME_CLASS + "\">") + | ||
("<div class=\"" + cls.RESOURCE_ICON_CLASS + " " + cls.ICON + " \"></div><div class=\"" + cls.RESOURCE_DETAILS_CLASS + " ") + | ||
(cls.TEXT_ELLIPSIS + "\">" + this.getResourceText(args, 'cell') + "</div></div>") : '') + "</td></tr></tbody></table></div>"); | ||
(cls.TEXT_ELLIPSIS + "\">" + this.getResourceText(args, 'cell') + "</div></div>") : '') + "</td></tr></tbody></table>"); | ||
var contentTemplate = createElement('div', { | ||
className: cls.POPUP_CONTENT_CLASS, innerHTML: tempStr | ||
}); | ||
quickCellPopup.appendChild(contentTemplate); | ||
} | ||
var footerTemplate; | ||
if (this.parent.quickInfoTemplates.footer) { | ||
footerTemplate = this.getInnerHtmlFromElements(this.parent.getQuickInfoTemplatesFooter()(templateArgs)); | ||
append(this.parent.getQuickInfoTemplatesFooter()(templateArgs), quickCellPopup); | ||
} | ||
if (!footerTemplate) { | ||
footerTemplate = "<div class=\"" + cls.POPUP_FOOTER_CLASS + "\"><button class=\"" + (cls.QUICK_POPUP_EVENT_DETAILS_CLASS + ' ' + | ||
cls.TEXT_ELLIPSIS) + "\" title=\"" + this.l10n.getConstant('moreDetails') + "\">" + this.l10n.getConstant('moreDetails') + "</button>" + | ||
("<button class=\"" + cls.EVENT_CREATE_CLASS + " " + cls.TEXT_ELLIPSIS + "\" title=\"" + this.l10n.getConstant('save') + "\">") + | ||
(this.l10n.getConstant('save') + "</button></div>"); | ||
else { | ||
var footerTemplate = createElement('div', { | ||
className: cls.POPUP_FOOTER_CLASS, innerHTML: "<button class=\"" + (cls.QUICK_POPUP_EVENT_DETAILS_CLASS + ' ' + | ||
cls.TEXT_ELLIPSIS) + "\" title=\"" + this.l10n.getConstant('moreDetails') + "\">" + this.l10n.getConstant('moreDetails') + "</button>" + | ||
("<button class=\"" + cls.EVENT_CREATE_CLASS + " " + cls.TEXT_ELLIPSIS + "\" title=\"" + this.l10n.getConstant('save') + "\">") + | ||
(this.l10n.getConstant('save') + "</button>") | ||
}); | ||
quickCellPopup.appendChild(footerTemplate); | ||
} | ||
var cellTemplate = headerTemplate + contentTemplate + footerTemplate; | ||
var quickCellPopup = createElement('div', { className: cls.CELL_POPUP_CLASS, innerHTML: cellTemplate }); | ||
var subjectElement = quickCellPopup.querySelector('.' + cls.SUBJECT_CLASS); | ||
@@ -406,7 +413,2 @@ if (subjectElement) { | ||
}; | ||
QuickPopups.prototype.getInnerHtmlFromElements = function (elements) { | ||
var tempEle = createElement('div'); | ||
append(elements, tempEle); | ||
return tempEle.innerHTML; | ||
}; | ||
QuickPopups.prototype.eventClick = function (events) { | ||
@@ -429,21 +431,24 @@ if (this.parent.eventTooltip) { | ||
var args = this.getFormattedString(eventData); | ||
var headerTemplate = void 0; | ||
var quickEventPopup = createElement('div', { className: cls.EVENT_POPUP_CLASS }); | ||
var templateArgs = extend({}, eventData, { elementType: 'event' }, true); | ||
if (this.parent.quickInfoTemplates.header) { | ||
headerTemplate = this.getInnerHtmlFromElements(this.parent.getQuickInfoTemplatesHeader()(templateArgs)); | ||
append(this.parent.getQuickInfoTemplatesHeader()(templateArgs), quickEventPopup); | ||
} | ||
if (!headerTemplate) { | ||
headerTemplate = "<div class=\"" + cls.POPUP_HEADER_CLASS + "\"><div class=\"" + cls.POPUP_HEADER_ICON_WRAPPER + "\">" + | ||
("<button class=\"" + (cls.EDIT_CLASS + ' ' + cls.ICON) + "\" title=\"" + this.l10n.getConstant('edit') + "\"></button>") + | ||
("<button class=\"" + (cls.DELETE_CLASS + ' ' + cls.ICON) + "\" title=\"" + this.l10n.getConstant('delete') + "\"></button>") + | ||
("<button class=\"" + cls.CLOSE_CLASS + "\" title=\"" + this.l10n.getConstant('close') + "\"></button></div>") + | ||
("<div class=\"" + cls.SUBJECT_WRAP + "\"><div class=\"" + cls.SUBJECT_CLASS + " " + cls.TEXT_ELLIPSIS + "\" ") + | ||
("title=\"" + args.eventSubject + "\">" + args.eventSubject + "</div></div ></div>"); | ||
else { | ||
var headerTemplate = createElement('div', { | ||
className: cls.POPUP_HEADER_CLASS, | ||
innerHTML: "<div class=\"" + cls.POPUP_HEADER_ICON_WRAPPER + "\">" + | ||
("<button class=\"" + (cls.EDIT_CLASS + ' ' + cls.ICON) + "\" title=\"" + this.l10n.getConstant('edit') + "\"></button>") + | ||
("<button class=\"" + (cls.DELETE_CLASS + ' ' + cls.ICON) + "\" title=\"" + this.l10n.getConstant('delete') + "\"></button>") + | ||
("<button class=\"" + cls.CLOSE_CLASS + "\" title=\"" + this.l10n.getConstant('close') + "\"></button></div>") + | ||
("<div class=\"" + cls.SUBJECT_WRAP + "\"><div class=\"" + cls.SUBJECT_CLASS + " " + cls.TEXT_ELLIPSIS + "\" ") + | ||
("title=\"" + args.eventSubject + "\">" + args.eventSubject + "</div></div >") | ||
}); | ||
quickEventPopup.appendChild(headerTemplate); | ||
} | ||
var contentTemplate = void 0; | ||
if (this.parent.quickInfoTemplates.content) { | ||
contentTemplate = this.getInnerHtmlFromElements(this.parent.getQuickInfoTemplatesContent()(templateArgs)); | ||
append(this.parent.getQuickInfoTemplatesContent()(templateArgs), quickEventPopup); | ||
} | ||
if (!contentTemplate) { | ||
contentTemplate = "<div class=\"" + cls.POPUP_CONTENT_CLASS + "\"><div class=\"" + cls.DATE_TIME_CLASS + "\">" + | ||
else { | ||
var tempStr = "<div class=\"" + cls.DATE_TIME_CLASS + "\">" + | ||
("<div class=\"" + cls.DATE_TIME_ICON_CLASS + " " + cls.ICON + "\"></div><div class=\"" + cls.DATE_TIME_WRAPPER_CLASS + " ") + | ||
@@ -463,19 +468,23 @@ (cls.TEXT_ELLIPSIS + "\"><div class=\"" + cls.DATE_TIME_DETAILS_CLASS + " " + cls.TEXT_ELLIPSIS + "\">" + args.details + "</div>") + | ||
(cls.TEXT_ELLIPSIS + "\">" + eventData[this.parent.eventFields.description] + "</div></div>") : '')) + | ||
((this.parent.resources.length > 0 ? "<div class=\"" + cls.RESOURCE_CLASS + "\"><div class=\"" + | ||
("" + (this.parent.resources.length > 0 ? "<div class=\"" + cls.RESOURCE_CLASS + "\"><div class=\"" + | ||
(cls.RESOURCE_ICON_CLASS + " " + cls.ICON + "\"></div><div class=\"" + cls.RESOURCE_DETAILS_CLASS + " " + cls.TEXT_ELLIPSIS + "\">") + | ||
(this.getResourceText(events, 'event') + "</div></div>") : '') + "</div>"); | ||
(this.getResourceText(events, 'event') + "</div></div>") : '')); | ||
var contentTemplate = createElement('div', { | ||
className: cls.POPUP_CONTENT_CLASS, innerHTML: tempStr | ||
}); | ||
quickEventPopup.appendChild(contentTemplate); | ||
} | ||
var footerTemplate = void 0; | ||
if (this.parent.quickInfoTemplates.footer) { | ||
footerTemplate = this.getInnerHtmlFromElements(this.parent.getQuickInfoTemplatesFooter()(templateArgs)); | ||
append(this.parent.getQuickInfoTemplatesFooter()(templateArgs), quickEventPopup); | ||
} | ||
if (!footerTemplate) { | ||
footerTemplate = "<div class=\"" + cls.POPUP_FOOTER_CLASS + "\">" + | ||
((this.parent.isAdaptive ? '' : "<button class=\"" + cls.EDIT_EVENT_CLASS + " " + | ||
else { | ||
var footerTemplate = createElement('div', { | ||
className: cls.POPUP_FOOTER_CLASS, | ||
innerHTML: "" + (this.parent.isAdaptive ? '' : "<button class=\"" + cls.EDIT_EVENT_CLASS + " " + | ||
(cls.TEXT_ELLIPSIS + "\" title=\"" + this.l10n.getConstant('edit') + "\">" + this.l10n.getConstant('edit') + "</button>") + | ||
("<button class=\"" + cls.DELETE_EVENT_CLASS + " " + cls.TEXT_ELLIPSIS + "\" title=\"" + this.l10n.getConstant('delete') + "\">") + | ||
(this.l10n.getConstant('delete') + "</button>")) + "</div >"); | ||
(this.l10n.getConstant('delete') + "</button>")) | ||
}); | ||
quickEventPopup.appendChild(footerTemplate); | ||
} | ||
var eventTemplate = headerTemplate + contentTemplate + footerTemplate; | ||
var quickEventPopup = createElement('div', { className: cls.EVENT_POPUP_CLASS, innerHTML: eventTemplate }); | ||
var readonly = this.parent.activeViewOptions.readonly; | ||
@@ -482,0 +491,0 @@ var editIcon = quickEventPopup.querySelector('.' + cls.EDIT_CLASS); |
@@ -484,2 +484,4 @@ var __extends = (this && this.__extends) || (function () { | ||
tr.appendChild(td); | ||
var args = { elementType: 'weekNumberCell', element: td }; | ||
this.parent.trigger(event.renderCell, args); | ||
return tr; | ||
@@ -486,0 +488,0 @@ }; |
@@ -252,3 +252,3 @@ var __extends = (this && this.__extends) || (function () { | ||
var rowIndex = Math.floor(top / firstRow.cells[0].offsetHeight); | ||
if (isNullOrUndefined(rowIndex)) { | ||
if (isNullOrUndefined(rowIndex) || isNaN(rowIndex)) { | ||
return; | ||
@@ -255,0 +255,0 @@ } |
@@ -67,3 +67,3 @@ import { createElement, append, prepend, isNullOrUndefined, getValue, getDefaultDateObject, cldrData, addClass } from '@syncfusion/ej2-base'; | ||
} | ||
table.appendChild(colGroupEle); | ||
prepend([colGroupEle], table); | ||
}; | ||
@@ -70,0 +70,0 @@ ViewBase.prototype.getScrollXIndent = function (content) { |
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
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
9289850
81341