Skip to content

Commit 903cb6a

Browse files
committed
Sync with Kendo UI Professional
1 parent 57d6438 commit 903cb6a

File tree

7 files changed

+59
-25
lines changed

7 files changed

+59
-25
lines changed

docs/api/javascript/ui/pager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Specifies a template used to populate the value of the aria-label attribute of t
3434
dataSource.read();
3535

3636
$("#pager").kendoPager({
37-
ARIATemplate: "Current page is #=page#"
37+
ARIATemplate: "Current page is #=page#",
3838
dataSource: dataSource
3939
});
4040
</script>

docs/api/javascript/ui/panelbar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ A string, DOM element or jQuery object which represents the item. A string is tr
865865
});
866866

867867
var panelBar = $("#panelBar").data("kendoPanelBar");
868-
var dataItem = panelBar.dataItem(".k-item:first");
868+
var dataItem = panelBar.dataItem(".k-panelbar-item:first");
869869
/* The result can be observed in the DevTools(F12) console of the browser. */
870870
console.log(dataItem.text); // displays "foo"
871871
</script>

docs/api/javascript/ui/pdfviewer.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ The width of the PDFViewer.
186186

187187
#### Example - customizing the width of the viewer
188188

189+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
189190
<div id="pdf-viewer"></div>
190191
<script>
191192
$("#pdf-viewer").kendoPDFViewer({
@@ -199,6 +200,7 @@ The height of the PDFViewer.
199200

200201
#### Example - customizing the height of the viewer
201202

203+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
202204
<div id="pdf-viewer"></div>
203205
<script>
204206
$("#pdf-viewer").kendoPDFViewer({
@@ -212,6 +214,7 @@ Specifies the default page size if no PDF is displayed in the PDFViewer. The pag
212214

213215
#### Example - customizing the default page sizes
214216

217+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
215218
<div id="pdf-viewer"></div>
216219
<script>
217220
$("#pdf-viewer").kendoPDFViewer({
@@ -236,6 +239,7 @@ Specifies the default scale of the pages.
236239

237240
#### Example - customizing the scale
238241

242+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
239243
<div id="pdf-viewer"></div>
240244
<script>
241245
$("#pdf-viewer").kendoPDFViewer({
@@ -252,6 +256,7 @@ Specifies the minimum zoom that could be applied to the pages.
252256

253257
#### Example - customizing the zoomMin
254258

259+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
255260
<div id="pdf-viewer"></div>
256261
<script>
257262
$("#pdf-viewer").kendoPDFViewer({
@@ -268,6 +273,7 @@ Specifies the maximum zoom that could be applied to the pages.
268273

269274
#### Example - customizing the zoomMax
270275

276+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
271277
<div id="pdf-viewer"></div>
272278
<script>
273279
$("#pdf-viewer").kendoPDFViewer({
@@ -284,6 +290,7 @@ Specifies the zoom rate that could be applied to the pages. Used when zooming on
284290

285291
#### Example - customizing the zoomRate
286292

293+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
287294
<div id="pdf-viewer"></div>
288295
<script>
289296
$("#pdf-viewer").kendoPDFViewer({
@@ -304,6 +311,7 @@ Defines the surface type. It accepts `canvas` or `svg`. This option is supported
304311

305312
#### Example - customizing the type of pages' surfaces
306313

314+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
307315
<div id="pdf-viewer"></div>
308316
<script>
309317
$("#pdf-viewer").kendoPDFViewer({
@@ -335,6 +343,7 @@ For DPL Processing `exportAs` tool could be configured to export a single page t
335343

336344
#### Example - customizing the toolbar items
337345

346+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
338347
<div id="pdf-viewer"></div>
339348
<script>
340349
$("#pdf-viewer").kendoPDFViewer({
@@ -349,6 +358,7 @@ For DPL Processing `exportAs` tool could be configured to export a single page t
349358

350359
#### Example - customizing the pager default tool
351360

361+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
352362
<div id="pdf-viewer"></div>
353363
<script>
354364
$("#pdf-viewer").kendoPDFViewer({
@@ -362,6 +372,7 @@ For DPL Processing `exportAs` tool could be configured to export a single page t
362372

363373
#### Example - customizing the zoom default tool
364374

375+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
365376
<div id="pdf-viewer"></div>
366377
<script>
367378
$("#pdf-viewer").kendoPDFViewer({
@@ -413,6 +424,7 @@ Specifies what element will be added in the ToolBar wrapper. Items with template
413424

414425
#### Example
415426

427+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
416428
<div id="pdf-viewer"></div>
417429
<script>
418430
$("#pdf-viewer").kendoPDFViewer({

src/kendo.core.js

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defaultBreakpoints, mediaQuery } from './utils/mediaquery.js';
2+
import { fromESClass } from './utils/convert-class.js';
23

34
export const __meta__ = {
45
id: "core",
@@ -257,27 +258,7 @@ var packageMetadata = {
257258
return deferred.promise();
258259
};
259260

260-
kendo.ConvertClass = function(proto) {
261-
let all = kendo.getAllMethods(proto);
262-
let baseClass = kendo.getBaseClass(proto);
263-
264-
while (baseClass) {
265-
all = all.concat(kendo.getAllMethods(baseClass));
266-
baseClass = kendo.getBaseClass(baseClass);
267-
}
268-
269-
let extended = Class.extend({
270-
init: function() {
271-
this._instance = new proto(...arguments);
272-
}
273-
});
274-
275-
for (var idx = 0; idx < all.length; idx++) {
276-
kendo.createProxyMember(extended, all[idx]);
277-
}
278-
279-
return extended;
280-
};
261+
kendo.ConvertClass = fromESClass;
281262

282263
const isPresent = kendo.isPresent = (value) => value !== null && value !== undefined;
283264
const isBlank = kendo.isBlank = (value) => value === null || value === undefined;
@@ -5616,4 +5597,6 @@ function pad(number, digits, end) {
56165597
}
56175598

56185599
})(jQuery, window);
5600+
5601+
export { fromESClass };
56195602
export default kendo;

src/kendo.multiselect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ export const __meta__ = {
15561556
}
15571557

15581558
element.removeAttr("accesskey");
1559-
input.attr("data-validate", false);
1559+
input.attr("data-validate", "false");
15601560

15611561
that._focused = that.input = input.attr({
15621562
"autocomplete": AUTOCOMPLETEVALUE,

src/kendo.numerictextbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ export const __meta__ = {
580580

581581
if (text.length < 2) {
582582
text = $('<input type="text"/>')
583-
.attr(kendo.attr("validate"), false)
583+
.attr(kendo.attr("validate"), "false")
584584
.insertBefore(element);
585585
}
586586

src/utils/convert-class.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
export function fromESClass(ESClass) {
2+
class ExtendedClass extends ESClass {
3+
static extend(proto) {
4+
const subclass = class extends ExtendedClass {
5+
constructor() {
6+
super();
7+
if (proto && proto.init) {
8+
proto.init.apply(this, arguments);
9+
}
10+
}
11+
};
12+
13+
// Copy the prototype so that the constructor is not overwritten
14+
Object.assign(subclass.prototype, proto);
15+
16+
addInstanceGetter(subclass.prototype);
17+
18+
// Apply the prototype to fn to allow for chaining
19+
subclass.fn = subclass.prototype;
20+
21+
return subclass;
22+
}
23+
}
24+
25+
addInstanceGetter(ExtendedClass.prototype);
26+
27+
// Apply the prototype to fn to allow for chaining
28+
ExtendedClass.fn = ExtendedClass.prototype;
29+
30+
return ExtendedClass;
31+
}
32+
33+
function addInstanceGetter(proto) {
34+
Object.defineProperty(proto, '_instance', {
35+
get: function() {
36+
return this;
37+
}
38+
});
39+
}

0 commit comments

Comments
 (0)