Skip to content

Commit 0340c7f

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent ad2cdca commit 0340c7f

37 files changed

+386
-295
lines changed

docs-aspnet-core/Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
source 'https://rubygems.org'
22

33
gem 'uglifier', '3.0.4'
4-
gem 'jekyll', '2.0.3'
5-
gem 'jekyll-sitemap', '0.4.1'
4+
gem 'jekyll', '3.4.0'
5+
gem 'jekyll-sitemap'
66
gem 'jekyll-assets'
77
gem 'github-markdown'
88
gem 'html-pipeline', '2.5.0'

docs-aspnet-core/_layouts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width">
6-
<title>{{ page.page_title || page.title }}</title>
6+
<title>{% if page.page_title %}{{ page.page_title}}{% else %}{{ page.title }}{% endif %}</title>
77
<link rel="shortcut icon" href="{{site.baseurl}}/favicon.ico"/>
88
{% if page.description %}<meta name="description" content="{{page.description}}">{% endif %}
99
<link href="//fonts.googleapis.com/css?family=Roboto:400,500,700,900" rel="stylesheet">

docs-aspnet-core/_plugins/navigation_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def sort!(items)
7474
items.each {|item| sort!(item['items']) if item['items'] }
7575

7676
# sorty by position, directory or file and then title (ignoring case)
77-
items.sort_by! {|a| [a['position'] || 1000000, a.has_key?('items') ? -1 : 1, a['text'].downcase]}
77+
items.sort_by! {|a| [a['position'] || 1000000, a.has_key?('items') ? -1 : 1, a['text'].nil? ? a['path'] : a["text"].downcase]}
7878
end
7979

8080
end

docs-aspnet-core/_plugins/page.rb

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs-aspnet-core/_plugins/slug.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class SlugTag < Liquid::Block
1+
class SlugTag < Liquid::Tag
22
@@page_by_slug = nil
33

44
def initialize(tag_name, text, tokens)

docs-aspnet-core/getting-started/getting-started.md

Lines changed: 59 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -9,48 +9,37 @@ position: 1
99

1010
# Getting Started with Progress<sup>®</sup> Telerik<sup>®</sup> UI for ASP.NET Core
1111

12-
This article demonstrates how to configure an ASP.NET Core project to use Telerik UI for ASP.NET Core.
12+
This article demonstrates how to configure an ASP.NET Core project to use Telerik UI for ASP.NET Core in Visual Studio 2017.
1313

1414
## Prerequisites
1515

