Skip to content

Commit 2d630bf

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 9eef2e0 commit 2d630bf

25 files changed

+1083
-891
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "year": 2020, "release": 1, "servicePack": "next", "servicePackNumber": 1 }
1+
{ "year": 2020, "release": 1, "servicePack": "next", "servicePackNumber": 2 }

docs/api/javascript/ui/grid.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6191,6 +6191,29 @@ Defines the text of the "Save Changes" button located in the toolbar of the widg
61916191
});
61926192
</script>
61936193

6194+
### messages.commands.search `String` *(default: "Search...")*
6195+
6196+
Allows the customization of the placeholder text in the grid search panel.
6197+
6198+
#### Example
6199+
6200+
<div id="grid"></div>
6201+
<script>
6202+
$("#grid").kendoGrid({
6203+
columns: [
6204+
{ field: "name" },
6205+
{ field: "age" }
6206+
],
6207+
messages: {
6208+
commands: {
6209+
search: "Look for..."
6210+
}
6211+
},
6212+
dataSource: [ { name: "Jane", age: 30 }, { name: "John", age: 33 }],
6213+
toolbar:["search"]
6214+
});
6215+
</script>
6216+
61946217
### messages.commands.update `String`
61956218

61966219
Defines the text of the "Update" button that is rendered in `inline` or `popup` editing mode.

docs/api/javascript/ui/treelist.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2960,6 +2960,29 @@ Defines the text of the **Save Changes** button that saves modifed data rows.
29602960
});
29612961
</script>
29622962

2963+
### messages.commands.search `String` *(default: "Search...")*
2964+
2965+
Allows the customization of the placeholder text in the treelist search panel.
2966+
2967+
#### Example
2968+
2969+
<div id="treeList"></div>
2970+
<script>
2971+
$("#treeList").kendoTreeList({
2972+
columns: [ "name", "age" ],
2973+
dataSource: [
2974+
{ id: 1, parentId: null, name: "Jane Doe", age: 22 },
2975+
{ id: 2, parentId: 1, name: "John Doe", age: 24 }
2976+
],
2977+
toolbar:["search"],
2978+
messages: {
2979+
commands: {
2980+
search: "Look for..."
2981+
}
2982+
}
2983+
});
2984+
</script>
2985+
29632986
### messages.commands.cancel `String` *(default: "Cancel Changes")*
29642987

29652988
Defines the text of the **Cancel Changes** button that cancels all data modifications.

