Skip to content

Commit d223733

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 9d0b3c7 commit d223733

File tree

7 files changed

+59
-55
lines changed

7 files changed

+59
-55
lines changed

docs/api/javascript/ui/filemanager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ Defines the localization messages for the toolbar.
828828

829829
### messages.toolbar.createFolder `String`
830830

831-
### messages.toolbar.uploadDialog `String`
831+
### messages.toolbar.upload `String`
832832

833833
### messages.toolbar.sortDirection `String`
834834

docs/api/javascript/ui/panelbar.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ data source is fired. By default the widget will bind to the data source specifi
258258
259259
#### Example - disable automatic binding
260260

261-
<div id="panelbar"></div>
261+
<ul id="panelbar"></ul>
262262
<script>
263263
var dataSource = new kendo.data.HierarchicalDataSource({
264264
data: [ { text: "Jane Doe" }, { text: "John Doe" }]
@@ -301,7 +301,7 @@ Sets the field of the data item that provides the image URL of the **PanelBar**
301301

302302
#### Example - specify custom image URL field
303303

304-
<div id="panelbar"></div>
304+
<ul id="panelbar"></ul>
305305
<script>
306306
var items = [
307307
{ text: "Baseball", image: "https://demos.telerik.com/kendo-ui/content/shared/icons/sports/baseball.png" },
@@ -323,7 +323,7 @@ If the `dataSource` option is an existing [kendo.data.HierarchicalDataSource](/a
323323

324324
#### Example - set dataSource as a JavaScript object
325325

326-
<div id="panelbar"></div>
326+
<ul id="panelbar"></ul>
327327
<script>
328328
$("#panelbar").kendoPanelBar({
329329
dataSource: {
@@ -378,7 +378,7 @@ If the `dataSource` option is an existing [kendo.data.HierarchicalDataSource](/a
378378

379379
#### Example - set dataSource as an existing kendo.data.HierarchicalDataSource instance
380380

381-
<div id="panelbar"></div>
381+
<ul id="panelbar"></ul>
382382
<script>
383383
var dataSource = new kendo.data.HierarchicalDataSource({
384384
transport: {
@@ -413,7 +413,7 @@ If an array, each level uses the field that is at the same index in the array, o
413413
background-image: url("https://demos.telerik.com/kendo-ui/content/shared/styles/flags.png");
414414
}
415415
</style>
416-
<div id="panelbar"></div>
416+
<ul id="panelbar"></ul>
417417
<script>
418418
var items = [
419419
{ text: "Brazil", sprite: "brazilFlag" },
@@ -432,7 +432,7 @@ If an array, each level uses the field that is at the same index in the array, o
432432

433433
#### Example
434434

435-
<div id="panelbar"></div>
435+
<ul id="panelbar"></ul>
436436
<script>
437437
var items = [
438438
{ ProductName: "Tea", items: [
@@ -449,7 +449,7 @@ If an array, each level uses the field that is at the same index in the array, o
449449

450450
#### Example - using different fields on different levels
451451

452-
<div id="panelbar"></div>
452+
<ul id="panelbar"></ul>
453453
<script>
454454
var items = [
455455
{ CategoryName: "Tea", items: [
@@ -470,7 +470,7 @@ Sets the field of the data item that provides the link URL of the nodes.
470470

471471
#### Example
472472

473-
<div id="panelbar"></div>
473+
<ul id="panelbar"></ul>
474474
<script>
475475
var items = [
476476
{ text: "Tea", LinksTo: "http://tea.example.com" },
@@ -526,7 +526,7 @@ Setting this to false causes all child DataSources to be loaded at initializatio
526526

527527
#### Example - force lazy loading of sublevels
528528

529-
<div id="panelbar"></div>
529+
<ul id="panelbar"></ul>
530530
<script>
531531
$("#panelbar").kendoPanelBar({
532532
loadOnDemand: true,
@@ -544,7 +544,7 @@ The text messages displayed in the widget. Use it to customize or localize the m
544544

545545
#### Example - customize PanelBar messages
546546

547-
<div id="panelbar"></div>
547+
<ul id="panelbar"></ul>
548548
<script>
549549
$("#panelbar").kendoPanelBar({
550550
dataSource: {
@@ -571,7 +571,7 @@ The text message shown while the root level items are loading.
571571

572572
#### Example - customize loading message
573573

574-
<div id="panelbar"></div>
574+
<ul id="panelbar"></ul>
575575
<script>
576576
$("#panelbar").kendoPanelBar({
577577
dataSource: {
@@ -596,7 +596,7 @@ The text message shown when an error occurs while fetching the content.
596596

597597
#### Example - customize requestFailed message
598598

599-
<div id="panelbar"></div>
599+
<ul id="panelbar"></ul>
600600
<script>
601601
$("#panelbar").kendoPanelBar({
602602
dataSource: {
@@ -621,7 +621,7 @@ The text message shown in the retry button.
621621

622622
#### Example - customize retry message
623623

624-
<div id="panelbar"></div>
624+
<ul id="panelbar"></ul>
625625
<script>
626626
$("#panelbar").kendoPanelBar({
627627
dataSource: {
@@ -646,7 +646,7 @@ Template for rendering each node.
646646

647647
#### Example
648648

649-
<div id="panelbar"></div>
649+
<ul id="panelbar"></ul>
650650
<script>
651651
$("#panelbar").kendoPanelBar({
652652
template: "#= item.text # (#= item.inStock #)",
@@ -817,7 +817,7 @@ A string, DOM element or jQuery object which represents the item. A string is tr
817817

818818
#### Example - get the data item of the first node
819819

820-
<div id="panelBar"></div>
820+
<ul id="panelBar"></ul>
821821
<script>
822822
$("#panelBar").kendoPanelBar({
823823
dataSource: [
@@ -1450,7 +1450,7 @@ The node whose children have been changed. If the changes have occurred on the r
14501450

14511451
#### Example - subscribe to the "dataBound" event during initialization
14521452

1453-
<div id="panelbar"></div>
1453+
<ul id="panelbar"></ul>
14541454
<script>
14551455
$("#panelbar").kendoPanelBar({
14561456
dataSource: [
@@ -1466,7 +1466,7 @@ The node whose children have been changed. If the changes have occurred on the r
14661466

14671467
#### Example - subscribe to the "dataBound" event after initialization
14681468

1469-
<div id="panelbar"></div>
1469+
<ul id="panelbar"></ul>
14701470
<script>
14711471
function panelbar_dataBound(e) {
14721472
console.log("DataBound", e.node);
@@ -1484,7 +1484,7 @@ The node whose children have been changed. If the changes have occurred on the r
14841484

14851485
#### Example - show an empty message when no items have been loaded from the server
14861486

1487-
<div id="panelbar"></div>
1487+
<ul id="panelbar"></ul>
14881488
<script>
14891489
$("#panelbar").kendoPanelBar({
14901490
dataSource: [],

docs/api/javascript/ui/scheduler.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4299,16 +4299,16 @@ The complete list of the supported timezones is available in the [List of IANA t
42994299

43004300
### toolbar `Array`
43014301

4302-
List of commands that the scheduler will display in its toolbar as buttons. Currently supports only the "pdf" command.
4302+
List of commands that the scheduler will display in its toolbar as buttons. Currently supports only the "pdf" and "search" commands.
43034303

4304-
The "pdf" command exports the scheduler in PDF format.
4304+
The "pdf" command exports the scheduler in PDF format. The "search" option allows searching through Scheduler events titles.
43054305

43064306
#### Example - specify the toolbar commands as array of strings
43074307

43084308
<div id="scheduler"></div>
43094309
<script>
43104310
$("#scheduler").kendoScheduler({
4311-
toolbar: ["pdf"],
4311+
toolbar: ["pdf", "search"],
43124312
date: new Date("2013/6/6"),
43134313
dataSource: [
43144314
{

docs/controls/editors/editor/preventing-xss.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,35 @@ To allow the execution of scripts inside the Editor content:
4747

4848
## Serialization and Deserialization
4949

50-
Script tags and DOM event attributes stripping, as well as value encoding, are built-in functionalities of the Editor. In addition, you can use the [`serialization.custom`](/api/javascript/ui/editor/configuration/serialization.custom) and [`deserialization.custom`](/api/javascript/ui/editor/configuration/deserialization.custom) options of the Editor, to implement your own sanitizing functionality.
50+
Script tags and DOM event attributes stripping, as well as value encoding, are built-in functionalities of the Editor. In addition, you can use the [`serialization.custom`](/api/javascript/ui/editor/configuration/serialization.custom) and [`deserialization.custom`](/api/javascript/ui/editor/configuration/deserialization.custom) options of the Editor.
5151

52-
The following example demonstrates how to use the serialization and deserialization custom otpions, to sanitize the value of the Editor and remove `object` tags.
52+
The following example demonstrates how to use the serialization and deserialization custom otpions, to sanitize the value of the Editor by using [DOMPurify](https://github.com/cure53/DOMPurify) library.
5353

5454
```dojo
55+
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/2.0.12/purify.min.js"></script>
56+
5557
<textarea id="editor"></textarea>
5658
<script>
57-
function sanitizeHtml(html) {
58-
var temp = $("<div></div>").html(html);
59-
temp.find("object").remove();
60-
return temp.html() || "\ufeff";
61-
}
62-
63-
$("#editor").kendoEditor({
64-
tools: [
65-
"viewHtml"
66-
],
67-
deserialization: {
68-
custom: function(html) {
69-
return sanitizeHtml(html);
70-
}
71-
},
72-
serialization: {
73-
custom: function(html) {
74-
return sanitizeHtml(html);
75-
}
59+
function sanitizeHtml(html) {
60+
var temp = $("<div></div>").html(window.DOMPurify.sanitize(html));
61+
return temp.html() || "\ufeff";
7662
}
77-
});
63+
64+
$("#editor").kendoEditor({
65+
tools: [
66+
"viewHtml"
67+
],
68+
deserialization: {
69+
custom: function(html) {
70+
return sanitizeHtml(html);
71+
}
72+
},
73+
serialization: {
74+
custom: function(html) {
75+
return sanitizeHtml(html);
76+
}
77+
}
78+
});
7879
7980
var editor = $("#editor").getKendoEditor();
8081

src/kendo.panelbar.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,12 @@ var __meta__ = { // jshint ignore:line
400400
"# } #" +
401401
"</li>"
402402
),
403-
loading: template("<div class='k-item'><span class='k-icon k-i-loading'></span> #: data.messages.loading #</div>"),
403+
loading: template("<li class='k-item'><span class='k-icon k-i-loading'></span> #: data.messages.loading #</li>"),
404404
retry: template(
405-
"#: data.messages.requestFailed # " +
406-
"<button class='k-button k-request-retry'>#: data.messages.retry #</button>"
405+
"<li class='k-item'>" +
406+
"#: data.messages.requestFailed # " +
407+
"<button class='k-button k-request-retry'>#: data.messages.retry #</button>" +
408+
"</li>"
407409
),
408410
arrow: template("<span class='#= arrowClass(item) #'></span>"),
409411
empty: template("")

src/kendo.window.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,8 +1827,8 @@
18271827
that.resizeDirection = e.currentTarget.prop("className").replace("k-resize-handle k-resize-", "");
18281828

18291829
that.initialSize = {
1830-
width: wrapper.width(),
1831-
height: wrapper.height()
1830+
width: wrapper.outerWidth(),
1831+
height: wrapper.outerHeight()
18321832
};
18331833

18341834
wnd._updateBoundaries();
@@ -1949,6 +1949,7 @@
19491949
if (this._preventDragging) {
19501950
return;
19511951
}
1952+
19521953
var that = this,
19531954
wnd = that.owner,
19541955
wrapper = wnd.wrapper;

tests/window/interaction.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,19 @@
161161
});
162162

163163
it("resizing window horizontally does not update vertical positioning", function() {
164-
var initialWidth = dialog.wrapper.width();
164+
var initialHeight= dialog.wrapper.outerHeight();
165165

166-
resize("w", 0, 100);
166+
resize("w", 100, 0);
167167

168-
assert.equal(dialog.wrapper.width(), initialWidth);
168+
assert.equal(dialog.wrapper.outerHeight(), initialHeight);
169169
});
170170

171171
it("resizing window vertically does not update horizontal positioning", function() {
172-
var initialHeight = dialog.wrapper.height();
172+
var initialWidth = dialog.wrapper.outerWidth();
173173

174-
resize("n", 100, 0);
174+
resize("n", 0, 100);
175175

176-
assert.equal(dialog.wrapper.height(), initialHeight);
176+
assert.equal(dialog.wrapper.outerWidth(), initialWidth);
177177
});
178178
});
179179

0 commit comments

Comments
 (0)