Skip to content

Commit b78bbf4

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 36c3367 commit b78bbf4

File tree

10 files changed

+247
-9
lines changed

10 files changed

+247
-9
lines changed

docs-aspnet/_config-mvc.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,14 @@ html-helpers/editors/multicolumncombobox/binding/razor-page.md,
7272
html-helpers/editors/multiselect/binding/razor-page.md,
7373
html-helpers/editors/rating/razor-page.md,
7474
html-helpers/editors/slider/razor-page.md,
75+
html-helpers/editors/switch/razor-page.md,
7576
html-helpers/editors/upload/razor-page.md,
7677
html-helpers/editors/imageeditor/razor-page.md,
7778
html-helpers/layout/form/razor-page.md,
7879
html-helpers/layout/dialog/razor-page.md,
7980
html-helpers/layout/notification/razor-page.md,
8081
html-helpers/layout/splitter/razor-page.md,
82+
html-helpers/layout/tooltip/razor-page.md,
8183
html-helpers/layout/window/razor-page.md,
8284
html-helpers/navigation/breadcrumb/razor-page.md,
8385
html-helpers/navigation/button/razor-page.md,
@@ -87,7 +89,9 @@ html-helpers/navigation/menu/contextmenu/razor-page.md,
8789
html-helpers/navigation/panelbar/binding/razor-page.md,
8890
html-helpers/navigation/radiobutton/razor-page.md,
8991
html-helpers/navigation/stepper/razor-page.md,
90-
html-helpers/scheduling/scheduler/binding/razor-page.md]
92+
html-helpers/scheduling/scheduler/binding/razor-page.md,
93+
html-helpers/navigation/tabstrip/razor-page.md,
94+
html-helpers/navigation/toolbar/razor-page.md]
9195