docs/controls/data-management/spreadsheet/end-user/list-of-shortcuts.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,26 @@ The following table provides a list of the keyboard shortcuts the Spreadsheet su
2626
| `Ctrl` + select rows or columns | Selects a range of adjacent or nonadjacent rows or columns. To simultaneously select more than one range of rows or columns, repeat this command. The selected ranges can also overlap. |
2727
| `Esc` | Cancels an entry in a cell or in the **Formula Bar** |
2828
| `Arrow` keys | Move a cell up, down, left, or right in a worksheet |
29-
| `Ctrl` + `Arrow` key | Moves to the edge of the current data region of the active worksheet |
29+
| `Ctrl` + `Arrow` key | Navigates to the last cell of the current series of data. If there is another set of data afterwards, the first cell of the new series will be selected. Otherwise, you will be navigated to the last cell of the worksheet in the corresponding direction |
3030
| `Shift` + `Arrow` key | Selects (a range of) adjacent cells, rows, or columns, by extending the selection by one cell, row, or column |
31-
| `Ctrl` + `Shift` + `Arrow` key | Extends the selection of cells to the last nonblank cell in the same row or column as the active cell |
32-
| `Down Arrow` / `Up Arrow` key | <ul><li>Selects the next or previous command when a menu or submenu is open</li> <li>In a dialog box, the arrow keys move between options in an active drop-down list, or between options in a group of options</li></ul> |
33-
| `Backspace` | <ul><li>Deletes one character to the left in the **Formula Bar**</li> <li>Removes the content of the active cell</li> <li>In cell editing mode, it deletes the character to the left of the insertion point</li></ul> |
34-
| `Delete` | <ul><li>Removes the content from selected cells without affecting cell formats</li> <li>In cell editing mode, it deletes the character to the right of the insertion point</li></ul> |
35-
| `End` | <ul><li>Goes to the far right cell of the active row</li> <li>Selects the last command on a visible and active menu or submenu</li></ul>
36-
| `Ctrl` + `End` | <ul><li>Moves to the last cell on a worksheet, in the lowest used row of the used column on the far right</li> <li>If the cursor is in the formula bar, `Ctrl` + `End` moves the cursor to the end of the text</li> <li>`Ctrl` + `End` moves to the last cell on a worksheet, in the lowest used row of the used column on the far right</li></ul> |
37-
| `Ctrl` + `Shift` + `End` | <ul><li>Extends the selection of cells to the last used cell on the worksheet located in lower-right corner</li> <li>If the cursor is in the formula bar, `Ctrl` + `Shift` + `End` selects all text in the formula bar from the cursor position to the end</li></ul> |
38-
| `Enter` | <ul><li>Completes a cell entry from the cell or the **Formula Bar**, and selects the cell below</li> <li>In a data form, it moves to the first field in the next record</li> <li>Opens a selected menu or performs the action for a selected command</li> <li>In a dialog box, it performs the action for the default command button in the dialog box (the button with the bold outline)</li></ul> |
39-
| `Esc` | <ul><li>Cancels an entry in the cell or **Formula Bar**</li> <li>Closes an open menu or submenu, dialog box, or message window</li></ul> |
40-
| `Home` | <ul><li>Moves to the beginning of a row in a worksheet</li> <li>Selects the first command on the menu when a menu or submenu is visible</li></ul> |
41-
| `Ctrl` + `Home` | Moves to the beginning of a worksheet |
31+
| `Ctrl` + `Shift` + `Arrow` key | Extends the selection of cells to the last cell of the current series of data. If there is another set of data afterwards, the cell selection will be extended to the first cell of the new series of data. Otherwise, the cell selection will be extended to the last cell of the worksheet in the corresponding direction |
32+
| `Down Arrow` / `Up Arrow` key | <ul><li>In a menu or a submenu, selects the next or previous command</li> <li>In a dialog box, the arrow keys move between options in an active drop-down list, or between options in a group of options</li></ul> |
33+
| `Backspace` | <ul><li>In the Formula bar, it deletes one character to the left from the formula text</li> <li>In cell selection mode, it removes the content of the active cell</li> <li>In cell editing mode, it deletes the character to the left of the insertion point</li></ul> |
34+
| `Delete` | <ul><li>In the Formula bar, it deletes the character to the right of the insertion point from the formula text</li><li>In cell selection mode, it removes the content from selected cells without affecting cell formats</li> <li>In cell editing mode, it deletes the character to the right of the insertion point</li></ul> |
35+
| `End` | <ul><li>In cell selection mode, moves to the far right cell of the active row</li> <li>In a menu or submenu, selects the last command</li></ul>
36+
| `Ctrl` + `End` | <ul><li>In cell selection mode, moves to the last cell on a worksheet, in the lowest used row of the used column on the bottom-right</li> <li>In the formula bar, `Ctrl` + `End` moves the cursor to the end of the text</li> </ul> |
37+
| `Ctrl` + `Shift` + `End` | <ul><li>In cell selection mode, extends the selection of cells to the last cell on the worksheet located in lower-right corner</li> <li>In the formula bar, `Ctrl` + `Shift` + `End` selects all text in the formula bar from the cursor position to the end</li></ul> |
38+
| `Enter` | <ul><li>In cell editing mode or in the **Formula bar**, completes a cell entry and selects the cell below</li> <li>In a data form, it moves to the first field in the next record</li> <li>In the command toolbar, opens a selected menu or performs the action for a selected command</li> <li>In a dialog box, it performs the action for the default command button in the dialog box (the button with the bold outline)</li></ul> |
39+
| `Esc` | <ul><li>In cell editing mode or in the **Formula bar**, cancels an entry in the cell or **Formula Bar**</li> <li>Closes an open menu or submenu, dialog box, or message window</li></ul> |
40+
| `Home` | <ul><li>In cell selection mode, moves to the beginning of a row in a worksheet</li> <li>In a menu or submenu, selects the first command</li></ul> |
41+
| `Ctrl` + `Home` | <ul><li>In cell selection mode, moves to the first cell (the top-left cell) on a worksheet</li> <li>In the formula bar, `Ctrl` + `Home` moves the cursor to the beginning of the text</li> </ul> |
4242
| `Ctrl` + `Shift` + `Home` | Extends the selection of cells to the beginning of the worksheet |
4343
| `Page Down` | Moves one screen down in a worksheet |
4444
| `Page Up` | Moves one screen up in a worksheet |
4545
| `Spacebar` | In a dialog box, performs the action for the selected button, or selects or clears a check box |
4646
| `Alt` + `Spacebar` | Displays the **Control** menu for the Spreadsheet window |
47-
| `Tab` | <ul><li>Moves one cell to the right in a worksheet</li> <li>Moves to the next option or option group in a dialog box</li> <li>Moves a cell within an active range of cells, rows, or columns.</li><li>If the currently active cell is the last cell in the Sheet (the cell on the last row in the last column), pressing `Tab` will move the focus outside of the Spreadsheet to the next focusable element on the page.</li></ul> |
48-
| `Shift` + `Tab` | <ul><li>Moves to the previous cell in a worksheet or the previous option in a dialog box.</li><li><li>If the currently active cell is the first cell in the Sheet (the cell on the first row in the first column), pressing `Shift` + `Tab` will move the focus outside of the Sheet to the Named ranges ComboBox on the Spreadsheet Toolbar.</li></li></ul> |
47+
| `Tab` | <ul><li>In cell selection mode, moves one cell to the right in a worksheet.</li> <li>In a dialog box, moves to the next option or option group in a dialog box</li> <li>In range selection of cells, rows or columns, moves to the next cell within the active range. If the focus is on the last cell (the bottom-right cell) in the range, the focus will return to the first cell on the top-left</li><li>If the currently active cell is the last cell in the Sheet (the cell on the last row in the last column), pressing `Tab` will move the focus outside of the Spreadsheet to the next focusable element on the page.</li></ul> |
48+
| `Shift` + `Tab` | <ul><li>In cell selection mode, moves one cell to the right in a worksheet</li> <li>In a dialog box, moves to the next option or option group in a dialog box</li> <li>In range selection of cells, rows or columns, moves to the previous cell within the active range. If the focus is on the first cell (the top-left cell) in the range, the focus will return to the last cell on the bottom-right</li> <li><li>If the currently active cell is the first cell in the Sheet (the cell on the first row in the first column), pressing `Shift` + `Tab` will move the focus outside of the Sheet to the Named ranges ComboBox on the Spreadsheet Toolbar.</li></li></ul> |
4949

