Skip to content

Commit 650dd54

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 3f74117 commit 650dd54

File tree

13 files changed

+77
-24
lines changed

13 files changed

+77
-24
lines changed

docs/api/javascript/ui/treeview.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,9 +813,9 @@ Enables or disables nodes.
813813

814814
#### Parameters
815815

816-
##### nodes `jQuery|Element|String`
816+
##### nodes `jQuery|Element|String|Boolean`
817817

818-
The nodes that are to be enabled/disabled.
818+
The nodes that are to be enabled/disabled. Or, if *Boolean* parameter is passed, all nodes will be enabled/disabled.
819819

820820
##### enable `Boolean` *(optional, default: true)*
821821

@@ -840,6 +840,23 @@ Whether the nodes should be enabled or disabled.
840840
treeview.enable(".k-item");
841841
</script>
842842

843+
#### Example - enable all nodes
844+
845+
<div id="treeview"></div>
846+
<script>
847+
$("#treeview").kendoTreeView({
848+
dataSource: [
849+
{ text: "foo", enabled: false },
850+
{ text: "bar", enabled: false }
851+
]
852+
});
853+
854+
var treeview = $("#treeview").data("kendoTreeView");
855+
856+
// enable all items
857+
treeview.enable(true);
858+
</script>
859+
843860
### expand
844861

845862
Expands collapsed nodes.

src/kendo.dialog.js

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,12 @@
139139
that._createActionbar(that.wrapper);
140140
}
141141

142+
that._closable(that.wrapper);
142143
that._dimensions();
143-
that._overlay(options.modal && that.wrapper.is(VISIBLE)).css({ opacity: 0.5 });
144+
145+
if (options.modal !== undefined) {
146+
that._overlay(that.wrapper.is(VISIBLE)).css({ opacity: 0.5 });
147+
}
144148

145149
if (options.title !== undefined) {
146150
that.title(options.title);
@@ -317,7 +321,6 @@
317321
options = that.options,
318322
isRtl = kendo.support.isRtl(content),
319323
titlebar = $(templates.titlebar(options)),
320-
titlebarActions = titlebar.find(".k-window-actions"),
321324
titleId = (content.id || kendo.guid()) + "_title",
322325
wrapper = $(that.wrapperTemplate(options));
323326

@@ -326,15 +329,6 @@
326329
content.addClass(KCONTENTCLASS);
327330
that.appendTo.append(wrapper);
328331

329-
if (options.closable !== false) {
330-
if (options.title !== false) {
331-
titlebarActions.append(templates.close(options));
332-
}
333-
else {
334-
wrapper.append(templates.close(options));
335-
}
336-
}
337-
338332
if (options.title !== false) {
339333
wrapper.append(titlebar);
340334
titlebar.attr("id", titleId);
@@ -343,6 +337,8 @@
343337
wrapper.addClass(KTITLELESS);
344338
}
345339

340+
that._closable(wrapper);
341+
346342
wrapper.append(content);
347343

348344
if (options.content) {
@@ -355,6 +351,25 @@
355351
}
356352
},
357353

354+
_closable: function (wrapper) {
355+
var that = this;
356+
var options = that.options;
357+
var titlebar = wrapper.children(KDIALOGTITLEBAR);
358+
var titlebarActions = titlebar.find(".k-window-actions");
359+
var closeAction = titlebarActions.length ? titlebarActions.find(".k-dialog-close") : wrapper.find(".k-dialog-close");
360+
361+
closeAction.remove();
362+
363+
if (options.closable !== false) {
364+
if (options.title !== false) {
365+
titlebarActions.append(templates.close(options));
366+
}
367+
else {
368+
wrapper.prepend(templates.close(options));
369+
}
370+
}
371+
},
372+
358373
_createActionbar: function(wrapper) {
359374
var isStretchedLayout = (this.options.buttonLayout === "stretched");
360375
var buttonLayout = isStretchedLayout ? "stretched" : "normal";

styles/web/common/dialog.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@
107107

108108
.k-dialog.k-dialog-titleless a.k-dialog-action.k-dialog-close
109109
{
110+
position: absolute;
110111
right: .5em;
111-
top: 1em;
112+
top: .5em;
112113
}
113114

114115
.k-dialog.k-alert .k-dialog-titlebar,

styles/web/kendo.rtl.less

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,11 +1061,6 @@
10611061

10621062
.k-rtl .k-dialog, .k-rtl.k-dialog
10631063
{
1064-
a.k-dialog-action.k-dialog-close
1065-
{
1066-
position: absolute;
1067-
right: auto;
1068-
}
10691064

10701065
.k-dialog-buttongroup
10711066
{

styles/web/themes/button.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,10 @@
218218
background: @disabled-background-color;
219219
.composite-background(@disabled-gradient);
220220
}
221+
}
222+
223+
// Edit buttons
224+
.k-edit-buttons {
225+
border-color: @widget-border-color;
226+
background: @header-background-color;
221227
}

styles/web/themes/spreadsheet.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173

174174
.k-action-window .k-action-buttons {
175175
border-color: @widget-border-color;
176+
background: @header-background-color;
176177
}
177178

178179
.k-spreadsheet-sample {
@@ -183,7 +184,6 @@
183184
}
184185
}
185186