9296
exclude_navigation: ["knowledge-base/*",
9397
api/Kendo.Mvc/*,

docs-aspnet/getting-started-core/helper-basics/razor-pages-list-of-helpers.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
<a href="/{{ site.platform }}/html-helpers/editors/slider/razor-page">Slider</a>
163163
</li>
164164
<li>
165-
Switch
165+
<a href="/{{ site.platform }}/html-helpers/editors/switch/razor-page">Switch</a>
166166
</li>
167167
<li>
168168
TextArea
@@ -252,7 +252,7 @@
252252
TileLayout
253253
</li>
254254
<li>
255-
Tooltip
255+
<a href="/{{ site.platform }}/html-helpers/layout/tooltip/razor-page">Tooltip</a>
256256
</li>
257257
<li>
258258
<a href="/{{ site.platform }}/html-helpers/layout/window/razor-page">Window</a>
@@ -289,13 +289,13 @@
289289
<a href="/{{ site.platform }}/html-helpers/navigation/stepper/razor-page">Stepper</a>
290290
</li>
291291
<li>
292-
TabStrip
292+
<a href="/{{ site.platform }}/html-helpers/navigation/tabstrip/razor-page">TabStrip</a>
293293
</li>
294294
<li>
295295
<a href="/{{ site.platform }}/html-helpers/navigation/timeline/razor-pages">Timeline</a>
296296
</li>
297297
<li>
298-
ToolBar
298+
<a href="/{{ site.platform }}/html-helpers/navigation/toolbar/razor-page">ToolBar</a>
299299
</li>
300300
<li>
301301
<a href="/{{ site.platform }}/html-helpers/navigation/treeview/binding#razor-pages">TreeView</a>

docs-aspnet/getting-started-core/helper-basics/razor-pages.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ page_title: Razor Pages
44
description: "Get started with Razor Pages and Progress Telerik UI for ASP.NET Core (aka MVC 6 or ASP.NET Core MVC)."
55
previous_url: /getting-started/razor-pages-integration, /getting-started/installation/razor-pages-integration, /compatibility/razor-pages-integration
66
slug: razor_pages_integration_aspnetmvc6_aspnetmvc
7+
permalink: /getting-started/helper-basics/razor-pages
78
position: 2
89
---
910

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Razor Page
3+
page_title: Razor Page
4+
description: "An example on how to configure the Telerik UI Switch HtmlHelper for {{ site.framework }} in a Razor Page."
5+
slug: htmlhelpers_switch_aspnetcore_razor_page
6+
---
7+
8+
# Razor Page
9+
10+
This article demonstrates how to configure the Telerik UI Switch HtmlHelper for {{ site.framework }} in a RazorPage.
11+
12+
For the full project with RazorPages examples, visit our [GitHub repository](https://github.com/telerik/ui-for-aspnet-core-examples/tree/master/Telerik.Examples.RazorPages).
13+
14+
```tab-RazorPage(csthml)
15+
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
16+
@Html.AntiForgeryToken()
17+
18+
@(Html.Kendo().Switch()
19+
.Name("switch")
20+
.Checked(Model.IsChecked)
21+
)
22+
23+
```
24+
```tab-PageModel(cshtml.cs)
25+
26+
[BindProperty]
27+
public bool IsChecked { get; set; }
28+
public void OnGet()
29+
{
30+
IsChecked = true;
31+
}
32+
33+
```
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Razor Page
3+
page_title: Razor Page
4+
description: "An example on how to configure the Telerik UI Tooltip HtmlHelper for {{ site.framework }} in a Razor Page."
5+
slug: htmlhelpers_tooltip_aspnetcore_razor_page
6+
position: 3
7+
---
8+
9+
# Razor Page
10+
11+
This article demonstrates how to configure the Telerik UI Tooltip HtmlHelper for {{ site.framework }} in a RazorPage scenario.
12+
13+
For the full project with RazorPages examples, visit our [GitHub repository](https://github.com/telerik/ui-for-aspnet-core-examples/tree/master/Telerik.Examples.RazorPages).
14+
15+
```tab-RazorPage(csthml)
16+
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
17+
@Html.AntiForgeryToken()
18+
19+
@(Html.Kendo().Tooltip()
20+
.For("#images")
21+
.Filter("a")
22+
.ContentTemplateId("template")
23+
.Position(TooltipPosition.Top)
24+
.Width(500)
25+
.Height(500)
26+
)
27+
28+
<div class="description">
29+
<h3>
30+
Hover over an image for a larger size.
31+
</h3>
32+
</div>
33+
<ul id="images" class="photos">
34+
<li><a href="#" data-id="1"><img src="/Images/ScrollViewImages/image1.jpg" width="110" height="110" /></a></li>
35+
<li><a href="#" data-id="2"><img src="/Images/ScrollViewImages/image2.jpg" width="110" height="110" /></a></li>
36+
<li><a href="#" data-id="3"><img src="/Images/ScrollViewImages/image3.jpg" width="110" height="110" /></a></li>
37+
<li><a href="#" data-id="4"><img src="/Images/ScrollViewImages/image4.jpg" width="110" height="110" /></a></li>
38+
<li><a href="#" data-id="5"><img src="/Images/ScrollViewImages/image5.jpg" width="110" height="110" /></a></li>
39+
<li><a href="#" data-id="6"><img src="/Images/ScrollViewImages/image6.jpg" width="110" height="110" /></a></li>
40+
<li><a href="#" data-id="7"><img src="/Images/ScrollViewImages/image7.jpg" width="110" height="110" /></a></li>
41+
<li><a href="#" data-id="8"><img src="/Images/ScrollViewImages/image8.jpg" width="110" height="110" /></a></li>
42+
<li><a href="#" data-id="9"><img src="/Images/ScrollViewImages/image9.jpg" width="110" height="110" /></a></li>
43+
</ul>
44+
45+
<script id="template" type="text/x-kendo-template">
46+
<div class="template-wrapper">
47+
<img src="@Url.Content("~/Images/ScrollViewImages/image")#=target.data('id')#.jpg" alt="#=target.data('id')#" width="500" height="500" />
48+
</div>
49+
</script>
50+
51+
```
52+
```tab-PageModel(cshtml.cs)
53+
54+
public void OnGet()
55+
{
56+
57+
}
58+
59+
```
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Razor Page
3+
page_title: Razor Page
4+
description: "An example on how to configure the Telerik UI TabStrip HtmlHelper for {{ site.framework }} in a Razor Page."
5+
slug: htmlhelpers_tabstrip_aspnetcore_razor_page
6+
---
7+
8+
# Razor Page
9+
10+
This article demonstrates how to add the Telerik UI TabStrip HtmlHelper for {{ site.framework }} to a RazorPage and load content via AJAX.
11+
12+
For the full project with RazorPages examples, visit our [GitHub repository](https://github.com/telerik/ui-for-aspnet-core-examples/tree/master/Telerik.Examples.RazorPages).
13+
14+
```tab-RazorPage(csthml)
15+
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
16+
@Html.AntiForgeryToken()
17+
18+
<div class="wrapper">
19+
@(Html.Kendo().TabStrip()
20+
.Name("tabstrip")
21+
.Items(tabstrip =>
22+
{
23+
tabstrip.Add().Text("Dimensions & Weights")
24+
.Selected(true)
25+
.LoadContentFrom(Url.Content("~/Content/TabStrip/ajaxContent1.html"));
26+
tabstrip.Add().Text("Engine")
27+
.LoadContentFrom(Url.Content("~/Content/TabStrip/ajaxContent2.html"));
28+
tabstrip.Add().Text("Chassis")
29+
.LoadContentFrom(Url.Content("~/Content/TabStrip/ajaxContent3.html"));
30+
})
31+
)
32+
</div>
33+
34+
```
35+
```tab-PageModel(cshtml.cs)
36+
37+
public void OnGet()
38+
{
39+
40+
}
41+
42+
```
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: Razor Page
3+
page_title: Razor Page
4+
description: "An example on how to configure the Telerik UI Toolbar HtmlHelper for {{ site.framework }} in a Razor Page."
5+
slug: htmlhelpers_toolbar_aspnetcore_razor_page
6+
---
7+
8+
# Razor Page
9+
10+
This article demonstrates how to add the Telerik UI Toolbar HtmlHelper for {{ site.framework }} to a RazorPage.
11+
12+
For the full project with RazorPages examples, visit our [GitHub repository](https://github.com/telerik/ui-for-aspnet-core-examples/tree/master/Telerik.Examples.RazorPages).
13+
14+
```tab-RazorPage(csthml)
15+
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
16+
@Html.AntiForgeryToken()
17+
18+
@(Html.Kendo().ToolBar()
19+
.Name("ToolBar")
20+
.Items(items =>
21+
{
22+
items.Add().Type(CommandType.Button).Text("Button");
23+
items.Add().Type(CommandType.Button).Text("Toggle Button").Togglable(true);
24+
items.Add().Type(CommandType.SplitButton).Text("Insert").MenuButtons(menuButtons =>
25+
{
26+
menuButtons.Add().Text("Insert above").Icon("insert-up");
27+
menuButtons.Add().Text("Insert between").Icon("insert-middle");
28+
menuButtons.Add().Text("Insert below").Icon("insert-down");
29+
});
30+
items.Add().Type(CommandType.Separator);
31+
items.Add().Template("<label for='dropdown'>Format:</label>");
32+
items.Add().Template("<input id='dropdown' style='width: 150px;' />").Overflow(ShowInOverflowPopup.Never);
33+
items.Add().Type(CommandType.Separator);
34+
items.Add().Type(CommandType.ButtonGroup).Buttons(buttons =>
35+
{
36+
buttons.Add().Text("Left").Togglable(true).Group("text-align").Icon("align-left");
37+
buttons.Add().Text("Center").Togglable(true).Group("text-align").Icon("align-center");
38+
buttons.Add().Text("Right").Togglable(true).Group("text-align").Icon("align-right");
39+
});
40+
items.Add().Type(CommandType.ButtonGroup).Buttons(buttons =>
41+
{
42+
buttons.Add().Text("Bold").Togglable(true).Icon("bold");
43+
buttons.Add().Text("Italic").Togglable(true).Icon("italic");
44+
buttons.Add().Text("Underline").Togglable(true).Icon("underline");
45+
});
46+
items.Add().Type(CommandType.Button).Text("Action").Overflow(ShowInOverflowPopup.Always);
47+
items.Add().Type(CommandType.Button).Text("Another Action").Overflow(ShowInOverflowPopup.Always);
48+
items.Add().Type(CommandType.Button).Text("Something else here").Overflow(ShowInOverflowPopup.Always);
49+
})
50+
)
51+
52+
<script>
53+
$(document).ready(function () {
54+
$("#dropdown").kendoDropDownList({
55+
optionLabel: "Paragraph",
56+
dataTextField: "text",
57+
dataValueField: "value",
58+
dataSource: [
59+
{ text: "Heading 1", value: 1 },
60+
{ text: "Heading 2", value: 2 },
61+
{ text: "Heading 3", value: 3 },
62+
{ text: "Title", value: 4 },
63+
{ text: "Subtitle", value: 5 },
64+
]
65+
});
66+
});
67+
</script>
68+
69+
```
70+
```tab-PageModel(cshtml.cs)
71+
72+
public void OnGet()
73+
{
74+
75+
}
76+
77+
```

src/kendo.combobox.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ var __meta__ = { // jshint ignore:line
5050
STATE_REBIND = "rebind",
5151
HOVEREVENTS = "mouseenter" + ns + " mouseleave" + ns,
5252
proxy = $.proxy,
53-
newLineRegEx = /(\r\n|\n|\r)/gm;
53+
newLineRegEx = /(\r\n|\n|\r)/gm,
54+
NON_PRINTABLE_KEYS = [16,17,18,19,20,33,34,37,39,45,91,92,144,145];
5455

5556
var ComboBox = Select.extend({
5657
init: function(element, options) {
@@ -998,7 +999,9 @@ var __meta__ = { // jshint ignore:line
998999
_keydown: function(e) {
9991000
var that = this,
10001001
key = e.keyCode,
1001-
textField = that.options.dataTextField || "text";
1002+
textField = that.options.dataTextField || "text",
1003+
isFkey = key >= 112 && key <= 135,
1004+
isNonPrintableKey = NON_PRINTABLE_KEYS.indexOf(key) > -1;
10021005

10031006
that._last = key;
10041007

@@ -1053,7 +1056,7 @@ var __meta__ = { // jshint ignore:line
10531056
that._oldText = that.text();
10541057
}
10551058
}
1056-
} else if (key != keys.TAB && !that._move(e)) {
1059+
} else if (key != keys.TAB && !that._move(e) && !isNonPrintableKey && !isFkey && !e.ctrlKey) {
10571060
that._search();
10581061
} else if (key === keys.ESC && !that.popup.visible() && that.text()) {
10591062
that._clearValue();
@@ -1114,7 +1117,7 @@ var __meta__ = { // jshint ignore:line
11141117

11151118
that._toggleCloseVisibility();
11161119
}
1117-
else if (value === "" && that._prev !== "") {
1120+
else if (value === "" && that._prev !== "" && that._prev !== undefined) {
11181121
that._clearValue();
11191122
that.search("");
11201123
}

tests/combobox/navigation.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,24 @@ it("pressing alt + up should close popup", function() {
6060
combobox.input.trigger({type: "keydown", altKey: true, keyCode: kendo.keys.UP});
6161
});
6262

63+
it("pressing Capse lock should not open popup", function(done) {
64+
create({
65+
filter: "contains",
66+
delay: 0
67+
});
68+
combobox.popup.bind("open", function(){
69+
assert.isOk(false);
70+
done();
71+
});
72+
73+
combobox.input.trigger({type: "keydown", altKey: true, keyCode: 20});
74+
75+
setTimeout(function() {
76+
assert.isOk(true);
77+
done();
78+
}, 0);
79+
});
80+
6381
it("_arrow click should focus the input", function() {
6482
create();
6583

typescript/kendo.all.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11047,6 +11047,7 @@ declare namespace kendo.ui {
1104711047
errors(): any;
1104811048
hideMessages(): void;
1104911049
hideValidationSummary(): void;
11050+
reset(): void;
1105011051
showValidationSummary(): void;
1105111052
validate(): boolean;
1105211053
validateInput(input: Element): boolean;

0 commit comments

Comments
 (0)