16-
The prerequisites you need depend on the Visual Studio (VS) version your project requires:
16+
The prerequisites for creating and running an ASP.NET Core on Windows with Visual Studio 2017 are described on the [.NET Core documentation site](https://docs.microsoft.com/en-us/dotnet/core/windows-prerequisites).
1717

18-
* [VS 2017](#using-vs-2017)
19-
* [VS 2015](#using-vs-2015)
20-
21-
### Using VS 2017
22-
23-
1. Download [VS 2017](https://www.microsoft.com/net/core#windowsvs2017).
24-
2. Use the VS Installer to [install the .NET Core workload](https://www.microsoft.com/net/core#windowsvs2017).
25-
26-
### Using VS 2015
27-
28-
1. Download [VS 2015 with Update 3](https://blogs.msdn.microsoft.com/visualstudio/2016/06/27/visual-studio-2015-update-3-and-net-core-1-0-available-now/).
29-
3. Download [NET Core 1.1.0 - VS 2015 Tooling Preview 2](https://www.microsoft.com/net/download/core).
30-
4. (Optional) Download [.NET SDK Core for Windows](https://www.microsoft.com/net/download/core).
18+
> **Important**
19+
>
20+
> It's possible to use Visual Studio 2015 only for .NET Core 1.x development, but it's not recommended for the following reasons:
21+
>
22+
> * The .NET Core tooling is a preview version, which is not officially supported.
23+
> * The projects are project.json-based, which is deprecated.
24+
>
25+
> Note also, that if you use VS 2015, in order to ensure the matching of the ASP.NET Core version which is distributed with the Telerik UI for ASP.NET Core, you need to manually change the `Microsoft.AspNetCore.Routing` and `Microsoft.AspNetCore.Mvc` versions to `1.1.0` in `project.json`.
3126
3227
## Configuration
3328

34-
To configure an ASP.NET Core Web Application to use Telerik UI for ASP.NET Core:
29+
Configure an ASP.NET Core Web Application to use Telerik UI for ASP.NET Core:
3530

3631
1. Create an [ASP.NET Core Web Application](#configuration-Create).
3732
2. Add the [Kendo UI NuGet package](#configuration-Add).
3833

3934
### Create ASP.NET Core Project
4035

41-
> **Important**
42-
>
43-
> If you are configuring an existing project, skip this step.
44-
45-
To create an ASP.NET Core Web Application (with or without Razor Pages):
46-
4736
1. Select **File** > **New Project**.
48-
2. Choose **Templates** > **Visual C#** > **Web** > **ASP.NET Core Web Application (.NET Core)**.
37+
2. Choose **Installed** > **Visual C#** > **Web** > **ASP.NET Core Web Application**.
4938
3. Set a name and location for the project and click **OK**.
50-
4. Select **Web Application** from the **ASP.NET Core Templates** section.
39+
4. Select **Web Application** from the **ASP.NET Core Templates** dialog.
5140
5. Click **OK** to create the project.
5241

53-
### Add NuGet Packages
42+
### Add the Telerik UI for ASP.NET Core NuGet Package
5443

5544
> **Important**
5645
>
@@ -64,58 +53,53 @@ To add the NuGet packages:
6453

6554
![NuGet package manager](images/manage-nuget-packages.png)
6655

67-
2. Select the Telerik package source and search for `Telerik.UI.for.AspNet.Core`.
56+
2. Click the `Browse` tab, select the Telerik package source and search for `Telerik.UI.for.AspNet.Core`.
6857

69-
3. Install the `Telerik.UI.for.AspNet.Core` package. This should add a line to your `project.json` (for VS2015) or `csproj` (for VS2017) similar to the examples below.
70-
71-
> **Important**
72-
>
73-
> If you use VS 2015 and to ensure the matching of the ASP.NET Core version which is distributed with the Telerik UI for ASP.NET Core, you need to manually change the `Microsoft.AspNetCore.Routing` and `Microsoft.AspNetCore.Mvc` versions to `1.1.0` in `project.json`.
58+
3. Install the `Telerik.UI.for.AspNet.Core` package. This should add a line to your `.csproj` file similar to the example below.
7459

7560
###### Example
7661

77-
```tab-VS2017
78-
79-
<PackageReference Include="Telerik.UI.for.AspNet.Core" Version="{{ site.mvcCoreVersion }}" />
80-
```
81-
```tab-VS2015
62+
<PackageReference Include="Telerik.UI.for.AspNet.Core" Version="{{ site.mvcCoreVersion }}" />
8263

83-
"dependencies": {
84-
...
85-
"Telerik.UI.for.AspNet.Core": "{{ site.mvcCoreVersion }}"
86-
}
87-
```
64+
4. Open `Startup.cs` and update it in the way demonstrated in the following examples:
8865

89-
4. Open `Startup.cs` by using a text editor (IDE) and update it in the way demonstrated in the following examples.
66+
* Locate the `ConfigureServices` method and add the calls shown in the code snippet below:
9067

91-
Locate the `ConfigureServices` method and add the calls shown in the code snippet below:
68+
###### Example
9269

93-
###### Example
70+
public void ConfigureServices(IServiceCollection services)
71+
{
72+
...
73+
// Maintain property names during serialization. See:
74+
// https://github.com/aspnet/Announcements/issues/194
75+
services
76+
.AddMvc()
77+
.AddJsonOptions(options =>
78+
options.SerializerSettings.ContractResolver = new DefaultContractResolver());
9479

95-
public void ConfigureServices(IServiceCollection services)
96-
{
97-
...
98-
// Maintain property names during serialization. See:
99-
// https://github.com/aspnet/Announcements/issues/194
100-
services
101-
.AddMvc()
102-
.AddJsonOptions(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver());
80+
// Add Kendo UI services to the services container
81+
services.AddKendo();
82+
}
83+
84+
* Add the required using for `Newtonsoft.Json.Serialization`:
85+
86+
###### Example
10387

104-
// Add Kendo UI services to the services container
105-
services.AddKendo();
106-
}
88+
...
89+
using Newtonsoft.Json.Serialization;
90+
...
10791

108-
Locate the `Configure` method and add a call to `app.UseKendo` at the end.
92+
* Locate the `Configure` method and add a call to `app.UseKendo` at the end.
10993

110-
###### Example
94+
###### Example
11195

112-
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
113-
{
114-
...
96+
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
97+
{
98+
...
11599

116-
// Configure Kendo UI
117-
app.UseKendo(env);
118-
}
100+
// Configure Kendo UI
101+
app.UseKendo(env);
102+
}
119103

120104
5. Import the `Kendo.Mvc.UI` namespace in `~/Views/_ViewImports.cshtml` through `@using Kendo.Mvc.UI`.
121105

@@ -137,7 +121,7 @@ To add the NuGet packages:
137121

138122
7. Register the Kendo UI styles and scripts in `~/Views/Shared/_Layout.cshtml`.
139123

140-
> **Important**
124+
> **Important**
141125
>
142126
> In the default .NET Core template, the jQuery scripts are included at the end of the `<body>` element. To properly load the Telerik UI for ASP.NET HtmlHelpers, move the jQuery scripts and the Kendo UI client-side scripts to the `<head>` element and make sure that the Kendo UI scripts are loaded after the jQuery ones.
143127

@@ -146,29 +130,29 @@ To add the NuGet packages:
146130
<head>
147131
...
148132

149-
<environment names="Development">
133+
<environment include="Development">
150134
...
151135

152136
<link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.common-nova.min.css" />
153137
<link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.nova.min.css" />
154138
</environment>
155-
<environment names="Staging,Production">
139+
<environment exclude="Development">
156140
...
157141

158-
<link rel="stylesheet"
142+
<link rel="stylesheet"
159143
href="https://kendo.cdn.telerik.com/{{ site.cdnVersion }}/styles/kendo.common-nova.min.css"
160144
asp-fallback-href="~/lib/kendo-ui/styles/kendo.common-nova.min.css"
161145
asp-fallback-test-class="k-common-test-class"
162146
asp-fallback-test-property="opacity" asp-fallback-test-value="0" />
163147

164-
<link rel="stylesheet"
148+
<link rel="stylesheet"
165149
href="https://kendo.cdn.telerik.com/{{ site.cdnVersion }}/styles/kendo.nova.min.css"
166150
asp-fallback-href="~/lib/kendo-ui/styles/kendo.nova.min.css"
167151
asp-fallback-test-class="k-theme-test-class"
168152
asp-fallback-test-property="opacity" asp-fallback-test-value="0" />
169153
</environment>
170154

171-
<environment names="Development">
155+
<environment include="Development">
172156
...
173157

174158
<script src="~/lib/jquery/dist/jquery.js"></script>
@@ -177,7 +161,7 @@ To add the NuGet packages:
177161
<script src="~/lib/kendo-ui/js/kendo.all.min.js"></script>
178162
<script src="~/lib/kendo-ui/js/kendo.aspnetmvc.min.js"></script>
179163
</environment>
180-
<environment names="Staging,Production">
164+
<environment exclude="Development">
181165
...
182166

183167
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"
@@ -201,19 +185,17 @@ To add the NuGet packages:
201185
...
202186
</head>
203187

204-
<!--*-->
205188
8. Use a Kendo UI widget by adding the snippet from the following example to `~/Views/Home/Index.cshtml`.
206189

207190
###### Example
208191

209-
<h2>Kendo UI DatePicker</h2>
192+
<h2>Kendo UI DatePicker</h2>
210193

211-
@(Html.Kendo().DatePicker()
212-
.Name("datepicker")
213-
)
194+
@(Html.Kendo().DatePicker()
195+
.Name("datepicker")
196+
)
214197

215-
<!--_-->
216-
Now that all is done, you can see the sample page.
198+
Now that all is done, you can see the sample page.
217199

218200
**Figure 3. The end result&mdash;a sample page**
219201

docs-aspnet-mvc/Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
source 'https://rubygems.org'
22

33
gem 'uglifier', '3.0.4'
4-
gem 'jekyll', '2.0.3'
5-
gem 'jekyll-sitemap', '0.4.1'
4+
gem 'jekyll', '3.4.0'
5+
gem 'jekyll-sitemap'
66
gem 'jekyll-assets'
77
gem 'github-markdown'
88
gem 'html-pipeline', '2.5.0'

docs-aspnet-mvc/_layouts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width">
6-
<title>{{ page.page_title || page.title }}</title>
6+
<title>{% if page.page_title %}{{ page.page_title}}{% else %}{{ page.title }}{% endif %}</title>
77
<link rel="shortcut icon" href="{{site.baseurl}}/favicon.ico"/>
88
{% if page.description %}<meta name="description" content="{{page.description}}">{% endif %}
99
<link href="//fonts.googleapis.com/css?family=Roboto:400,500,700,900" rel="stylesheet">

docs-aspnet-mvc/_plugins/navigation_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def sort!(items)
7979
items.each {|item| sort!(item['items']) if item['items'] }
8080

8181
# sorty by position, directory or file and then title (ignoring case)
82-
items.sort_by! {|a| [a['position'] || 1000000, a.has_key?('items') ? -1 : 1, a['text'].downcase]}
82+
items.sort_by! {|a| [a['position'] || 1000000, a.has_key?('items') ? -1 : 1, a['text'].nil? ? a['path'] : a["text"].downcase]}
8383
end
8484

8585
end

docs-aspnet-mvc/_plugins/page.rb

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)