Skip to content

Commit a24c184

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 51df02e commit a24c184

File tree

399 files changed

+2531
-1644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

399 files changed

+2531
-1644
lines changed

docs/AngularJS/Troubleshooting/common-issues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ For example, a DatePicker with an empty `value` attribute will not initialize.
2929
});
3030
```
3131
32-
In the previous example, the widget checks the `tag` element attributes and finds a `value` attribute, because it has a [`value`](/api/javascript/ui/datepicker#configuration-value) option. The evaluation against the `$scope` returns `undefined` and the widget does not initialize.
32+
In the previous example, the widget checks the `tag` element attributes and finds a `value` attribute, because it has a [`value`](/api/javascript/ui/datepicker/configuration/value) option. The evaluation against the `$scope` returns `undefined` and the widget does not initialize.
3333
3434
**Solution**
3535

docs/AngularJS/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ To bind the value of widgets that provide a `value()` method to the AngularJS sc
211211
<label>Birthday: <input kendo-date-picker ng-model="birthday" /></label>
212212
<p>
213213
Your selection: {% raw %}{{ birthday }}{% endraw %}
214-
</p>
214+
</p>
215215
</div>
216216
<script>
217217
angular.module("app", ["kendo.directives"]).controller("MyCtrl", function($scope) {
@@ -409,7 +409,7 @@ The following example demonstrates how to use some of these local variables.
409409
console.log("Selected: "+ selected.selected,data,dataIteam,angularDataItem);
410410
console.log("data: ", data);
411411
console.log("dataIteam: ", dataIteam);
412-
console.log("angularDataItem: ", angularDataItem);
412+
console.log("angularDataItem: ", angularDataItem);
413413
}
414414
$scope.mainGridOptions = {
415415
dataSource: {
@@ -679,7 +679,7 @@ AngularJS creates a new scope for the content placed in a window. The reason for
679679

680680
The available workaround is either:
681681

682-
* To use the [`appendTo`](http://docs.telerik.com/kendo-ui/api/javascript/ui/window#configuration-appendTo) option to append the window to another HTML element which is part of the Angular application and scope, or
682+
* To use the [`appendTo`](http://docs.telerik.com/kendo-ui/api/javascript/ui/window/configuration/appendto) option to append the window to another HTML element which is part of the Angular application and scope, or
683683
* To initialize the AngularJS application on the body.
684684

685685
The following example demonstrates the first approach and it shows how to find the window or popup element and get the scope from it.

docs/AngularJS/the-grid-widget.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This article outlines some of its particularities regarding the AngularJS integr
1616

1717
> **Important**
1818
>
19-
> AngularJS evaluates a template expression placed as [`column.title`](/api/javascript/ui/grid#configuration-columns.title) content. To avoid this behavior, set a [`ng-non-bindable`](https://docs.angularjs.org/api/ng/directive/ngNonBindable) attribute through the [`headerAttributes`](/api/javascript/ui/grid#configuration-columns.headerAttributes) so that AngularJS skips the expression evaluation.
19+
> AngularJS evaluates a template expression placed as [`column.title`](/api/javascript/ui/grid/configuration/columns.title) content. To avoid this behavior, set a [`ng-non-bindable`](https://docs.angularjs.org/api/ng/directive/ngNonBindable) attribute through the [`headerAttributes`](/api/javascript/ui/grid/configuration/columns.headerattributes) so that AngularJS skips the expression evaluation.
2020
2121
The following example demonstrates how to use the `headerAttributes` to prevent the execution of expressions inside the title content.
2222

@@ -219,7 +219,7 @@ The following example demonstrates how to use the `sum` aggregate in a `footerTe
219219
<script src="https://demos.telerik.com/kendo-ui/content/shared/js/products.js"></script>
220220

