Skip to content

Commit 69376b6

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 00cbc39 commit 69376b6

File tree

23 files changed

+557
-173
lines changed

23 files changed

+557
-173
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
This project has been released under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html), the text of which is included below. This license applies ONLY to the source of this repository and does not extend to any other Kendo UI distribution or variant, or any other 3rd party libraries used in a repository. For licensing information about Kendo UI, see the [License Agreements page](https://www.kendoui.com/purchase/license-agreement.aspx) at [KendoUI.com](http://www.kendoui.com).
22

3-
> Copyright © 2014-2018 Progress Software
3+
> Copyright © 2014-2015 Telerik
44
55
> Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

docs-aspnet-core/copyright.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ slug: copyright_kendoui
66
position: 260
77
---
88

9-
### © 2016 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
9+
### © {{ site.time | date: "%Y"}} Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
1010

1111
These materials and all Progress® software products are copyrighted and all rights are reserved by Progress Software Corporation. The information in these materials is subject to change without notice, and Progress Software Corporation assumes no responsibility for any errors that may appear therein. The references in these materials to specific platforms supported are subject to change.
1212

docs-aspnet-mvc/copyright.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ slug: copyright_kendoui
66
position: 260
77
---
88

9-
### © 2017 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
9+
### © {{ site.time | date: "%Y"}} Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
1010

1111
These materials and all Progress® software products are copyrighted and all rights are reserved by Progress Software Corporation. The information in these materials is subject to change without notice, and Progress Software Corporation assumes no responsibility for any errors that may appear therein. The references in these materials to specific platforms supported are subject to change.
1212

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
---
2+
title: ButtonGroup
3+
page_title: Configuration, methods and events of Kendo UI ButtonGroup
4+
description: Learn how to define the initially selected button, select a button and get the currently selected button.
5+
res_type: api
6+
---
7+
8+
# kendo.ui.ButtonGroup
9+
10+
## Configuration
11+
12+
### enable `Boolean` *(default: true)*
13+
14+
Defines if the widget is initially enabled or disabled. By default, it is enabled.
15+
16+
#### Example
17+
18+
<ul id="buttongroup">
19+
<li>Option 1</li>
20+
<li>Option 2</li>
21+
<li>Option 3</li>
22+
</ul>
23+
24+
<script>
25+
$("#buttongroup").kendoButtonGroup({
26+
enable: false
27+
});
28+
</script>
29+
30+
### index `Number`
31+
32+
Defines the initially selected Button (zero based index).
33+
34+
#### Example
35+
36+
<ul id="buttongroup">
37+
<li>Option 1</li>
38+
<li>Option 2</li>
39+
<li>Option 3</li>
40+
</ul>
41+
42+
<script>
43+
$("#buttongroup").kendoButtonGroup({
44+
index: 1
45+
});
46+
</script>
47+
48+
### selection `String` *(default "single")*
49+
50+
Defines the selection type.
51+
52+
#### Example
53+
54+
<ul id="buttongroup">
55+
<li>Option 1</li>
56+
<li>Option 2</li>
57+
<li>Option 3</li>
58+
</ul>
59+
60+
<script>
61+
$("#buttongroup").kendoButtonGroup({
62+
selection: "multiple"
63+
});
64+
</script>
65+
66+
## Methods
67+
68+
### badge
69+
70+
#### Parameters
71+
72+
##### button `Selector|Number`
73+
74+
The target button specified either as a jQuery selector/object or as an button index.
75+
76+
##### value `String|Boolean`
77+
78+
The target value to be set or false to be removed.
79+
80+
#### Returns
81+
82+
`String|kendo.ui.Button` the badge value if invoked without parameters, otherwise the ButtonGroup object.
83+
84+
#### Example
85+
86+
<ul id="buttongroup">
87+
<li>Option 1</li>
88+
<li>Option 2</li>
89+
<li>Option 3</li>
90+
</ul>
91+
92+
<script>
93+
var buttonGroup = $("#buttongroup").kendoButtonGroup({
94+
select: function(e) {
95+
console.log("selected index:" + e.index);
96+
},
97+
enable: false,
98+
index: 0
99+
}).data("kendoButtonGroup");
100+
101+
buttonGroup.badge(0,5);
102+
</script>
103+
104+
### current
105+
106+
Get the currently selected Button.
107+
108+
#### Returns
109+
110+
`jQuery` the jQuery object representing the currently selected button.
111+
112+
#### Example - get the index of the currently selected Button
113+
114+
<ul id="buttongroup">
115+
<li>Option 1</li>
116+
<li>Option 2</li>
117+
<li>Option 3</li>
118+
</ul>
119+
120+
<script>
121+
$("#buttongroup").kendoButtonGroup({
122+
select: function(e) {
123+
var index = this.current().index();
124+
console.log(index);
125+
}
126+
});
127+
</script>
128+
129+
### destroy
130+
131+
Prepares the **ButtonGroup** for safe removal from DOM. Detaches all event handlers and removes jQuery.data attributes to avoid memory leaks. Calls destroy method of any child Kendo widgets.
132+
133+
> **Important:** This method does not remove the ButtonGroup element from DOM.
134+
135+
#### Example
136+
137+
<ul id="buttongroup">
138+
<li>Option 1</li>
139+
<li>Option 2</li>
140+
<li>Option 3</li>
141+
</ul>
142+
143+
<a onclick="destroy">Destroy the ButtonGroup</a>
144+
145+
<script>
146+
$("#buttongroup").kendoButtonGroup();
147+
148+
function destroy() {
149+
$("#buttongroup").data("kendoButtonGroup").destroy(); //detach events
150+
$("#buttongroup").remove(); //remove the button group from the DOM
151+
}
152+
</script>
153+
154+
### enable
155+
156+
Enables or disables the widget.
157+
158+
#### Parameters
159+
160+
##### enable `Boolean`
161+
162+
A boolean flag that indicates whether the widget should be enabled or disabled.
163+
164+
#### Example
165+
166+
<a onclick="enable">Enable</a>
167+
<ul id="buttongroup">
168+
<li>Option 1</li>
169+
<li>Option 2</li>
170+
<li>Option 3</li>
171+
</ul>
172+
173+
<script>
174+
$("#buttongroup").kendoButtonGroup({
175+
enable: false
176+
});
177+
function enable() {
178+
$("#btnGroup").data("kendoButtonGroup").enable(true);
179+
}
180+
</script>
181+
182+
### select
183+
184+
Select a Button.
185+
186+
#### Parameters
187+
188+
##### li `jQuery | Number`
189+
190+
LI element or index of the Button.
191+
192+
#### Example
193+
194+
<ul id="buttongroup">
195+
<li>Option 1</li>
196+
<li>Option 2</li>
197+
<li>Option 3</li>
198+
</ul>
199+
200+
201+
<script>
202+
var buttongroup = $("#buttongroup").kendoButtonGroup().data("kendoButtonGroup");
203+
204+
// selects by jQuery object
205+
buttongroup.select(buttongroup.element.children().eq(0));
206+
// selects by index
207+
buttongroup.select(1);
208+
</script>
209+
210+
## Events
211+
212+
### select
213+
214+
Fires when a Button is selected.
215+
216+
#### Example - get the index of the currently selected Button
217+
218+
<ul id="buttongroup">
219+
<li>Option 1</li>
220+
<li>Option 2</li>
221+
<li>Option 3</li>
222+
</ul>
223+
224+
<script>
225+
$("#buttongroup").kendoButtonGroup({
226+
select: function(e) {
227+
var index = this.current().index();
228+
console.log(index);
229+
}
230+
});
231+
</script>
232+
233+
#### Event Data
234+
235+
##### e.index `Number`
236+
237+
The index of the selected button

docs/copyright.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ slug: copyright_kendoui
66
position: 260
77
---
88

9-
### © 2016 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
9+
### © {{ site.time | date: "%Y"}} Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
1010

1111
These materials and all Progress® software products are copyrighted and all rights are reserved by Progress Software Corporation. The information in these materials is subject to change without notice, and Progress Software Corporation assumes no responsibility for any errors that may appear therein. The references in these materials to specific platforms supported are subject to change.
1212

docs/knowledge-base/grid-filter-icon-to-left.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ description: Displaying filter icon at most left position in the Grid header
44
type: how-to
55
page_title: How To Display Filter Icon Before the Title in the Grid Header
66
slug: grid-filter-icon-to-left
7+
previous_url: /knowledge-base/grid_filter_icon_to_left
78
position:
89
tags: Grid, Filter icon, Left position
910
res_type: kb

docs/knowledge-base/map-filter-markers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ description: Dynamic filter for Map widget markers
44
type: how-to
55
page_title: Filtering Markers Layer in Kendo UI Map
66
slug: map-filter-markers
7+
previous_url: /knowledge-base/map_filter_markers
78
position:
89
tags: Map, Filter, Markers
910
res_type: kb

styles/web/common/base.less

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,25 @@ input[type="reset"].k-button-expand
170170
border: 0;
171171
}
172172

173+
/* Badges */
174+
.k-badge {
175+
height: 2em;
176+
min-width: 2.6em;
177+
max-width: 100%;
178+
position: absolute;
179+
top: -1em;
180+
right: -1em;
181+
font-size: .6rem;
182+
line-height: 2em;
183+
padding: 0 .55em;
184+
border-radius: 5em;
185+
text-align: center;
186+
overflow: hidden;
187+
text-overflow: ellipsis;
188+
box-sizing: border-box;
189+
z-index: 5;
190+
}
191+
173192

174193
/* Colors */
175194

0 commit comments

Comments
 (0)