Skip to content

Commit 0ed9132

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 00fb517 commit 0ed9132

File tree

7 files changed

+29
-22
lines changed

7 files changed

+29
-22
lines changed

docs/api/javascript/ui/dialog.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,25 @@ A boolean property indicating whether the action button will be decorated as pri
9595
});
9696
</script>
9797

98+
### actions.cssClass `String`
99+
100+
Adds a custom class to the action button.
101+
102+
#### Example
103+
104+
<div id="dialog"></div>
105+
<script>
106+
$("#dialog").kendoDialog({
107+
title: "Kendo Dialog Component",
108+
content: "This is your Kendo Dialog.",
109+
actions: [{
110+
text: "OK",
111+
primary: true,
112+
cssClass: "k-button-ok"
113+
}]
114+
});
115+
</script>
116+
98117
### animation `Boolean|Object`
99118

100119
A collection of {Animation} objects, used to change default animations. A value of `false` will disable all animations in the widget.

src/kendo.dialog.js

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,10 @@
203203
var that = this,
204204
element = that.element,
205205
maxHeight = that.options.maxHeight,
206-
paddingBox,
207206
elementMaxHeight;
208207

209208
if (maxHeight != Infinity) {
210-
paddingBox = that._paddingBox(element);
211-
elementMaxHeight = parseFloat(maxHeight, 10) - that._uiHeight() - paddingBox.vertical;
209+
elementMaxHeight = parseFloat(maxHeight, 10) - that._uiHeight();
212210
if (elementMaxHeight > 0) {
213211
element.css({
214212
maxHeight: ceil(elementMaxHeight) + "px"
@@ -218,24 +216,11 @@
218216

219217
},
220218

221-
_paddingBox: function(element) {
222-
var paddingTop = parseFloat(element.css("padding-top"), 10),
223-
paddingLeft = parseFloat(element.css("padding-left"), 10),
224-
paddingBottom = parseFloat(element.css("padding-bottom"), 10),
225-
paddingRight = parseFloat(element.css("padding-right"), 10);
226-
227-
return {
228-
vertical: paddingTop + paddingBottom,
229-
horizontal: paddingLeft + paddingRight
230-
};
231-
},
232-
233219
_setElementHeight: function() {
234220
var that = this,
235221
element = that.element,
236222
height = that.options.height,
237-
paddingBox = that._paddingBox(element),
238-
elementHeight = parseFloat(height, 10) - that._uiHeight() - paddingBox.vertical;
223+
elementHeight = parseFloat(height, 10) - that._uiHeight();
239224

240225
if (elementHeight < 0) {
241226
elementHeight = 0;
@@ -433,6 +418,7 @@
433418
.autoApplyNS(NS)
434419
.html(text)
435420
.appendTo(actionbar)
421+
.addClass(action.cssClass)
436422
.data("action", action.action)
437423
.on("click", actionClick)
438424
.on("keydown", actionKeyHandler);
@@ -820,6 +806,8 @@
820806

821807
Widget.fn.destroy.call(that);
822808

809+
kendo.destroy(that.wrapper);
810+
823811
that.wrapper.remove();
824812
that.wrapper = that.element = $();
825813
},

styles/web/common/editor.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ table.k-editor {
455455
.k-editor-dialog.k-editor-table-wizard-dialog .k-tabstrip-wrapper .k-content {
456456
overflow: hidden;
457457
min-height: 440px;
458-
height: 35em;
458+
height: auto;
459459
margin: 0;
460460
padding: 1em 0.5em 0;
461461
border-width: 0;

styles/web/kendo.common-bootstrap.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ input.k-textbox {
765765

766766
.k-editor-dialog.k-editor-table-wizard-dialog .k-tabstrip-wrapper .k-content {
767767
min-height: 510px;
768-
height: 38em;
768+
height: auto;
769769
}
770770

771771
.k-edit-label,

styles/web/kendo.common-fiori.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ div.k-spreadsheet-window {
13751375

13761376
.k-editor-dialog.k-editor-table-wizard-dialog .k-tabstrip-wrapper .k-content {
13771377
min-height: 510px;
1378-
height: 42em;
1378+
height: auto;
13791379
}
13801380

13811381
.k-edit-label,

styles/web/kendo.common-material.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ div.k-spreadsheet-window {
13661366

13671367
.k-editor-dialog.k-editor-table-wizard-dialog .k-tabstrip-wrapper .k-content {
13681368
min-height: 510px;
1369-
height: 42em;
1369+
height: auto;
13701370
}
13711371

13721372
.k-edit-label,

styles/web/kendo.common-nova.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ div.k-spreadsheet-window {
13811381

13821382
.k-editor-dialog.k-editor-table-wizard-dialog .k-tabstrip-wrapper .k-content {
13831383
min-height: 510px;
1384-
height: 42em;
1384+
height: auto;
13851385
}
13861386

13871387
.k-edit-label,

0 commit comments

Comments
 (0)