186-
.k-spreadsheet-window .k-list-wrapper,
187187
.k-spreadsheet-window .k-list {
188188
border-color: @widget-border-color;
189189
border-radius: @border-radius;

styles/web/type-default.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,6 +2458,9 @@ textarea.k-textbox,
24582458
}
24592459
}
24602460
&.k-dialog-button-layout-normal {
2461+
border-top: solid 1px @widget-border-color;
2462+
background: @header-background-color;
2463+
24612464
.k-button {
24622465
border-radius: @border-radius;
24632466
}

styles/web/type-flat.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2500,6 +2500,9 @@ html .km-pane-wrapper .km-widget,
25002500
}
25012501
}
25022502
&.k-dialog-button-layout-normal {
2503+
border-top: solid 1px @widget-border-color;
2504+
background: @header-background-color;
2505+
25032506
.k-button {
25042507
border-radius: @border-radius;
25052508
}

styles/web/type-highcontrast.less

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
@active-gradient: none;
5454
@active-shadow: none;
5555
@inverse-text-color: darken(@accent, 27%);
56-
@header-background-color: @base;
5756
@header-text-color: @normal-text-color;
57+
@header-background-color: @base;
5858
@group-background-color: @background;
5959
@group-border-color: lighten(@background, 26%);
6060
@content-background-color: @base;
@@ -2355,6 +2355,9 @@ html .km-pane-wrapper .km-widget,
23552355
}
23562356
}
23572357
&.k-dialog-button-layout-normal {
2358+
border-top: solid 1px @widget-border-color;
2359+
background: @header-background-color;
2360+
23582361
.k-button {
23592362
border-radius: @border-radius;
23602363
}

styles/web/type-material.less

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3163,7 +3163,7 @@ td.k-group-cell,
31633163
background-color: @draghandle-background-color;
31643164
}
31653165

3166-
.k-edit-form-container .k-edit-buttons {
3166+
.k-edit-buttons {
31673167
background-color: @secondary-background-color;
31683168
}
31693169

@@ -3827,6 +3827,9 @@ div.k-scheduler-marquee:after {
38273827
}
38283828
}
38293829
&.k-dialog-button-layout-normal {
3830+
border-top: solid 1px @widget-border-color;
3831+
background: @secondary-background-color;
3832+
38303833
.k-button {
38313834
background: none;
38323835
border: none;

styles/web/type-metro.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,6 +2421,9 @@ html .km-pane-wrapper .km-widget,
24212421
}
24222422
}
24232423
&.k-dialog-button-layout-normal {
2424+
border-top: solid 1px @widget-border-color;
2425+
background: @header-background-color;
2426+
24242427
.k-button {
24252428
border-radius: @border-radius;
24262429
}

styles/web/type-nova.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
@disabled-border-color: darken(@base, 6%);
6262
@disabled-background-color: @widget-background-color;
6363
@disabled-gradient: none;
64+
@header-background-color: @accent;
6465
@inputs-border-radius: 3px;
6566
@input-validation-error: darken(@error, 25%);
6667
@column-highlight-background-color: darken(@background, 4%);
@@ -1320,6 +1321,7 @@ table:not(.k-scheduler-dayview) .k-scheduler-header-wrap .k-today {
13201321
.k-editor.k-header,
13211322
.editorToolbarWindow.k-header,
13221323
.k-filebrowser .k-header {
1324+
color: @widget-text-color;
13231325
background-color: @widget-background-color;
13241326
border-color: @widget-border-color;
13251327
}
@@ -2295,6 +2297,8 @@ html .km-pane-wrapper .km-widget,
22952297
}
22962298
}
22972299
&.k-dialog-button-layout-normal {
2300+
border-top: solid 1px @widget-border-color;
2301+
22982302
.k-button {
22992303
border-radius: @border-radius;
23002304
}

tests/dialog/mvvm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@
143143

144144
var dialog = dom.data("kendoDialog");
145145

146-
equal(dialog.wrapper.width(), 212);
147-
equal(dialog.wrapper.height(), 233);
146+
equal(dialog.wrapper.outerWidth(), 212);
147+
equal(dialog.wrapper.outerHeight(), 233);
148148
});
149149

150150
test("set content through data attribute", function() {

0 commit comments

Comments
 (0)