Skip to content

Commit b0f2fae

Browse files
committed
Sync with Kendo UI Professional
1 parent a92a726 commit b0f2fae

File tree

12 files changed

+328
-97
lines changed

12 files changed

+328
-97
lines changed

docs-aspnet/_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,13 +694,13 @@ navigation:
694694
baseurl: /aspnet-core
695695

696696
## The Kendo UI version used
697-
cdnVersion: "2023.1.314"
697+
cdnVersion: "2023.1.425"
698698

699699
## The themes CDN used
700-
themesCdnVersion: "6.2.0"
700+
themesCdnVersion: "6.3.0"
701701

702702
## The MVC Core version used
703-
mvcCoreVersion: "2023.1.314"
703+
mvcCoreVersion: "2023.1.425"
704704

705705
ff-sheet-id: 1mottKpkbJFxkUq6rS3CsPrT8JQOE2JlUtsJBR622cxs
706706

docs-aspnet/backwards-compatibility/2023-backwards-compatibility.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ position: 1
1010

1111
This article lists the breaking or important changes in the 2023 releases of {{ site.product }}.
1212

13+
## {{ site.product }} R2 2023
14+
15+
**FloatingActionButton**
16+
17+
As part of the rendering unification of the components:
18+
19+
* The `Shape` configuration option and the `shape` API method are now removed.
20+
* The element with class `k-fab-items` is moved inside the element with class `k-fab-popup`.
21+
1322
## {{ site.product }} R1 2023 SP1
1423

1524
Drop of the development and support of the LESS themes.

