-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathkendo.checkbox.js
52 lines (42 loc) · 1.33 KB
/
kendo.checkbox.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import "./kendo.toggleinputbase.js";
import "./kendo.html.input.js";
export const __meta__ = {
id: "checkbox",
name: "CheckBox",
category: "web",
description: "The CheckBox widget is used to display boolean value input.",
depends: [ "toggleinputbase", "html.input" ]
};
(function($, undefined) {
var kendo = window.kendo,
ui = kendo.ui,
ToggleInputBase = ui.ToggleInputBase;
var CheckBox = ToggleInputBase.extend({
options: {
name: "CheckBox",
checked: null,
enabled: true,
encoded: true,
label: null,
rounded: "medium",
size: "medium",
wrapperClass: "k-checkbox-wrap"
},
RENDER_INPUT: kendo.html.renderCheckBox,
NS: ".kendoCheckBox",
// alias for check, NG support
value: function(value) {
if (typeof value === "string") {
value = (value === "true");
}
return this.check.apply(this, [value]);
}
});
kendo.cssProperties.registerPrefix("CheckBox", "k-checkbox-");
kendo.cssProperties.registerValues("CheckBox", [{
prop: "rounded",
values: kendo.cssProperties.roundedValues.concat([['full', 'full']])
}]);
ui.plugin(CheckBox);
})(window.kendo.jQuery);
export default kendo;