Skip to content

Commit cc7a5ec

Browse files
author
pipeline
committed
v1.0.0 is released
1 parent f333a06 commit cc7a5ec

40 files changed

+1287
-696
lines changed

ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Essential JS 2 is a modern JavaScript UI toolkit that has been the built from th
66
* [Pure JS Demos](http://ej2.syncfusion.com/demos/)
77
* [Pure JS Documentation](http://ej2.syncfusion.com/documentation/)
88
* [Angular Demos](http://ej2.syncfusion.com/angular/demos/)
9-
* [Angular Documentation](http://ej2.syncfusion.com/angular/documentation/)
9+
* [Angular Documentation](http://ej2.syncfusion.com/angular/documentation/)

button/material.css

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@
931931
background-color: rgba(0, 0, 0, 0.12);
932932
}
933933

934-
.e-btn:active {
934+
.e-btn:active, .e-btn.e-active {
935935
background-color: rgba(255, 255, 255, 0.12);
936936
box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
937937
}
@@ -951,7 +951,7 @@
951951
background-color: #e03872;
952952
}
953953

954-
.e-btn.e-primary:active {
954+
.e-btn.e-primary:active, .e-btn.e-primary.e-active {
955955
background-color: #ff5790;
956956
}
957957

@@ -971,7 +971,7 @@
971971
background-color: rgba(0, 0, 0, 0.12);
972972
}
973973

974-
.e-btn.e-flat:active {
974+
.e-btn.e-flat:active, .e-btn.e-flat.e-active {
975975
background-color: rgba(255, 87, 144, 0.12);
976976
}
977977

@@ -991,7 +991,7 @@
991991
color: #ff4081;
992992
}
993993

994-
.e-btn.e-flat.e-primary:active {
994+
.e-btn.e-flat.e-primary:active, .e-btn.e-flat.e-primary.e-active {
995995
background-color: rgba(255, 87, 144, 0.12);
996996
}
997997

@@ -1010,7 +1010,7 @@
10101010
color: #689f38;
10111011
}
10121012

1013-
.e-btn.e-flat.e-success:active {
1013+
.e-btn.e-flat.e-success:active, .e-btn.e-flat.e-success.e-active {
10141014
background-color: rgba(0, 77, 68, 0.12);
10151015
}
10161016

@@ -1029,7 +1029,7 @@
10291029
color: #2196f3;
10301030
}
10311031

1032-
.e-btn.e-flat.e-info:active {
1032+
.e-btn.e-flat.e-info:active, .e-btn.e-flat.e-info.e-active {
10331033
background-color: rgba(11, 125, 218, 0.12);
10341034
}
10351035

@@ -1048,7 +1048,7 @@
10481048
color: #ef6c00;
10491049
}
10501050

1051-
.e-btn.e-flat.e-warning:active {
1051+
.e-btn.e-flat.e-warning:active, .e-btn.e-flat.e-warning.e-active {
10521052
background-color: rgba(204, 92, 0, 0.12);
10531053
}
10541054

@@ -1067,7 +1067,7 @@
10671067
color: #d84315;
10681068
}
10691069

1070-
.e-btn.e-flat.e-danger:active {
1070+
.e-btn.e-flat.e-danger:active, .e-btn.e-flat.e-danger.e-active {
10711071
background-color: rgba(154, 24, 24, 0.12);
10721072
}
10731073

@@ -1086,7 +1086,7 @@
10861086
background-color: rgba(0, 0, 0, 0.12);
10871087
}
10881088

1089-
.e-btn.e-outline:active {
1089+
.e-btn.e-outline:active, .e-btn.e-outline.e-active {
10901090
background-color: rgba(0, 0, 0, 0.12);
10911091
}
10921092

@@ -1108,7 +1108,7 @@
11081108
color: #fff;
11091109
}
11101110

1111-
.e-btn.e-outline.e-primary:active {
1111+
.e-btn.e-outline.e-primary:active, .e-btn.e-outline.e-primary.e-active {
11121112
background-color: #ff5790;
11131113
color: #fff;
11141114
}
@@ -1131,7 +1131,7 @@
11311131
color: #fff;
11321132
}
11331133

1134-
.e-btn.e-outline.e-success:active {
1134+
.e-btn.e-outline.e-success:active, .e-btn.e-outline.e-success.e-active {
11351135
background-color: #449d44;
11361136
color: #fff;
11371137
}
@@ -1154,7 +1154,7 @@
11541154
color: #fff;
11551155
}
11561156

1157-
.e-btn.e-outline.e-info:active {
1157+
.e-btn.e-outline.e-info:active, .e-btn.e-outline.e-info.e-active {
11581158
background-color: #0b7dda;
11591159
color: #fff;
11601160
}
@@ -1177,7 +1177,7 @@
11771177
color: #fff;
11781178
}
11791179

1180-
.e-btn.e-outline.e-warning:active {
1180+
.e-btn.e-outline.e-warning:active, .e-btn.e-outline.e-warning.e-active {
11811181
background-color: #cc5c00;
11821182
color: #fff;
11831183
}
@@ -1200,7 +1200,7 @@
12001200
color: #fff;
12011201
}
12021202

1203-
.e-btn.e-outline.e-danger:active {
1203+
.e-btn.e-outline.e-danger:active, .e-btn.e-outline.e-danger.e-active {
12041204
background-color: #ba3912;
12051205
color: #fff;
12061206
}
@@ -1222,7 +1222,7 @@
12221222
color: #fff;
12231223
}
12241224

1225-
.e-btn.e-success:active {
1225+
.e-btn.e-success:active, .e-btn.e-success.e-active {
12261226
background-color: #449d44;
12271227
}
12281228

@@ -1242,7 +1242,7 @@
12421242
color: #fff;
12431243
}
12441244

1245-
.e-btn.e-info:active {
1245+
.e-btn.e-info:active, .e-btn.e-info.e-active {
12461246
background-color: #0b7dda;
12471247
}
12481248

@@ -1262,7 +1262,7 @@
12621262
color: #fff;
12631263
}
12641264

1265-
.e-btn.e-warning:active {
1265+
.e-btn.e-warning:active, .e-btn.e-warning.e-active {
12661266
background-color: #cc5c00;
12671267
}
12681268

@@ -1282,7 +1282,7 @@
12821282
color: #fff;
12831283
}
12841284

1285-
.e-btn.e-danger:active {
1285+
.e-btn.e-danger:active, .e-btn.e-danger.e-active {
12861286
background-color: #ba3912;
12871287
}
12881288

dialog/material.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@
801801

802802
.e-dialog .e-footer-content {
803803
bottom: 0;
804-
position: relative;
804+
position: absolute;
805805
right: 0;
806806
width: 100%;
807807
}

dist/global/button/button.js

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
291291
this.controlStatus(this.disabled);
292292
}
293293
ej2_base_2.ripple(this.element, '.' + cssClassName.BUTTON);
294+
this.wireEvents();
294295
};
295296
Button.prototype.controlStatus = function (disabled) {
296297
this.element.disabled = disabled;
@@ -311,12 +312,30 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
311312
}
312313
}
313314
};
315+
Button.prototype.wireEvents = function () {
316+
if (this.isToggle) {
317+
ej2_base_2.EventHandler.add(this.element, 'click', this.btnClickHandler, this);
318+
}
319+
};
320+
Button.prototype.unWireEvents = function () {
321+
if (this.isToggle) {
322+
ej2_base_2.EventHandler.remove(this.element, 'click', this.btnClickHandler);
323+
}
324+
};
325+
Button.prototype.btnClickHandler = function () {
326+
if (this.element.classList.contains('e-active')) {
327+
this.element.classList.remove('e-active');
328+
}
329+
else {
330+
this.element.classList.add('e-active');
331+
}
332+
};
314333
Button.prototype.destroy = function () {
315334
var span;
316335
var element = this.element;
317336
_super.prototype.destroy.call(this);
318337
dom_1.removeClass([this.element], [cssClassName.PRIMARY, cssClassName.RTL, 'e-success',
319-
'e-info', 'e-danger', 'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger']);
338+
'e-info', 'e-danger', 'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active']);
320339
['role', 'aria-describedby', 'e-ripple', 'disabled'].forEach(function (value) {
321340
element.removeAttribute(value);
322341
});
@@ -327,6 +346,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
327346
if (span) {
328347
span.remove();
329348
}
349+
this.unWireEvents();
330350
};
331351
Button.prototype.getModuleName = function () {
332352
return 'btn';
@@ -391,6 +411,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
391411
this.element.innerHTML = newProp.content;
392412
this.setIconCss();
393413
break;
414+
case 'isToggle':
415+
if (newProp.isToggle) {
416+
ej2_base_2.EventHandler.add(this.element, 'click', this.btnClickHandler, this);
417+
}
418+
else {
419+
ej2_base_2.EventHandler.remove(this.element, 'click', this.btnClickHandler);
420+
dom_1.removeClass([this.element], ['e-active']);
421+
}
422+
break;
394423
}
395424
}
396425
};
@@ -414,6 +443,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
414443
__decorate([
415444
ej2_base_1.Property('')
416445
], Button.prototype, "content", void 0);
446+
__decorate([
447+
ej2_base_1.Property(false)
448+
], Button.prototype, "isToggle", void 0);
417449
Button = __decorate([
418450
ej2_base_1.NotifyPropertyChanges
419451
], Button);