5050
When the focus is within the Spreadsheet Sheet, fast way to navigate away from the Spreadsheet is to press `Ctrl` + `End` (to move the focus to the last cell on the Sheet) and the `Tab`. Similarly, to move the focus from the Sheet to the Spreadsheet Toolbar, press `Ctrl` + `Home` and then `Shift` + `Tab`.
5151

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"version": "1.0.0",
1212
"dependencies": {},
1313
"devDependencies": {
14-
"@progress/kendo-theme-bootstrap": "^4.0.0",
15-
"@progress/kendo-theme-default": "^4.0.0",
16-
"@progress/kendo-theme-material": "^3.0.0",
14+
"@progress/kendo-theme-bootstrap": "4.10.2",
15+
"@progress/kendo-theme-default": "4.12.2",
16+
"@progress/kendo-theme-material": "3.10.2",
1717
"amd-optimize": "0.6.1",
1818
"autoprefixer": "^9.1.5",
1919
"bootstrap": "^4.0.0",

src/kendo.pager.js

Lines changed: 32 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ var __meta__ = { // jshint ignore:line
2626
KEYDOWN = "keydown",
2727
DISABLED = "disabled",
2828
MOUSEDOWN = "down",
29+
DOCUMENT_ELEMENT = $(document.documentElement),
2930
MAX_VALUE = Number.MAX_VALUE,
3031
iconTemplate = kendo.template('<a href="\\#" aria-label="#=text#" title="#=text#" class="k-link k-pager-nav #= wrapClassName #"><span class="k-icon #= className #"></span></a>');
3132

@@ -39,14 +40,6 @@ var __meta__ = { // jshint ignore:line
3940
});
4041
}
4142

