Skip to content

Commit e8f2b1d

Browse files
committed
Sync with Kendo UI Professional
1 parent 6959bec commit e8f2b1d

File tree

14 files changed

+212
-142
lines changed

14 files changed

+212
-142
lines changed

docs-aspnet/html-helpers/data-management/grid/clipboard.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ By using the Grid clipboard functionality, you enable the user to perform the fo
1717
The paste operation supports two interaction modes:
1818

1919
* [Replace](#replace-mode)—Replaces the Grid cell content with the copied content.
20-
* [Insert](#insert-mode)—Inserts the copied content as a new Grid row.
20+
* [Insert](#insert-mode)—Inserts the copied content as a new Grid row.
21+
22+
For runnable examples, refer to the following demos:
23+
* [Using the Grid clipboard functionality (Demo)](https://demos.telerik.com/{{ site.platform }}/grid/paste-from-excel)
24+
* [Using the functionality to copy content from the Grid to Excel (Demo)](https://demos.telerik.com/{{ site.platform }}/grid/copy-to-excel)
25+
* [Using the selection and export of the Grid to Excel (Demo)](https://demos.telerik.com/{{ site.platform }}/grid/selection-export)
2126

2227
## Getting Started
2328

@@ -98,7 +103,7 @@ To activate the Replace mode, select the **Paste (Replace)** option in the Toolb
98103
```HtmlHelper
99104
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
100105
.Name("grid")
101-
.ToolBar(toolBar => toolBar.Paste())
106+
.ToolBar(toolBar => toolBar.Paste()) // Displays a toolbar with a dropdown to select the paste mode.
102107
...
103108
)
104109
```
@@ -128,7 +133,7 @@ To activate the Insert mode select the **Paste (Insert)** option in the Toolbar
128133
```HtmlHelper
129134
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
130135
.Name("grid")
131-
.ToolBar(toolBar => toolBar.Paste())
136+
.ToolBar(toolBar => toolBar.Paste()) // Displays a toolbar with a dropdown to select the paste mode.
132137
...
133138
)
134139
```

docs-aspnet/html-helpers/layout/window/positioning.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ You can dynamically adjust the position of the Window by using its [API](/api/wi
1212

1313
Usually, it is preferable to center the Window rather than open it near the HTML element which is used to define its content. Often, the Window is opened as a result of a user action rather than of the `load` event of the page. Basically, the widget can be initialized as non-visible and can be opened when needed.
1414

15-
The following example demonstrates how to center and open a Kendo UI for jQuery Window on a button click. If the content is loaded through Ajax, [centering occurs after the request is complete]({% slug htmlhelpers_window_loadingcontent_aspnetcore %}#load-on-demand-content).
15+
## Centered Window
16+
17+
The following example demonstrates how to center and open a Window component with a button click. If the Window's content is loaded through AJAX, [the centering occurs after the request is complete]({% slug htmlhelpers_window_loadingcontent_aspnetcore %}#load-on-demand-content).
1618

1719
```HtmlHelper
1820
@(Html.Kendo().Window()
@@ -54,6 +56,30 @@ The following example demonstrates how to center and open a Kendo UI for jQuery
5456

5557
```
5658

59+
## Custom Positioned Window
60+
61+
To set a custom position of the Window, use the [`Position()`](https://docs.telerik.com/{{ site.platform }}/api/kendo.mvc.ui.fluent/windowbuilder#positionsystemaction) option.
62+
63+
```HtmlHelper
64+
@(Html.Kendo().Window()
65+
.Name("window")
66+
.Title("Custom Positioned Window")
67+
.Position(settings =>
68+
settings.Top(50).Left(100)
69+
)
70+
.Content(@<text>
71+
Window content here.
72+
</text>)
73+
)
74+
```
75+
{% if site.core %}
76+
```TagHelper
77+
<kendo-window name="window" title="Custom Positioned Window" position-top="50px" position-left="100px">
78+
<content>Window content here.</content>
79+
</kendo-window>
80+
```
81+
{% endif %}
82+
5783
## See Also
5884

5985
* [Server-Side API](/api/window)

docs-aspnet/html-helpers/navigation/treeview/binding.md

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,25 @@ private IEnumerable<TreeViewItemModel> GetData()
135135
return inline;
136136
}
137137
```
138+
```TreeViewItemModel
139+
public class TreeViewItemViewModel
140+
{
141+
public string Id { get; set; }
142+
public bool Expanded { get; set; }
143+
public bool Encoded { get; set; }
144+
public string Text { get; set; }
145+
public string SpriteCssClass { get; set; }
146+
public string Url { get; set; }
147+
public string ImageUrl { get; set; }
148+
public bool HasChildren { get; set; }
149+
public bool Checked { get; set; }
150+
public List<TreeViewItemModel> Items { get; set; }
151+
public IDictionary<string, string> HtmlAttributes { get; set; }
152+
public IDictionary<string, string> ImageHtmlAttributes { get; set; }
153+
public IDictionary<string, string> LinkHtmlAttributes { get; set; }
154+
public bool Selected { get; set; }
155+
}
156+
```
138157

139158
## Remote Data Binding
140159

@@ -169,11 +188,11 @@ public static IList<HierarchicalViewModel> GetHierarchicalData()
169188
{
170189
var result = new List<HierarchicalViewModel>()
171190
{
172-
new HierarchicalViewModel() { ID = 1, ParendID = null, HasChildren = true, Name = "Parent item" },
173-
new HierarchicalViewModel() { ID = 2, ParendID = 1, HasChildren = true, Name = "Parent item" },
174-
new HierarchicalViewModel() { ID = 3, ParendID = 1, HasChildren = false, Name = "Item" },
175-
new HierarchicalViewModel() { ID = 4, ParendID = 2, HasChildren = false, Name = "Item" },
176-
new HierarchicalViewModel() { ID = 5, ParendID = 2, HasChildren = false, Name = "Item" }
191+
new HierarchicalViewModel() { ID = 1, ParentID = null, HasChildren = true, Name = "Parent item" },
192+
new HierarchicalViewModel() { ID = 2, ParentID = 1, HasChildren = true, Name = "Parent item" },
193+
new HierarchicalViewModel() { ID = 3, ParentID = 1, HasChildren = false, Name = "Item" },
194+
new HierarchicalViewModel() { ID = 4, ParentID = 2, HasChildren = false, Name = "Item" },
195+
new HierarchicalViewModel() { ID = 5, ParentID = 2, HasChildren = false, Name = "Item" }
177196
};
178197
179198
return result;
@@ -182,7 +201,7 @@ public static IList<HierarchicalViewModel> GetHierarchicalData()
182201
public IActionResult Read_TreeViewData(int? id)
183202
{
184203
var result = GetHierarchicalData()
185-
.Where(x => id.HasValue ? x.ParendID == id : x.ParendID == null)
204+
.Where(x => id.HasValue ? x.ParentID == id : x.ParentID == null)
186205
.Select(item => new {
187206
id = item.ID,
188207
Name = item.Name,
@@ -228,6 +247,17 @@ public ActionResult Read_TreeViewData(int? id)
228247
{% endif %}
229248

230249

250+
```HierarchicalViewModel
251+
public class HierarchicalViewModel
252+
{
253+
public int ID { get; set; }
254+
public int? ParentID { get; set; }
255+
public bool HasChildren { get; set; }
256+
public string Name { get; set; }
257+
public bool Expanded { get; set; }
258+
public string ImageUrl { get; set; }
259+
}
260+
```
231261

232262
By default, the TreeView sends to the remote endpoint the `id` of the expanded node. To [send additional data]({% slug htmlhelpers_datasource_aspnetcore %}#pass-additional-data-to-action-methods) use the DataSource `Data` method and provide the name of a JavaScript function which will return a JavaScript object with the additional data.
233263

docs-aspnet/knowledge-base/form-cancel-button.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ To achieve the desired scenario:
9797

9898
## More {{ site.framework }} Form Resources
9999

100-
* [{{ site.framework }} Form Documentation](({%slug htmlhelpers_form_aspnetcore_overview%})
100+
* [{{ site.framework }} Form Documentation]({%slug htmlhelpers_form_aspnetcore_overview%})
101101

102102
* [{{ site.framework }} Form Demos](https://demos.telerik.com/{{ site.platform }}/form)
103103

docs-aspnet/knowledge-base/form-dynamic-fields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ For a runnable example based on the code above, refer to the [REPL example on dy
180180

181181
## More {{ site.framework }} Form Resources
182182

183-
* [{{ site.framework }} Form Documentation](({%slug htmlhelpers_form_aspnetcore_overview%})
183+
* [{{ site.framework }} Form Documentation]({%slug htmlhelpers_form_aspnetcore_overview%})
184184

185185
* [{{ site.framework }} Form Demos](https://demos.telerik.com/{{ site.platform }}/form)
186186

docs-aspnet/knowledge-base/form-in-strongly-typed-view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For the complete implementation on how to create a strongly typed form in a view
2828

2929
## More {{ site.framework }} Form Resources
3030

31-
* [{{ site.framework }} Form Documentation](({%slug htmlhelpers_form_aspnetcore_overview%})
31+
* [{{ site.framework }} Form Documentation]({%slug htmlhelpers_form_aspnetcore_overview%})
3232

3333
* [{{ site.framework }} Form Demos](https://demos.telerik.com/{{ site.platform }}/form)
3434

docs-aspnet/knowledge-base/form-validate-compare-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ You can achieve this by extending the Form's built-in Kendo Validator:
9595

9696
## More {{ site.framework }} Form Resources
9797

98-
* [{{ site.framework }} Form Documentation](({%slug htmlhelpers_form_aspnetcore_overview%})
98+
* [{{ site.framework }} Form Documentation]({%slug htmlhelpers_form_aspnetcore_overview%})
9999

100100
* [{{ site.framework }} Form Demos](https://demos.telerik.com/{{ site.platform }}/form)
101101

src/kendo.autocomplete.js

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ var __meta__ = {
8585
}
8686

8787
that._wrapper();
88-
that._loader();
8988
that._clearButton();
9089

9190
that._dataSource();
@@ -143,8 +142,7 @@ var __meta__ = {
143142
that.listView.bind("click", function(e) { e.preventDefault(); });
144143

145144
that._resetFocusItemHandler = that._resetFocusItem.bind(that);
146-
147-
addInputPrefixSuffixContainers({ widget: that, wrapper: that.wrapper, options: that.options, prefixInsertBefore: that._inputValuesContainer, suffixInsertAfter: that._loading });
145+
addInputPrefixSuffixContainers({ widget: that, wrapper: that.wrapper, options: that.options, prefixInsertBefore: that._inputValuesContainer, suffixInsertAfter: options.clearButton ? that._clear : that.element });
148146

149147
kendo.notify(that);
150148
that._toggleCloseVisibility();
@@ -247,8 +245,8 @@ var __meta__ = {
247245
if (that.dataSource && that._refreshHandler) {
248246
that._unbindDataSource();
249247
} else {
250-
that._progressHandler = that._showBusy.bind(that);
251-
that._errorHandler = that._hideBusy.bind(that);
248+
that._progressHandler = that._showBusy;
249+
that._errorHandler = that._hideBusy;
252250
}
253251

254252
that.dataSource = DataSource.create(that.options.dataSource)
@@ -757,29 +755,6 @@ var __meta__ = {
757755
}
758756
},
759757

760-
_hideBusy: function() {
761-
var that = this;
762-
clearTimeout(that._busy);
763-
that._loading.addClass(HIDDENCLASS);
764-
that.element.attr("aria-busy", false);
765-
that._busy = null;
766-
that._toggleCloseVisibility();
767-
},
768-
769-
_showBusy: function() {
770-
var that = this;
771-
772-
if (that._busy) {
773-
return;
774-
}
775-
776-
that._busy = setTimeout(function() {
777-
that.element.attr("aria-busy", true);
778-
that._loading.removeClass(HIDDENCLASS);
779-
that._hideClear();
780-
}, 100);
781-
},
782-
783758
_placeholder: function(show) {
784759
if (placeholderSupported) {
785760
return;
@@ -859,10 +834,6 @@ var __meta__ = {
859834
});
860835
},
861836

862-
_loader: function() {
863-
this._loading = $('<span class="k-icon k-i-loading k-input-loading-icon ' + HIDDENCLASS + '"></span>').insertAfter(this.element);
864-
},
865-
866837
_clearButton: function() {
867838
List.fn._clearButton.call(this);
868839

src/kendo.combobox.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ var __meta__ = {
4242
DISABLED = "disabled",
4343
READONLY = "readonly",
4444
CHANGE = "change",
45-
LOADING = "k-i-loading k-input-loading-icon",
4645
FOCUSED = "k-focus",
4746
STATEDISABLED = "k-disabled",
4847
ARIA_DISABLED = "aria-disabled",
@@ -921,16 +920,6 @@ var __meta__ = {
921920
});
922921
},
923922

924-
_hideBusy: function() {
925-
var that = this;
926-
clearTimeout(that._busy);
927-
that._arrowIcon.removeClass(LOADING);
928-
that._arrowIcon.find("svg").show();
929-
that._focused.attr("aria-busy", false);
930-
that._busy = null;
931-
that._toggleCloseVisibility();
932-
},
933-
934923
_click: function(e) {
935924
var that = this;
936925
var item = e.item;

src/kendo.dropdownlist.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,10 +633,14 @@ var __meta__ = {
633633
this._prevent = false;
634634
},
635635

636-
_focusoutHandler: function() {
636+
_focusoutHandler: function(e) {
637637
var that = this;
638638
var isIFrame = window.self !== window.top;
639639

640+
if (that.wrapper.find(e.relatedTarget).length > 0) {
641+
return;
642+
}
643+
640644
if (!that._prevent) {
641645
clearTimeout(that._typingTimeout);
642646

@@ -1244,7 +1248,7 @@ var __meta__ = {
12441248
span = wrapper.find(SELECTOR);
12451249

12461250
if (!span[0]) {
1247-
arrowBtn = html.renderButton('<span role="button" class="k-input-button" aria-label="select"></span>', {
1251+
arrowBtn = html.renderButton('<button role="button" tabindex="-1" class="k-input-button" aria-label="select"></button>', {
12481252
icon: "caret-alt-down",
12491253
size: options.size,
12501254
fillMode: options.fillMode,

0 commit comments

Comments
 (0)