Skip to content

Commit 3899f99

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 1ba183e commit 3899f99

File tree

5 files changed

+42
-4
lines changed

5 files changed

+42
-4
lines changed

docs/api/javascript/ui/grid.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9848,8 +9848,6 @@ Fired when the user try to edit or create a data item, before the editor is crea
98489848

98499849
The event handler function context (available via the `this` keyword) will be set to the widget instance.
98509850

9851-
The event will be fired only when the Grid is `selectable`.
9852-
98539851
#### Event Data
98549852

98559853
##### e.model `kendo.data.Model`
@@ -10105,6 +10103,8 @@ Fired when the user selects a table row or cell in the grid.
1010510103

1010610104
The event handler function context (available via the `this` keyword) will be set to the widget instance.
1010710105

10106+
The event will be fired only when the Grid is [`selectable`](/api/javascript/ui/grid/configuration/selectable).
10107+
1010810108
#### Event Data
1010910109

1011010110
##### e.sender `kendo.ui.Grid`

src/kendo.colorpicker.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ var __meta__ = { // jshint ignore:line
668668
var content = that.wrapper = $(that._template(options));
669669
element.hide().after(content);
670670

671+
that._inputWrapper = $(that.wrapper[0].firstChild);
672+
671673
if (element.is("input")) {
672674
element.appendTo(content);
673675

src/kendo.toolbar.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,20 +1209,30 @@ var __meta__ = { // jshint ignore:line
12091209

12101210
show: function(candidate) {
12111211
var item = this._getItem(candidate);
1212+
var buttonGroupInstance;
12121213

12131214
if (item.toolbar) {
12141215
if (item.toolbar.options.type === "button" && item.toolbar.options.isChild) {
1216+
buttonGroupInstance = item.toolbar.getParentGroup();
12151217
item.toolbar.show();
1216-
item.toolbar.getParentGroup().refresh();
1218+
1219+
if (buttonGroupInstance) {
1220+
buttonGroupInstance.refresh();
1221+
}
12171222
} else if(item.toolbar.options.hidden) {
12181223
item.toolbar.show();
12191224
}
12201225
}
12211226

12221227
if (item.overflow) {
12231228
if (item.overflow.options.type === "button" && item.overflow.options.isChild) {
1229+
buttonGroupInstance = item.overflow.getParentGroup();
1230+
12241231
item.toolbar.show();
1225-
item.overflow.getParentGroup().refresh();
1232+
1233+
if (buttonGroupInstance) {
1234+
buttonGroupInstance.refresh();
1235+
}
12261236
} else if(item.overflow.options.hidden) {
12271237
item.overflow.show();
12281238
}

tests/colorpicker/initialization.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@
168168

169169
assert.isOk(!cp.wrapper.hasClass("k-state-disabled"));
170170
});
171+
172+
it("picker inner wrapper has correct class", function() {
173+
expect(0);
174+
175+
var dom = $("<input />").appendTo(Mocha.fixture).kendoColorPicker();
176+
var cp = dom.data("kendoColorPicker");
177+
178+
assert.isOk(cp._inputWrapper.hasClass("k-picker-wrap"));
179+
});
171180
});
172181
}());
173182

tests/toolbar/api.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,23 @@
530530
assert.isOk($("#splitButton_wrapper").is(":visible"));
531531
});
532532

533+
it("Show method shows hidden button in SplitButton", function() {
534+
var toolbar = container.kendoToolBar({
535+
items: [{
536+
type: "splitButton",
537+
id: "splitButton",
538+
text: "split button",
539+
menuButtons: [
540+
{ text: "foo", id: "foo" },
541+
{ text: "bar", id: "bar", hidden: true }
542+
]
543+
}]
544+
}).data("kendoToolBar");
545+
546+
toolbar.show($("#bar"));
547+
assert.isOk(!$("#bar").hasClass(".k-hidden"));
548+
});
549+
533550
it("After showing hidden button the button group updates k-group-start button", function() {
534551
var toolbar = container.kendoToolBar({
535552
items: [

0 commit comments

Comments
 (0)