Skip to content

Commit 4b64a28

Browse files
committed
Sync with Kendo UI Professional
1 parent ac778a6 commit 4b64a28

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/kendo.checkbox.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ var __meta__ = {
2222
encoded: true,
2323
label: null,
2424
rounded: "medium",
25-
size: "medium"
25+
size: "medium",
26+
wrapperClass: "k-checkbox-wrap"
2627
},
2728

2829
RENDER_INPUT: kendo.html.renderCheckBox,

src/kendo.toggleinputbase.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,15 @@ var __meta__ = {
122122
inputMethod(that.element, $.extend({}, options));
123123
that.element.removeClass('input-validation-error');
124124

125-
that.wrapper = that.element;
126-
}
125+
that.wrapper = that.element.wrap(`<span class="${options.wrapperClass}"></span>`).parent();
126+
},
127+
128+
setOptions: function(options) {
129+
this._clearCssClasses(options, this.element);
130+
this._setEvents(options);
131+
$.extend(this.options, options);
132+
this._applyCssClasses(this.element);
133+
},
127134
});
128135

129136
ui.plugin(ToggleInputBase);

src/kendo.validator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ var __meta__ = {
506506
}
507507

508508
widgetInstance = (widgetInstance && widgetInstance.options.name == "Signature") ? widgetInstance : kendo.widgetInstance(input);
509-
if (!widgetInstance || !(widgetInstance._inputWrapper || widgetInstance.wrapper)) {
509+
if (!widgetInstance || !(widgetInstance._inputWrapper || widgetInstance.wrapper) || (input.is("[type=checkbox]") || input.is("[type=radio]"))) {
510510
input.toggleClass(INVALIDINPUT, !valid);
511511
input.toggleClass(VALIDINPUT, valid);
512512
}
@@ -515,7 +515,7 @@ var __meta__ = {
515515
var inputWrap = widgetInstance._inputWrapper || widgetInstance.wrapper;
516516
var inputLabel = widgetInstance._inputLabel;
517517

518-
if (inputWrap) {
518+
if (inputWrap && !(input.is("[type=checkbox]") || input.is("[type=radio]"))) {
519519
inputWrap.toggleClass(INVALIDINPUT, !valid);
520520
inputWrap.toggleClass(VALIDINPUT, valid);
521521
}

0 commit comments

Comments
 (0)