221221
<div id="example" ng-app="KendoDemos">
222-
<div ng-controller="MyCtrl">
222+
<div ng-controller="MyCtrl">
223223
<kendo-grid options="mainGridOptions" k-data-source="ds"></kendo-grid>
224224
</div>
225225
</div>
@@ -240,7 +240,7 @@ The following example demonstrates how to use the `sum` aggregate in a `footerTe
240240
aggregate: [
241241
{ field: "UnitPrice", aggregate: "sum" },
242242
{ field: "UnitsInStock", aggregate: "sum" }
243-
]});
243+
]});
244244
245245
$scope.mainGridOptions = {
246246
height: 500,
@@ -258,7 +258,7 @@ The following example demonstrates how to use the `sum` aggregate in a `footerTe
258258
groupFooterTemplate: "{% raw %}{{ dataItem.UnitsInStock.sum }}{% endraw %}"
259259
}
260260
]
261-
};
261+
};
262262
});
263263
</script>
264264
```

docs/AngularJS/tutorials/sushi-angular-tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ For a live preview, click [here](http://dojo.telerik.com/@valchev/exeS).
116116

117117
### Making the Application SEO-Friendly
118118

119-
To [create a SEO (Search Engine Optimization)-friendly](http://googlewebmastercentral.blogspot.com/2009/10/proposal-for-making-ajax-crawlable.html) mobile application, all you need to do is turn on the [`hashBang`](/api/javascript/mobile/application#configuration-hashBang) configuration. The configuration can also be set directly [in the markup]({% slug angularjs_integration_directives %}#widget-options-in-html).
119+
To [create a SEO (Search Engine Optimization)-friendly](http://googlewebmastercentral.blogspot.com/2009/10/proposal-for-making-ajax-crawlable.html) mobile application, all you need to do is turn on the [`hashBang`](/api/javascript/mobile/application/configuration/hashbang) configuration. The configuration can also be set directly [in the markup]({% slug angularjs_integration_directives %}#widget-options-in-html).
120120

121121
###### Example
122122

@@ -284,7 +284,7 @@ Add a new mobile View called **Our Menu** and add a new ListView with ID `menuLi
284284

285285
## Using Event Handlers
286286