42-
function selectOption(template, idx, text, selected) {
43-
return template( {
44-
idx: idx,
45-
text: text || idx,
46-
selected: selected || false
47-
});
48-
}
49-
5043
function icon(className, text, wrapClassName) {
5144
return iconTemplate({
5245
className: className.substring(1),
@@ -91,7 +84,6 @@ var __meta__ = { // jshint ignore:line
9184
that.linkTemplate = kendo.template(that.options.linkTemplate);
9285
that.selectTemplate = kendo.template(that.options.selectTemplate);
9386
that.currentPageTemplate = kendo.template(that.options.currentPageTemplate);
94-
that.numericSelectItemTemplate = kendo.template(that.options.numericSelectItemTemplate);
9587

9688
page = that.page();
9789
totalPages = that.totalPages();
@@ -100,7 +92,6 @@ var __meta__ = { // jshint ignore:line
10092

10193
that.dataSource.bind(CHANGE, that._refreshHandler);
10294
that.downEvent = kendo.applyEventMap(MOUSEDOWN, kendo.guid());
103-
10495
if (options.previousNext) {
10596
if (!that.element.find(FIRST).length) {
10697
that.element.append(icon(FIRST, options.messages.first, "k-pager-first"));
@@ -116,33 +107,16 @@ var __meta__ = { // jshint ignore:line
116107
}
117108

118109
if (options.numeric) {
119-
if (!that._numericWrap) {
120-
that._numericWrap = that.element.find(".k-pager-numbers-wrap");
121-
122-
if (that._numericWrap.length === 0) {
123-
that._numericWrap = $("<div class='k-pager-numbers-wrap' />").appendTo(that.element);
124-
}
125-
}
126-
127-
if (!that._numericSelect) {
128-
that._numericSelect = that._numericWrap.find(".k-dropdown");
129-
130-
if (that._numericSelect.length === 0) {
131-
that._numericSelect = $("<select class='k-dropdown' />").appendTo(that._numericWrap);
132-
}
133-
}
134-
135-
if (!that.list) {
136-
that.list = that._numericWrap.find(".k-pager-numbers");
110+
that.list = that.element.find(".k-pager-numbers");
137111

138-
if (that.list.length === 0) {
139-
that.list = $('<ul class="k-pager-numbers" />').appendTo(that._numericWrap);
140-
}
112+
if (!that.list.length) {
113+
that.list = $('<ul class="k-pager-numbers k-reset" />').appendTo(that.element);
141114
}
142-
143115
if (options.dataSource && !options.dataSource.total()) {
144-
that._numericSelect.empty().append("<option value='0' />");
145-
that.list.empty().append(that.selectTemplate({ text: 0 }));
116+
that.list.empty().append(that.currentPageTemplate({ text: 0 })).append(that.selectTemplate({ text: 0 }));
117+
}
118+
if (!that.list.parent().hasClass("k-pager-numbers-wrap")) {
119+
that.list.wrap('<div class="k-pager-numbers-wrap"></div>');
146120
}
147121
}
148122

@@ -215,9 +189,10 @@ var __meta__ = { // jshint ignore:line
215189

216190
that.element
217191
.on(CLICK + NS , "a", proxy(that._click, that))
218-
.on(CHANGE + NS , "select.k-dropdown", proxy(that._numericSelectChange, that))
219192
.addClass("k-pager-wrap k-widget k-floatwrap");
220193

194+
that.element.on(CLICK + NS , ".k-current-page", proxy(that._toggleActive, that));
195+
221196
if (options.autoBind) {
222197
that.refresh();
223198
}
@@ -226,7 +201,6 @@ var __meta__ = { // jshint ignore:line
226201
$(window).on("resize" + NS, that._resizeHandler);
227202

228203
sizeClassName = that._getWidthSizeClass(that.element.width());
229-
230204
if (sizeClassName) {
231205
that.element.addClass(sizeClassName);
232206
}
@@ -257,8 +231,6 @@ var __meta__ = { // jshint ignore:line
257231
selectTemplate: '<li><span class="k-link k-state-selected">#=text#</span></li>',
258232
currentPageTemplate: '<li class="k-current-page"><span class="k-link k-pager-nav">#=text#</span></li>',
259233
linkTemplate: '<li><a tabindex="-1" href="\\#" class="k-link" data-#=ns#page="#=idx#" #if (title !== "") {# title="#=title#" #}#>#=text#</a></li>',
260-
numericItemTemplate: '<li><a tabindex="-1" href="\\#" class="k-link" data-#=ns#page="#=idx#" #if (title !== "") {# title="#=title#" #}#>#=text#</a></li>',
261-
numericSelectItemTemplate: '<option value="#= idx #" #if (selected) {# selected="selected" #}#>#= text #</option>',
262234
buttonCount: 10,
263235
autoBind: true,
264236
numeric: true,
@@ -322,16 +294,15 @@ var __meta__ = { // jshint ignore:line
322294
reminder,
323295
page = that.page(),
324296
html = "",
325-
selectHtml = "",
326297
options = that.options,
327298
pageSize = that.pageSize(),
328299
collapsedTotal = that._collapsedTotal(),
329300
total = that.dataSource.total(),
330301
totalPages = that.totalPages(),
331302
linkTemplate = that.linkTemplate,
332-
numericSelectItemTemplate = that.numericSelectItemTemplate,
333303
buttonCount = options.buttonCount;
334304

305+
DOCUMENT_ELEMENT.unbind(that.downEvent, $.proxy(that._hideList, that));
335306
if (e && e.action == "itemchange") {
336307
return;
337308
}
@@ -340,33 +311,31 @@ var __meta__ = { // jshint ignore:line
340311

341312
if (page > buttonCount) {
342313
reminder = (page % buttonCount);
314+
343315
start = (reminder === 0) ? (page - buttonCount) + 1 : (page - reminder) + 1;
344316
}
345317

346318
end = Math.min((start + buttonCount) - 1, totalPages);
347319

348320
if (start > 1) {
349321
html += button(linkTemplate, start - 1, "...", false, options.messages.morePages);
350-
selectHtml += selectOption(numericSelectItemTemplate, start - 1, options.messages.morePages);
351322
}
352323

353324
for (idx = start; idx <= end; idx++) {
354325
html += button(idx == page ? that.selectTemplate : linkTemplate, idx, idx, true);
355-
selectHtml += selectOption(numericSelectItemTemplate, idx, idx, idx == page);
356326
}
357327

358328
if (end < totalPages) {
359329
html += button(linkTemplate, idx, "...", false, options.messages.morePages);
360-
selectHtml += selectOption(numericSelectItemTemplate, idx, options.messages.morePages);
361330
}
362331

363332
if (html === "") {
364333
html = that.selectTemplate({ text: 0 });
365-
selectHtml = $("<option value='0' />");
366334
}
367335

368-
that.list.html(html);
369-
that._numericSelect.html(selectHtml);
336+
html = this.currentPageTemplate({ text: page }) + html;
337+
338+
that.list.removeClass("k-state-expanded").html(html);
370339
}
371340

372341
if (options.info) {
@@ -463,14 +432,25 @@ var __meta__ = { // jshint ignore:line
463432
}
464433
},
465434

466-
_numericSelectChange: function(e) {
467-
var target = e.currentTarget;
468-
var value = target.value;
469-
var page = parseInt(value, 10);
435+
_toggleActive: function() {
436+
var that = this;
437+
438+
if (that.list.hasClass("k-state-expanded")) {
439+
DOCUMENT_ELEMENT.unbind(that.downEvent, $.proxy(that._hideList, that));
440+
} else {
441+
DOCUMENT_ELEMENT.bind(that.downEvent, $.proxy(that._hideList, that));
442+
}
443+
that.list.toggleClass("k-state-expanded");
444+
},
470445

471-
target.blur();
446+
_hideList: function(e) {
447+
var that = this,
448+
target = kendo.eventTarget(e);
472449

473-
this.page(page);
450+
if (!$.contains(that.list[0], target)) {
451+
DOCUMENT_ELEMENT.unbind(that.downEvent, $.proxy(that._hideList, that));
452+
that.list.removeClass("k-state-expanded");
453+
}
474454
},
475455

476456
_click: function(e) {

0 commit comments

Comments
 (0)