docs-aspnet/html-helpers/charts/treemap/overview.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,33 @@ You can also bind the `DataSource` to remote data. The following example demonst
125125
```
126126
{% endif %}
127127

128+
## Setting Custom Color Ranges
129+
130+
You can customize the TreeMap through the `Colors` configuration option by adding the desired color ranges:
131+
132+
```HtmlHelper
133+
@(Html.Kendo().TreeMap()
134+
.Name("treeMap")
135+
.DataSource(dataSource => dataSource
136+
.Read(read => read
137+
.Action("Population_Read", "TreeMap")
138+
)
139+
.Model(m => m.Children("Items"))
140+
)
141+
.Colors(color =>
142+
{
143+
color.AddRange("#0072c6", "#cbe2f3");
144+
color.AddRange("#5db2ff", "#deeffe");
145+
color.AddRange("#ff8f32", "#cbe7d0");
146+
color.AddRange("#82ba00", "#e5f0cb");
147+
color.AddRange("#ff8f32", "#fee8d5");
148+
color.AddRange("#9e0a61", "#eccedf");
149+
color.AddRange("#ac193d", "#eed0d7");
150+
})
151+
.ValueField("Value")
152+
.TextField("Name")
153+
)
154+
```
128155

129156
## Events
130157

docs-aspnet/html-helpers/data-management/treelist/row-templates.md

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,83 @@ The following example demonstrates how to implement row and alter row templates
3131

3232
The following scripts will generate the content for the templates:
3333

34-
```
34+
```
35+
<script id="rowTemplate" type="text/x-kendo-template">
36+
<tr class="k-table-row" data-uid='#: data.model.uid #' role="row">
37+
<td class="k-table-td" role="gridcell">
38+
#for(var i = 0; i < (hasChildren ? level : (level + 1)); i++){#
39+
<span class="k-icon k-i-none"></span>
40+
#}#
41+
42+
# if (data.hasChildren) { #
43+
# if(data.model.expanded) { #
44+
<span class="k-svg-icon k-svg-i-caret-alt-down"></span>
45+
# }
46+
else { #
47+
<span class="k-svg-icon k-svg-i-caret-alt-right"></span>
48+
# } #
49+
# } #
50+
<div class='employee-photo'
51+
style='background-image: url(@Url.Content("~/content/web/treelist/people")/#: data.model.EmployeeId #.jpg);'></div>
52+
<div class='employee-name'>#: data.model.FirstName # #: data.model.LastName # <span class = 'employee-position'>#: data.model.Position #</span></div>
53+
</td>
54+
<td class="k-table-td" role="gridcell">
55+
<img class= "county-flag" alt="Telerik UI for ASP.NET MVC TreeList #: data.model.CountryFlag # country flag" src="../Content/web/country-flags/#: data.model.CountryFlag #.png" />
56+
</td>
57+
<td class="k-table-td" role="gridcell">
58+
<span class='badgeTemplate'>#: Math.floor((kendo.date.today() - data.model.HireDate)/(365*24*60*60*1000)) #</span>
59+
</td>
60+
</tr>
61+
</script>
62+
63+
<script id="altRowTemplate" type="text/x-kendo-template">
64+
<tr class="k-table-row k-alt k-table-alt-row" data-uid='#: data.model.uid #' role="row">
65+
<td class="k-table-td" role="gridcell">
66+
#for(var i = 0; i < (hasChildren ? level : (level + 1)); i++){#
67+
<span class="k-icon k-i-none"></span>
68+
#}#
69+
70+
# if (data.hasChildren) { #
71+
# if(data.model.expanded) { #
72+
<span class="k-svg-icon k-svg-i-caret-alt-down"></span>
73+
# }
74+
else { #
75+
<span class="k-svg-icon k-svg-i-caret-alt-right"></span>
76+
# } #
77+
# } #
78+
<div class='employee-photo'
79+
style='background-image: url(@Url.Content("~/content/web/treelist/people")/#: data.model.EmployeeId #.jpg);'></div>
80+
<div class='employee-name'>#: data.model.FirstName # #: data.model.LastName # <span class = 'employee-position'>#: data.model.Position #</span></div>
81+
</td>
82+
<td class="k-table-td" role="gridcell">
83+
<img class= "county-flag" alt="Telerik UI for ASP.NET MVC TreeList #: data.model.CountryFlag # country flag" src="../Content/web/country-flags/#: data.model.CountryFlag #.png" />
84+
</td>
85+
<td class="k-table-td" role="gridcell">
86+
<span class='badgeTemplate'>#: Math.floor((kendo.date.today() - data.model.HireDate)/(365*24*60*60*1000)) #</span>
87+
</td>
88+
</tr>
89+
</script>
90+
```
91+
92+
Additionally, for the expand/collapse icons to apear, you must create SVG icons from the respective span elements in the templates. You can do that in the TreeList `DataBound` event handler:
93+
94+
```
95+
<script>
96+
function onDataBound(e) {
97+
$(".k-svg-i-caret-alt-right").each(function () {
98+
kendo.ui.icon(this, { icon: 'caret-alt-right' });
99+
})
100+
101+
$(".k-svg-i-caret-alt-down").each(function () {
102+
kendo.ui.icon(this, { icon: 'caret-alt-down' });
103+
})
104+
}
105+
</script>
106+
```
107+
108+
The TreeList in versions of {{ site.product_short }} prior to R1 2023 SP1 (2023.1.314) has a different rendering. SVG icons are not used in the old version, so creating SVG icons in the `DataBound` event handler is not applicable. However, the templates should be declared as shown below, because of the difference in the classes between the old and the new rendering of the component:
109+
110+
```
35111
<script id="rowTemplate" type="text/x-kendo-template">
36112
<tr data-uid='#: data.model.uid #' role="row">
37113
<td role="gridcell">
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
title: Keeping Trailing Zeros in the NumericTextBox
3+
page_title: Always Show Trailing Zeros in the NumericTextBox
4+
description: "Learn how to always display the entire decimal portion in the Telerik UI for {{ site.framework }} NumericTextBox."
5+
slug: numerictextbox-keep-trailing-zeros
6+
tags: numerictextbox, html, helper, custom, mvc, telerik, zero, trailing, decimal, portion, float
7+
res_type: kb
8+
---
9+
10+
## Environment
11+
12+
<table>
13+
<tr>
14+
<td>Product</td>
15+
<td>Progress {{ site.product }} NumericTextBox</td>
16+
</tr>
17+
<tr>
18+
<td>Progress {{ site.product }} version</td>
19+
<td>Created with the 2023.1.314 version</td>
20+
</tr>
21+
</table>
22+
23+
## Description
24+
25+
When I enter the `0.0010` value, it renders `0.001`. When the component loses focus, it re-formats the number to `0.0010`.
26+
27+
How can I format the number in a Telerik UI for {{ site.framework }} NumericTextBox so that it shows four decimal places?
28+
29+
## Solution
30+
31+
To achieve the desired result:
32+
33+
1. Create a common function that will add the trailing zeros programmatically.
34+
1. Add the trailing zeros when you change the value through the **Spin** buttons by subscribing to the [`Spin`](https://docs.telerik.com/{{ site.platform }}/api/kendo.mvc.ui.fluent/numerictextboxeventbuilder#spinsystemstring) event and call the common function.
35+
1. Add the trailing zeros when the NumericTextBox's input is focused by subscribing to the [`focus`](https://api.jquery.com/focus/) event by using the [`HtmlAttributes()`](https://docs.telerik.com/{{ site.platform }}/api/kendo.mvc.ui.fluent/numerictextboxbuilder#htmlattributessystemobject) configuration method and call the common function.
36+
37+
> You can further elaborate on the example to reflect the globalization practices and check if the decimals are properly rendered when used on multiple NumericTextBoxes.
38+
39+
40+
```Index.cshtml
41+
@(Html.Kendo().NumericTextBox<double>()
42+
.Name("currency")
43+
.Format("n4")
44+
.Decimals(4)
45+
.Value(0.0010)
46+
.Events(events => events.Spin("onSpin"))
47+
.HtmlAttributes(new {onfocus = "onFocus(event)" })
48+
)
49+
```
50+
```Script.js
51+
<script>
52+
function onSpin(e){
53+
var inputElement = this.element;
54+
addTrailingZeros(inputElement,this); // Pass both the input element and client-side reference of the widget to the common function.
55+
}
56+
function onFocus(event){
57+
var inputElement = $(event.target);
58+
var numeric = $(inputElement).data("kendoNumericTextBox");
59+
addTrailingZeros(inputElement, numeric); // Pass both the input element and client-side reference of the widget to the common function.
60+
}
61+
function addTrailingZeros(input, numeric) {
62+
// Floats Scenario
63+
if (input.val().split(".").length > 1
64+
&& input.val().split(".")[1].length < numeric.options.decimals) { // Assert whether the floating input has missing zeros.
65+
var inputValue = input.val() + "0"; // Append the trailing zero to the input's value.
66+
input.val(inputValue); // Change the input's value.
67+
}
68+
// Integers Scenario
69+
if (input.val() && input.val().split(".").length === 1) { // Assert whether the integer input has missing zeros.
70+
var inputValue = input.val() + "." + Array(numeric.options.decimals + 1).join("0"); // Append the trailing zero to the input's value.
71+
input.val(inputValue); Change the input's value.
72+
}
73+
}
74+
</script>
75+
```
76+
77+
For the complete implementation of the suggested approach, refer to the [Telerik REPL example on keeping the trailing zeros in the NumericTextBox](https://netcorerepl.telerik.com/cxaSaSPq400vRo8o25).
78+
79+
## More {{ site.framework }} NumericTextBox Resources
80+
{% if site.core %}
81+
* [{{ site.framework }} NumericTextBox Product Page](https://www.telerik.com/aspnet-core-ui/numeric-textbox)
82+
* [Telerik UI for {{ site.framework }} Video Onboarding Course (Free for trial users and license holders)]({%slug virtualclass_uiforcore%})
83+
* [Telerik UI for {{ site.framework }} Forums](https://www.telerik.com/forums/aspnet-core-ui)
84+
{% else %}
85+
* [{{ site.framework }} NumericTextBox Product Page](https://www.telerik.com/aspnet-mvc/grid)
86+
* [Telerik UI for {{ site.framework }} Video Onboarding Course (Free for trial users and license holders)]({%slug virtualclass_uiformvc%})
87+
* [Telerik UI for {{ site.framework }} Forums](https://www.telerik.com/forums/aspnet-mvc)
88+
{% endif %}
89+
90+
## See Also
91+
92+
* [Client-Side API Reference of the NumericTextBox for {{ site.framework }}](https://docs.telerik.com/kendo-ui/api/javascript//ui/numerictextbox)
93+
* [Server-Side API Reference of the NumericTextBox for {{ site.framework }}](https://docs.telerik.com/{{ site.platform }}/api/numerictextbox)
94+
* [Telerik REPL: Keeping Trailing Zeros in the NumericTextBox](https://netcorerepl.telerik.com/cxaSaSPq400vRo8o25)
95+
* [Telerik UI for {{ site.framework }} Breaking Changes]({%slug breakingchanges_2023%})
96+
* [Telerik UI for {{ site.framework }} Knowledge Base](https://docs.telerik.com/{{ site.platform }}/knowledge-base)
97+

docs-aspnet/styles-and-layout/sass-themes/compatibility.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The following table lists the Telerik UI for {{ site.framework }} themes and the
1212

1313
| Telerik UI for {{ site.framework }} | Kendo UI Sass Themes |
1414
|:--- |:--- |
15+
| Telerik UI 2023.1.425 (R1 2023 SP2) | @progress/kendo-theme-bootstrap@6.3.0<br>@progress/kendo-theme-classic@6.3.0<br>@progress/kendo-theme-default@6.3.0<br>@progress/kendo-theme-fluent@6.3.0<br>@progress/kendo-theme-material@6.3.0 |
1516
| Telerik UI 2023.1.314 (R1 2023 SP1) | @progress/kendo-theme-bootstrap@6.2.0<br>@progress/kendo-theme-classic@6.2.0<br>@progress/kendo-theme-default@6.2.0<br>@progress/kendo-theme-fluent@6.2.0<br>@progress/kendo-theme-material@6.2.0 |
1617
| Telerik UI 2023.1.117 (R1 2023) | @progress/kendo-theme-bootstrap@5.10.0<br>@progress/kendo-theme-classic@5.10.0<br>@progress/kendo-theme-default@5.10.0<br>@progress/kendo-theme-fluent@5.10.0<br>@progress/kendo-theme-material@5.10.0 |
1718
| Telerik UI 2022.3.1109 (R3 2022 SP1) | @progress/kendo-theme-bootstrap@5.10.0<br>@progress/kendo-theme-default@5.10.0<br>@progress/kendo-theme-material@5.10.0<br>@progress/kendo-theme-classic@5.10.0<br>@progress/kendo-theme-fluent@5.10.0 |

docs/_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -723,13 +723,13 @@ navigation:
723723
baseurl: /kendo-ui
724724

725725
## The Kendo UI version used
726-
cdnVersion: "2023.1.314"
726+
cdnVersion: "2023.1.425"
727727

728728
## The themes CDN used
729-
themesCdnVersion: "6.2.0"
729+
themesCdnVersion: "6.3.0"
730730

731731
## The MVC Core version used
732-
mvcCoreVersion: "2023.1.314"
732+
mvcCoreVersion: "2023.1.425"
733733

734734
## Progress NPM Registry
735735
registry_url: 'https://registry.npm.telerik.com/'

docs/styles-and-layout/sass-themes/compatibility.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The following table lists the Kendo UI for jQuery and Kendo UI Sass themes versi
1313

1414
| kendo UI for jQuery | Kendo UI Sass Themes |
1515
|:--- |:--- |
16+
| Kendo UI 2023.1.425 (R1 2023 SP2) | @progress/kendo-theme-bootstrap@6.3.0<br>@progress/kendo-theme-classic@6.3.0<br>@progress/kendo-theme-default@6.3.0<br>@progress/kendo-theme-fluent@6.3.0<br>@progress/kendo-theme-material@6.3.0 |
1617
| Kendo UI 2023.1.314 (R1 2023 SP1) | @progress/kendo-theme-bootstrap@6.2.0<br>@progress/kendo-theme-classic@6.2.0<br>@progress/kendo-theme-default@6.2.0<br>@progress/kendo-theme-fluent@6.2.0<br>@progress/kendo-theme-material@6.2.0 |
1718
| Kendo UI 2023.1.117 (R1 2023) | @progress/kendo-theme-bootstrap@5.10.0<br>@progress/kendo-theme-classic@5.10.0<br>@progress/kendo-theme-default@5.10.0<br>@progress/kendo-theme-fluent@5.10.0<br>@progress/kendo-theme-material@5.10.0 |
1819
| Kendo UI 2022.3.1109 (R3 2022 SP1) | @progress/kendo-theme-bootstrap@5.10.0<br>@progress/kendo-theme-default@5.10.0<br>@progress/kendo-theme-material@5.10.0<br>@progress/kendo-theme-classic@5.10.0<br>@progress/kendo-theme-fluent@5.10.0 |

0 commit comments

Comments
 (0)