Skip to content

Commit c27c4ab

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent cc897c0 commit c27c4ab

File tree

14 files changed

+133
-200
lines changed

14 files changed

+133
-200
lines changed

docs/api/javascript/dataviz/ui/chart.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33368,6 +33368,10 @@ Hides the chart tooltip.
3336833368

3336933369
Returns the chart [plotArea](/api/javascript/dataviz/chart/chart_plotarea).
3337033370

33371+
#### Returns
33372+
33373+
`kendo.dataviz.ChartPlotArea` The chart plot area.
33374+
3337133375
#### Example - use the plotArea backgroundVisual to change the background
3337233376

3337333377
<div id="chart"></div>

src/kendo.calendar.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ var __meta__ = { // jshint ignore:line
115115
}
116116
if(that._view.name != "month" || options.selectable == "single") {
117117
that._click($(link));
118-
}
118+
}
119119
})
120120
.on("mouseup" + ns, "table.k-content, .k-footer", function() {
121121
that._focusView(that.options.focusOnNav !== false);
@@ -129,10 +129,10 @@ var __meta__ = { // jshint ignore:line
129129
if(that._isMultipleSelection() && that.options.weekNumber) {
130130
element.on(CLICK, WEEKCOLUMNSELECTOR, function(e) {
131131
var first = $(e.currentTarget).closest("tr").find(CELLSELECTORVALID).first(),
132-
last = that.selectable._lastActive = $(e.currentTarget).closest("tr").find(CELLSELECTORVALID).last();
132+
last = that.selectable._lastActive = $(e.currentTarget).closest("tr").find(CELLSELECTORVALID).last();
133133
that.selectable.selectRange(first, last, { event: e});
134134
that._current = that._value = that._toDateObject(last.find("a"));
135-
that._class(FOCUSED, that._current);
135+
that._class(FOCUSED, that._current);
136136
});
137137
}
138138

@@ -428,9 +428,9 @@ var __meta__ = { // jshint ignore:line
428428
validSelectedDates = $.grep(datesUnique, function(value) {
429429
if(value) {
430430
return +that._validateValue(new Date(value.setHours(0, 0, 0, 0))) === +value;
431-
}
431+
}
432432
});
433-
that._selectDates = validSelectedDates.length > 0? validSelectedDates: that._selectDates;
433+
that._selectDates = validSelectedDates.length > 0 ? validSelectedDates : (datesUnique.length === 0 ? datesUnique : that._selectDates);
434434
that._visualizeSelectedDatesInView();
435435
},
436436

@@ -454,20 +454,20 @@ var __meta__ = { // jshint ignore:line
454454
that._cell.removeClass(SELECTED);
455455
} else {
456456
that._changeView = !value || view && view.compare(value, that._current) !== 0;
457-
that.navigate(value);
457+
that.navigate(value);
458458
}
459459
},
460460

461461
_validateValue: function(value) {
462-
var that = this,
462+
var that = this,
463463
options = that.options,
464464
min = options.min,
465-
max = options.max;
465+
max = options.max;
466466

467467
if (value === null) {
468468
that._current = createDate(that._current.getFullYear(), that._current.getMonth(), that._current.getDate());
469469
}
470-
470+
471471
value = parse(value, options.format, options.culture);
472472

473473
if (value !== null) {
@@ -484,7 +484,7 @@ var __meta__ = { // jshint ignore:line
484484
that._value = null;
485485
}
486486

487-
return that._value;
487+
return that._value;
488488
},
489489

490490
_visualizeSelectedDatesInView: function() {
@@ -499,7 +499,7 @@ var __meta__ = { // jshint ignore:line
499499
var cells = that._table
500500
.find(CELLSELECTOR)
501501
.filter(function(index, element) {
502-
return selectedDates[$(element.firstChild).attr(kendo.attr(VALUE))];
502+
return selectedDates[$(element.firstChild).attr(kendo.attr(VALUE))];
503503
});
504504
if(cells.length > 0) {
505505
that.selectable._selectElement(cells, true);
@@ -536,12 +536,12 @@ var __meta__ = { // jshint ignore:line
536536

537537
_onRelatedTarget: function(target) {
538538
var that = this;
539-
539+
540540
if(that.selectable.options.multiple && target.is(CELLSELECTORVALID)) {
541541
that._current = that._toDateObject(target.find("a"));
542542
that._class(FOCUSED, that._toDateObject(target.find("a")));
543543
}
544-
544+
545545
},
546546

547547
_onSelect: function(e) {
@@ -561,9 +561,9 @@ var __meta__ = { // jshint ignore:line
561561

562562
if(eventArgs.event.ctrlKey) {
563563
if($(eventArgs.event.currentTarget).is(CELLSELECTORVALID)) {
564-
that._toggleSelection($(eventArgs.event.currentTarget));
564+
that._toggleSelection($(eventArgs.event.currentTarget));
565565
}
566-
else {
566+
else {
567567
that._cellsBySelector(CELLSELECTORVALID).each(function(index, element){
568568
var value = that._toDateObject($(element).find("a"));
569569
that._deselect(value);
@@ -579,9 +579,9 @@ var __meta__ = { // jshint ignore:line
579579
}
580580
else {
581581
that._selectDates = [];
582-
that._addSelectedCellsToArray();
582+
that._addSelectedCellsToArray();
583583
}
584-
that.trigger(CHANGE);
584+
that.trigger(CHANGE);
585585
},
586586

587587
_destroySelectable: function() {
@@ -602,22 +602,22 @@ var __meta__ = { // jshint ignore:line
602602
}
603603
else {
604604
that._deselect(date);
605-
}
605+
}
606606
},
607-
607+
608608
//shift selection
609609
_rangeSelection: function(toDateCell, startDate) {
610610
var that = this,
611611
fromDate = startDate || that._toDateObject(that.selectable.value().first().find("a")),
612612
toDate = that._toDateObject(toDateCell.find("a")),
613613
daysDifference;
614-
614+
615615
if(that.selectable._lastActive || that._value) {
616616
fromDate = that.selectable._lastActive? that._toDateObject(that.selectable._lastActive.find("a")): new Date(+that._value);
617617
} else {
618618
that.selectable._lastActive = startDate? that._cellByDate(that._view.toDateString(startDate), CELLSELECTORVALID): that.selectable.value().first();
619619
}
620-
620+
621621
that._selectDates = [];
622622
daysDifference = daysBetweenTwoDates(fromDate, toDate);
623623
addDaysToArray(that._selectDates, daysDifference, fromDate, that.options.disableDates);
@@ -635,14 +635,14 @@ var __meta__ = { // jshint ignore:line
635635
that.selectable.value().each(function(index, item) {
636636
var date = that._toDateObject($(item.firstChild));
637637
if(!that.options.disableDates(date)) {
638-
that._selectDates.push(date);
639-
}
638+
that._selectDates.push(date);
639+
}
640640
});
641641
},
642642

643643
_deselect: function(date) {
644644
var that = this;
645-
645+
646646
var currentDateIndex = that._selectDates.map(Number).indexOf(+date);
647647
if(currentDateIndex != -1) {
648648
that._selectDates.splice(currentDateIndex, 1);
@@ -657,7 +657,7 @@ var __meta__ = { // jshint ignore:line
657657
return +date <= +lastDateInView && +date >= +firstDateInView;
658658
},
659659

660-
660+
661661

662662
_move: function(e) {
663663
var that = this,
@@ -700,7 +700,7 @@ var __meta__ = { // jshint ignore:line
700700
currentValue.setFullYear(temp.getFullYear());
701701
prevent = true;
702702
}
703-
703+
704704
if (e.ctrlKey) {
705705
if (key == keys.RIGHT && !isRtl || key == keys.LEFT && isRtl) {
706706
that.navigateToFuture();
@@ -720,8 +720,8 @@ var __meta__ = { // jshint ignore:line
720720

721721
var focusedDate = that._toDateObject($(that._cell[0]).find("a"));
722722
that._class(FOCUSED, focusedDate);
723-
724-
}
723+
724+
}
725725
} else if(e.shiftKey) {
726726
if (value !== undefined || method) {
727727
if (!method) {
@@ -735,11 +735,11 @@ var __meta__ = { // jshint ignore:line
735735
min = createDate(min.getFullYear(), min.getMonth(), min.getDate());
736736
if (isInRange(currentValue, min, max)) {
737737
if(that._isMultipleSelection()) {
738-
that._keyboardRangeSelection(e, currentValue);
738+
that._keyboardRangeSelection(e, currentValue);
739739
}
740740
else {
741741
that._focus(restrictValue(currentValue, options.min, options.max));
742-
}
742+
}
743743
}
744744
}
745745
} else {
@@ -784,7 +784,7 @@ var __meta__ = { // jshint ignore:line
784784
}
785785
else {
786786
that._focus(restrictValue(currentValue, options.min, options.max));
787-
}
787+
}
788788
}
789789
}
790790
}
@@ -807,13 +807,13 @@ var __meta__ = { // jshint ignore:line
807807
fromDate = that.selectable._lastActive? that._toDateObject(that.selectable._lastActive.find("a")): currentValue;
808808
daysDifference = daysBetweenTwoDates(fromDate, new Date(+currentValue));
809809

810-
addDaysToArray(that._selectDates, daysDifference, fromDate, that.options.disableDates);
810+
addDaysToArray(that._selectDates, daysDifference, fromDate, that.options.disableDates);
811811

812812
that.navigate(currentValue);
813813
that._current = currentValue;
814814
that.selectable._lastActive = that.selectable._lastActive || that._cellByDate(that._view.toDateString(currentValue), CELLSELECTORVALID);
815815
that.trigger(CHANGE);
816-
return;
816+
return;
817817
}
818818
that.selectable.options.filter = that.wrapper.find("table").length > 1 && +currentValue > +that._current? "table.k-month:eq(1) " + CELLSELECTORVALID: "table.k-month:eq(0) " + CELLSELECTORVALID;
819819
that._class(FOCUSED, currentValue);
@@ -834,7 +834,7 @@ var __meta__ = { // jshint ignore:line
834834

835835
if ($(that._cell[0]).hasClass(SELECTED)) {
836836
that.selectable._unselect($(that._cell[0]));
837-
that.selectable.trigger(CHANGE, { event: event});
837+
that.selectable.trigger(CHANGE, { event: event});
838838
}
839839
else {
840840
that.selectable.value($(that._cell[0]), { event: event});
@@ -1730,8 +1730,8 @@ var __meta__ = { // jshint ignore:line
17301730
nextDay = new Date(nextDay.setDate(nextDay.getDate() + i));
17311731
if(!disableDates(nextDay)) {
17321732
array.push(nextDay);
1733-
}
1734-
}
1733+
}
1734+
}
17351735
}
17361736

17371737
function mousetoggle(e) {

styles/web/common/button.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
line-height: 1.72em;
1212
text-align: center;
1313
text-decoration: none;
14-
display: inline-flex;
14+
overflow: hidden;
1515
align-items: center;
1616
justify-content: center;
1717
vertical-align: middle;

styles/web/common/dialog.less

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{
1919
position: static;
2020
margin: 0;
21-
padding: 0.6em 0.8em 1em 0.8em;
21+
padding: 0.8em;
2222
width: auto;
2323
}
2424

@@ -53,6 +53,47 @@
5353
padding: 0;
5454
}
5555

56+
.k-dialog {
57+
overflow: hidden;
58+
59+
.k-dialog-buttongroup {
60+
width: 100%;
61+
box-sizing: border-box;
62+
63+
.k-button {
64+
display: inline-block;
65+
text-overflow: ellipsis;
66+
display: inline-block;
67+
}
68+
69+
&.k-dialog-button-layout-stretched {
70+
.k-button {
71+
margin: 0;
72+
border-radius: 0;
73+
border-bottom: 0;
74+
border-width: 1px 0 0 1px;
75+
}
76+
.k-button:first-child {
77+
border-left-width: 0;
78+
}
79+
.k-button:last-child {
80+
border-right-width: 0;
81+
}
82+
}
83+
&.k-dialog-button-layout-normal {
84+
padding: 1em;
85+
justify-content: flex-end;
86+
flex-wrap: wrap;
87+
.k-button {
88+
margin-left: 0.5em;
89+
&:first-child {
90+
margin-left: 0;
91+
}
92+
}
93+
}
94+
}
95+
}
96+
5697
.k-dialog .k-dialog-titlebar .k-dialog-actions {
5798
top: .6em;
5899
right: .8em;

styles/web/common/window.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ div.k-window-iframecontent
7676
position: absolute;
7777
top: 0;
7878
right: .2em;
79-
padding-top: .3em;
79+
top: .2em;
8080
white-space: nowrap;
8181
}
8282

styles/web/kendo.rtl.less

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,17 +1078,28 @@
10781078
{
10791079
&.k-dialog-button-layout-stretched
10801080
{
1081+
.k-button {
1082+
border-radius: 0;
1083+
}
10811084
.k-button:first-child
10821085
{
10831086
border-right-width: 0;
10841087
border-left-width: 1px;
1085-
border-bottom-left-radius: 0;
10861088
}
10871089
.k-button:last-child
10881090
{
10891091
border-left-width: 0;
10901092
border-right-width: 0;
1091-
border-bottom-right-radius: 0;
1093+
}
1094+
}
1095+
&.k-dialog-button-layout-normal {
1096+
1097+
.k-button {
1098+
margin-left: 0;
1099+
margin-right: 0.5em;
1100+
&:first-child {
1101+
margin-right: 0;
1102+
}
10921103
}
10931104
}
10941105
}

0 commit comments

Comments
 (0)