dist/global/button/button.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/global/button/button.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/global/calendar/calendar.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
279279
var ICON = 'e-icons';
280280
var PREVICON = 'e-prev';
281281
var NEXTICON = 'e-next';
282+
var RIPPLESTYLE = 'e-ripple-style';
282283
var PREVSPAN = 'e-icon-prev';
283284
var NEXTSPAN = 'e-icon-next ';
284285
var ICONCONTAINER = 'e-icon-container';
@@ -346,12 +347,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
346347
this.header();
347348
this.content();
348349
this.wireEvents();
349-
if (this.getModuleName() === 'calendar') {
350-
this.rippleFn = ej2_base_1.ripple(this.element, '.e-header .e-prev, .e-header .e-next, .e-content td > span.e-link');
351-
}
352-
else {
353-
this.rippleFn = ej2_base_1.ripple(this.baseElement, '.e-header .e-prev, .e-header .e-next, .e-content td > span.e-link');
354-
}
355350
};
356351
Calendar.prototype.processDate = function () {
357352
this.validateDate();
@@ -415,8 +410,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
415410
this.headerEle = dom_1.createElement('div', { className: HEADER });
416411
var iconContainer = dom_1.createElement('div', { className: ICONCONTAINER });
417412
this.prevIcon = dom_1.createElement('a', { className: '' + PREVICON });
413+
this.prevIcon.classList.add(RIPPLESTYLE);
418414
dom_1.attributes(this.prevIcon, ariaPrevAttrs);
419415
this.nextIcon = dom_1.createElement('a', { className: '' + NEXTICON });
416+
this.nextIcon.classList.add(RIPPLESTYLE);
420417
dom_1.attributes(this.nextIcon, ariaNextAttrs);
421418
this.hdrTitleEle = dom_1.createElement('a', { className: '' + LINK + ' ' + TITLE, attrs: {} });
422419
dom_1.attributes(this.hdrTitleEle, ariaTitleAttrs);
@@ -880,7 +877,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
880877
trEle = dom_1.createElement('tr', { attrs: { 'role': 'row' } });
881878
for (rowIterator = 0 + rowIterator; rowIterator < row; rowIterator++) {
882879
if (elements[rowIterator].children[0]) {
883-
dom_1.addClass([elements[rowIterator].children[0]], 'e-link');
880+
dom_1.addClass([elements[rowIterator].children[0]], [LINK, RIPPLESTYLE]);
884881
}
885882
trEle.appendChild(elements[rowIterator]);
886883
if (!this.weekNumber && rowIterator === otherMonthCell && elements[otherMonthCell].classList.contains(OTHERMONTH)) {
@@ -902,7 +899,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
902899
var ani = {};
903900
this.tbodyEle.appendChild(trEle);
904901
if (elements[dayCell].children[0]) {
905-
dom_1.addClass([elements[dayCell].children[0]], 'e-link');
902+
dom_1.addClass([elements[dayCell].children[0]], [LINK, RIPPLESTYLE]);
906903
}
907904
}
908905
this.aniObj.animate(this.table.querySelector('tbody'), this.effect);
@@ -1106,7 +1103,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
11061103
this.nextIconHandler(true);
11071104
this.keyboardModule.destroy();
11081105
_super.prototype.destroy.call(this);
1109-
this.rippleFn();
11101106
};
11111107
Calendar.prototype.title = function () {
11121108
var currentView = this.getViewNumber(this.currentView());
@@ -1403,6 +1399,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
14031399
__decorate([
14041400
ej2_base_1.Property(false)
14051401
], Calendar.prototype, "weekNumber", void 0);
1402+
__decorate([
1403+
ej2_base_1.Event()
1404+
], Calendar.prototype, "created", void 0);
1405+
__decorate([
1406+
ej2_base_1.Event()
1407+
], Calendar.prototype, "destroyed", void 0);
14061408
__decorate([
14071409
ej2_base_1.Event()
14081410
], Calendar.prototype, "change", void 0);

dist/global/calendar/calendar.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/global/calendar/calendar.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)