287-
Now you are going to configure the ListView located in the **Home** View to display only the featured products and the ListView located in **Our Menu** View to display a list of all products grouped by their first letter and ordered alphabetically. To do that, use the [DataSource API](/api/javascript/data/datasource#methods) and the [`beforeShow`](/api/javascript/mobile/ui/view#events-beforeShow) event of the mobile View.
287+
Now you are going to configure the ListView located in the **Home** View to display only the featured products and the ListView located in **Our Menu** View to display a list of all products grouped by their first letter and ordered alphabetically. To do that, use the [DataSource API](/api/javascript/data/datasource#methods) and the [`beforeshow`](/api/javascript/mobile/ui/view/events/beforeshow) event of the mobile View.
288288

289289
Add the `k-on-before-show` attribute to the View elements and specify the event handler name.
290290

docs/_assets/javascripts/api.js

Lines changed: 63 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var API_CATEGORIES = ['configuration', 'fields', 'methods', 'events'];
1+
var API_CATEGORIES = ['configuration', 'fields', 'methods', 'events', 'class methods', 'properties', 'constructor parameters'];
22
var NESTED_ELEMENT_MARK = '.';
33
var COLUMNS_STYLE_CLASS_NAME = 'columns';
44
var API_SUBPAGE_TITLE = 'related-properties';
@@ -9,7 +9,7 @@ var COLUMN_HEIGHT_TOLLERANCE = 40;
99
var filterControl = null;
1010
var previousSearch = "";
1111

12-
function findApiCategoryIndex(values) {
12+
function getApiCategoryAndIndex(values) {
1313
var startIndex = -1;
1414
var category = "";
1515
$.each(values, function (index, value) {
@@ -26,10 +26,32 @@ function findApiCategoryIndex(values) {
2626
};
2727
}
2828

29+
function findApiCategoryIndexFromPath(path) {
30+
var startIndex = -1;
31+
$.each(API_CATEGORIES, function (index, value) {
32+
startIndex = path.indexOf(value.toLowerCase());
33+
if (startIndex > -1) {
34+
return false;
35+
}
36+
});
37+
38+
return startIndex;
39+
}
40+
41+
function capitalizeSingle(value) {
42+
var newValue = '';
43+
$.each(value.split(/ |-/), function (index, item) {
44+
if (index > 0) {
45+
newValue += ' ';
46+
}
47+
newValue += item.charAt(0).toUpperCase() + item.slice(1).toLowerCase();
48+
});
49+
return newValue;
50+
}
51+
2952
function capitalize(values) {
3053
for (var i = 0; i < values.length; i++) {
31-
var value = values[i];
32-
values[i] = value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
54+
values[i] = capitalizeSingle(values[i]);
3355
}
3456

3557
return values;
@@ -47,11 +69,11 @@ function separatePageParts(values, breadcrumbs) {
4769
}
4870

4971
function getBreadcrumbsInfo(values) {
50-
var startIndex = findApiCategoryIndex(values).index;
72+
var startIndex = getApiCategoryAndIndex(values).index;
5173
var breadcrumbs = values.slice(startIndex - 1, values.length - 1);
5274
capitalize(breadcrumbs);
5375
var pagePartsCount = separatePageParts(values, breadcrumbs);
54-
categoryInfo = findApiCategoryIndex(breadcrumbs);
76+
categoryInfo = getApiCategoryAndIndex(breadcrumbs);
5577

5678
return {
5779
categoryIndex: categoryInfo.index,
@@ -74,6 +96,12 @@ function buildToc() {
7496

7597
if (headersCount > 1) {
7698
tocContainer.append('<div class="api-toc-title">In this article</div><ul>' + listItems + '</ul>');
99+
100+
var list = tocContainer.children('ul:first-of-type');
101+
var windowHeight = $(window).outerHeight();
102+
var footerHeight = $("#feedback-section").outerHeight() + $("footer").outerHeight();
103+
var listTop = list.offset().top - $(window).scrollTop();
104+
list.css('max-height', windowHeight - listTop - footerHeight);
77105
}
78106
}
79107
}
@@ -88,11 +116,7 @@ function repeat(string, count) {
88116
}
89117

90118
function buildApiBreadcrumbs(data) {
91-
if ($('#markdown-toc').length > 0) {
92-
return;
93-
}
94-
95-
var path = $(location).attr('pathname').split('/');
119+
var path = decodeURI($(location).attr('pathname')).split('/');
96120
var breadcrumbsInfo = getBreadcrumbsInfo(path);
97121
var breadcrumbs = breadcrumbsInfo.breadcrumbs;
98122
breadcrumbs = breadcrumbs.slice(0, breadcrumbs.length);
@@ -109,7 +133,9 @@ function buildApiBreadcrumbs(data) {
109133
lastHref + '#' + breadcrumb :
110134
relativePathBackPath + breadcrumb;
111135

112-
links += '<a href="' + href.toLowerCase() + '">' + breadcrumb + '</a>';
136+
href = href.replace(' ', '-');
137+
var linkText = i === 0 ? data.public_name : breadcrumb;
138+
links += '<a href="' + href.toLowerCase() + '">' + linkText + '</a>';
113139
if (i > 0) {
114140
links += getBreadcrumbDropDownContent(data, breadcrumbsInfo, i - 1, lastHref);
115141
}
@@ -141,7 +167,7 @@ function getBreadcrumbDropDownContent(data, breadcrumbsInfo, nestingLevel, lastH
141167
if (shouldAppendItemToDropDown(item, scopeFilter, nestingLevel, breadcrumbsInfo.nestingLevel)) {
142168
var href;
143169
if (isApiCategory) {
144-
href = lastHref + '#' + item.toLowerCase();
170+
href = lastHref + '#' + item.replace(' ', '-').toLowerCase();
145171
} else {
146172
href = getPrefix(item, data.group_parents) + item;
147173
}
@@ -153,7 +179,7 @@ function getBreadcrumbDropDownContent(data, breadcrumbsInfo, nestingLevel, lastH
153179
return dropDownContent;
154180
}
155181

156-
function getPrefix(item, prefixes){
182+
function getPrefix(item, prefixes) {
157183
var result = '';
158184
$.each(prefixes, function (index, prefix) {
159185
if (item.indexOf(prefix) > -1) {
@@ -240,7 +266,8 @@ function setupColumnsInternal(category, subCategory, mainNestingLevel) {
240266

241267
function setupColumns() {
242268
for (var i = 0; i < API_CATEGORIES.length; i++) {
243-
setupColumnsInternal(API_CATEGORIES[i], API_CATEGORIES[i], 0);
269+
var category = API_CATEGORIES[i].replace(' ', '-');
270+
setupColumnsInternal(category, category, 0);
244271
}
245272

246273
var subCategory = $('#page-article > article').attr('class');
@@ -313,7 +340,7 @@ function ensureCorrectNavigation() {
313340
if (hash !== "" && dashIndex > -1) {
314341
var hashIndex = getApiSectionIndex(hash);
315342
if (hashIndex > -1 && hashIndex < dashIndex) {
316-
var newPath = hash.replace('#', '/').replace('-', '/');
343+
var newPath = hash.replace('#', '/').replace('-', '/').toLowerCase();
317344
window.location.replace(window.location.origin + window.location.pathname + newPath);
318345
return true;
319346
}
@@ -342,22 +369,23 @@ function attachToApiPageEvents() {
342369
}
343370

344371
breadcrumbDropDown = $('.links-container > a');
345-
if (breadcrumbDropDown.length && breadcrumbDropDown.next('ul').length) {
372+
if (breadcrumbDropDown.length) {
346373
breadcrumbDropDown.mouseenter(function (e) {
347374
e.preventDefault();
348375
$('.links-container').children('ul').hide();
349376

350377
var dropDownContent = $(this).next('ul');
351-
dropDownContent.css('left', dropDownContent.position().left + $(this).position().left);
352-
if (dropDownContent.is(':hidden')) {
353-
dropDownContent.show();
354-
} else {
355-
dropDownContent.hide();
378+
if (dropDownContent.length) {
379+
dropDownContent.css('left', dropDownContent.position().left + $(this).position().left);
380+
if (dropDownContent.is(':hidden')) {
381+
dropDownContent.show();
382+
} else {
383+
dropDownContent.hide();
384+
}
385+
dropDownContent.mouseleave(function () {
386+
$(this).hide();
387+
});
356388
}
357-
358-
dropDownContent.mouseleave(function () {
359-
$(this).hide();
360-
});
361389
});
362390
}
363391

@@ -372,9 +400,12 @@ function attachToApiPageEvents() {
372400
}
373401

374402
function getDataForCurrentPage(data) {
375-
var dataItemForPage;
403+
var searchedApiReferenceControl = decodeURI(window.location.pathname).toLowerCase();
404+
var startIndex = searchedApiReferenceControl.indexOf('api/javascript');
405+
var endIndex = findApiCategoryIndexFromPath(searchedApiReferenceControl);
406+
searchedApiReferenceControl = searchedApiReferenceControl.substring(startIndex, endIndex - 1);
376407
$.each(data, function (index, dataItem) {
377-
if (window.location.pathname.indexOf(dataItem.control)) {
408+
if (searchedApiReferenceControl === dataItem.control) {
378409
dataItemForPage = dataItem;
379410
return false;
380411
}
@@ -387,9 +418,11 @@ $(document).ready(function () {
387418
$.get("/kendo-ui/api.json", function (data) {
388419
if (!ensureCorrectNavigation()) {
389420
setupColumns();
390-
buildApiBreadcrumbs(getDataForCurrentPage(data));
421+
if (!$('#markdown-toc').length) {
422+
buildApiBreadcrumbs(getDataForCurrentPage(data));
423+
}
391424
buildToc();
392425
attachToApiPageEvents();
393426
}
394427
});
395-
});
428+
});

docs/_assets/javascripts/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ $(function(){
199199
$("#page-article h2").each(function() {
200200
var h2 = $(this);
201201

202-
if (!/fields|configuration|properties|events|methods/i.test(h2.text())) {
202+
if (!/fields|configuration|properties|events|class methods|constructor parameters|methods/i.test(h2.text())) {
203203
return;
204204
}
205205

docs/_assets/stylesheets/api.css

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
overflow-wrap: break-word;
9696
width: 270px;
9797
margin-top: 60px;
98+
/* bottom: 84px; */
9899
}
99100

100101
@media (min-width: 1660px) {
@@ -153,6 +154,7 @@
153154
list-style: none;
154155
margin: 0;
155156
padding: 0;
157+
overflow-y: auto;
156158
}
157159

158160
.api-toc-container .active-toc-item, .links-container>ul .selected-dropdown-breadcrumb {
@@ -247,6 +249,21 @@ h2 a:first-child+a code:before {
247249
vertical-align: middle;
248250
}
249251

252+
.constructor-parameters:before {
253+
background-color: #4b6584;
254+
content: "CP";
255+
}
256+
257+
.properties:before {
258+
background-color: #10ac84;
259+
content: "P";
260+
}
261+
262+
.class-methods:before {
263+
background-color: #feca57;
264+
content: "CM";
265+
}
266+
250267
.configuration:before {
251268
background-color: #1ab125;
252269
content: "C";
@@ -304,10 +321,10 @@ h2 a:first-child+a code:before {
304321
min-height: 100%;
305322
}
306323

307-
footer {
324+
#markdown-toc~footer {
308325
position: absolute;
309326
bottom: 0;
310327
left: 0;
311328
right: 0;
312329
margin-bottom: 0;
313-
}
330+
}

0 commit comments

Comments
 (0)