Skip to content

Commit 4d5edb5

Browse files
committed
Sync with Kendo UI Professional
1 parent c3014e8 commit 4d5edb5

File tree

230 files changed

+15176
-3288
lines changed

Some content is hidden

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

230 files changed

+15176
-3288
lines changed

build/test-paths-core.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ const themesVersion = packageJson.devDependencies[
66
].replace(/[\^~\*x]/, "");
77

88
exports.beforeTestFiles = [
9-
`https://kendo.cdn.telerik.com/themes/${themesVersion}/default/default-ocean-blue.css`,
9+
themesVersion.indexOf("dev") > -1 ?
10+
"node_modules/@progress/kendo-theme-default/dist/all.css"
11+
: `https://kendo.cdn.telerik.com/themes/${themesVersion}/default/default-ocean-blue.css`,
1012
{ pattern: 'dist/styles/**/*.*', watched: true, included: false },
1113
{ pattern: 'tests/window/blank.html', watched: true, included: false },
1214
{ pattern: 'tests/**/*-fixture.html' }

docs-aspnet/html-helpers/barcodes/qrcode/encodings.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ position: 2
88

99
# Encoding
1010

11-
The different types of QRCde values support different conventions accordingly.
11+
The different types of QRCode values support different conventions.
1212

13-
In many cases, the value of the QRCode is processed by the device in a special way. For example, geolocations are displayed in the Global Positioning System (GPS) or Map application on the device, URLs are opened by the browser, and so on.
13+
Often, the value of the QRCode is processed by the device in a special way. For example, geolocations are displayed in the Global Positioning System (GPS) or Map application on the device, URLs are opened by the browser, and so on.
1414

1515
## URL
1616

17-
To encode the text of a URL, for example, https://www.telerik.com/, encode the `https://www.telerik.com/` URL text in the QRCode. Include the `http://` protocol to ensure it is recognized as a URL.
17+
To encode the text of a URL, for example, https://www.telerik.com/, encode the `https://www.telerik.com/` URL text in the QRCode. Include the `http://` protocol to ensure that the value recognized as a URL.
1818

1919
## Email Addresses
2020

@@ -34,9 +34,9 @@ Similar to email addresses, to encode an SMS short code or number, create an SMS
3434

3535
## Geolocations
3636

37-
To encode a point on the earth, including altitude, use a geo URI. For example, to encode the Progress office in Bulgaria, encode `geo:42.65049,23.37925,100`. As a result, readers can either open a local mapping application to this location, such as [Google Maps](https://www.google.bg/maps/), and zoom accordingly, or a link to this location on a mapping website such as Google Maps in the web browser of the device.
37+
To encode a point on the earth, including altitude, use a geo URI. For example, to encode the Progress office in Bulgaria, encode `geo:42.65049,23.37925,100`. As a result, readers can either open a local mapping application to this location, such as [Google Maps](https://www.google.bg/maps/), and zoom, or a link to this location on a mapping website such as Google Maps in the web browser of the device.
3838

3939
## See Also
4040

41-
* [Basic Usage of the QRCode component for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/qrcode/index)
41+
* [Basic Usage of the QRCode component for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/qrcode)
4242
* [Server-Side API](/api/qrcode)
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
---
2+
title: Getting Started
3+
page_title: Getting Started
4+
description: "Make your first steps with the Telerik UI for {{ site.framework }} QRCode component by following a complete step-by-step tutorial."
5+
slug: qrcode_getting_started
6+
position: 1
7+
---
8+
9+
# Getting Started with the QRCode
10+
11+
This tutorial explains how to set up a basic Telerik UI for {{ site.framework }} QRCode and highlights the major steps in the configuration of the component.
12+
13+
You will initialize a QRCode component that will display a [Card](https://demos.telerik.com/aspnet-core/cards) with a vacation offer when the QR code is scanned. Next, you will dynamically update the QRCode value through a single button click. {% if site.core %}Finally, you can run the sample code in [Telerik REPL](https://netcorerepl.telerik.com/) and continue exploring the components.{% endif %}
14+
15+
![Sample Telerik UI for {{ site.framework }} QRCode](./images/qrcode-getting-started.png)
16+
17+
@[template](/_contentTemplates/core/getting-started-prerequisites.md#component-gs-prerequisites)
18+
19+
## 1. Prepare the CSHTML File
20+
21+
@[template](/_contentTemplates/core/getting-started-directives.md#gs-adding-directives)
22+
23+
Optionally, you can structure the View content by adding the desired HTML elements like headings, divs, paragraphs, and others.
24+
25+
```HtmlHelper
26+
@using Kendo.Mvc.UI
27+
<div id="qr-wrap" style="text-align: center;">
28+
<h4>Scan the QR code to review a vacation offer.</h4>
29+
</div>
30+
```
31+
{% if site.core %}
32+
```TagHelper
33+
@addTagHelper *, Kendo.Mvc
34+
<div id="qr-wrap" style="text-align: center;">
35+
<h4>Scan the QR code to review a vacation offer.</h4>
36+
</div>
37+
```
38+
{% endif %}
39+
40+
## 2. Initialize the QRCode
41+
42+
Use the QRCode HtmlHelper {% if site.core %}or TagHelper{% endif %} to add the component to a page:
43+
44+
* The `Name()` configuration method is mandatory as its value is used for the `id` and the `name` attributes of the QRCode element.
45+
* The `Value()` options specifies the QRCode value.
46+
* Customize the component appearance by using the `Size()`, `Color()`, and `Border()` methods.
47+
48+
```HtmlHelper
49+
@using Kendo.Mvc.UI
50+
51+
@(Html.Kendo().QRCode()
52+
.Name("vacationQrCode")
53+
.Value("https://demos.telerik.com/kendo-ui/qrcode/index")
54+
.Size(170)
55+
.Color("#000000")
56+
.Border(border => border.Color("#000000").Width(5))
57+
)
58+
```
59+
{% if site.core %}
60+
```TagHelper
61+
@addTagHelper *, Kendo.Mvc
62+
63+
<kendo-qrcode name="vacationQrCode"
64+
value="https://demos.telerik.com/kendo-ui/qrcode/index"
65+
size="170"
66+
color="#000000">
67+
<border color="#000000" width="5" />
68+
</kendo-qrcode>
69+
```
70+
{% endif %}
71+
72+
## 3. Configure the Card
73+
74+
The next step is to define the Card component with the vacation information that will be displayed when you scan the QR code.
75+
76+
```HTML
77+
<div class="card-container">
78+
<div class="k-card k-card-vertical">
79+
<img class="k-card-image" alt="Telerik UI for ASP.NET Core Cards Africa" src="https://demos.telerik.com/aspnet-core/shared/web/cards/south-africa.jpg"/>
80+
<div class="k-card-body">
81+
<h5 class="k-card-title">African Safari</h5>
82+
<p>Africa provides some of the most epic wildlife diversity on the planet. Not many vacations involve sleeping in close quarters with lions, leopards, elephants, buffaloes, rhinos, giraffes and hippos.</p>
83+
</div>
84+
<div class="k-card-actions k-card-actions-vertical k-card-actions-stretched">
85+
<span class="k-button k-button-flat-primary k-button-flat k-button-md k-rounded-md">Book now</span>
86+
<span class="k-button k-button-flat-primary k-button-flat k-button-md k-rounded-md">Check rates</span>
87+
</div>
88+
</div>
89+
</div>
90+
```
91+
92+
Add the Card declaration in a Telerik REPL sample and insert its URL in the QRCode `Value()` method.
93+
94+
```HtmlHelper
95+
@using Kendo.Mvc.UI
96+
97+
@(Html.Kendo().QRCode()
98+
.Name("vacationQrCode")
99+
.Value("https://netcorerepl.telerik.com/mnbmQncO07oE3ier03")
100+
... // Other configuration.
101+
)
102+
```
103+
{% if site.core %}
104+
```TagHelper
105+
@addTagHelper *, Kendo.Mvc
106+
107+
<kendo-qrcode name="vacationQrCode" value="https://netcorerepl.telerik.com/mnbmQncO07oE3ier03">
108+
<!-- Other configuration -->
109+
</kendo-qrcode>
110+
```
111+
{% endif %}
112+
113+
## 4. (Optional) Reference Existing QRCode Instances
114+
115+
You can reference the QRCode instances that you have created and build on top of their existing configuration:
116+
117+
1. Use the `id` attribute of the component instance to get its reference.
118+
119+
```script
120+
<script>
121+
$(document).ready(function() {
122+
var qrCodeReference = $("#vacationQrCode").data("kendoQRCode"); // qrCodeReference is a reference to the existing QRCode instance of the helper.
123+
});
124+
</script>
125+
```
126+
127+
1. Use the [QRCode client-side API](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/qrcode#methods) to control the behavior of the component. In this example, you will use the `value()` method to dynamically change the value of the QRCode (for example, when a button is clicked).
128+
129+
```HtmlHelper
130+
@(Html.Kendo().Button()
131+
.Name("updateQRCodeBtn")
132+
.Content("Update QRCode")
133+
.Events(ev => ev.Click("onBtnClick"))
134+
)
135+
```
136+
{% if site.core %}
137+
```TagHelper
138+
@addTagHelper *, Kendo.Mvc
139+
<kendo-button name="updateQRCodeBtn" on-click="onBtnClick">
140+
Update QRCode
141+
</kendo-button>
142+
```
143+
{% endif %}
144+
```Scripts
145+
<script>
146+
function onBtnClick() {
147+
var qrCodeReference = $("#vacationQrCode").data("kendoQRCode");
148+
qrCodeReference.value("mailto:[email protected]");
149+
}
150+
</script>
151+
```
152+
153+
For more information on referencing specific helper instances, see the [Methods and Events]({% slug methodevents_core %}) article.
154+
155+
{% if site.core %}
156+
## Explore this Tutorial in REPL
157+
158+
You can continue experimenting with the code sample above by running it in the Telerik REPL server playground:
159+
160+
* [Sample code with the QRCode HtmlHelper](https://netcorerepl.telerik.com/QxFmwxwu22AIHKrN25)
161+
* [Sample code with the QRCode TagHelper](https://netcorerepl.telerik.com/QnlQcdQa25Fddbrd25)
162+
163+
{% endif %}
164+
165+
## Next Steps
166+
167+
* [QRCode Encodings]({% slug encoding_qrcode_aspnetcore_helper %})
168+
* [Setting the overlay of the QRCode]({% slug types_qrcodehelper_aspnetcore %})
169+
170+
## See Also
171+
172+
* [Using the API of the QRCode for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/qrcode/api)
173+
* [Client-Side API of the QRCode](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/qrcode)
174+
* [Server-Side API of the QRCode](/api/qrcode)
175+
{% if site.core %}
176+
* [Server-Side API of the QRCode TagHelper](/api/taghelpers/qrcode)
177+
{% endif %}
178+
* [Knowledge Base Section](/knowledge-base)
14.1 KB
Loading

docs-aspnet/html-helpers/barcodes/qrcode/overview.md

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ page_title: Overview
44
description: "Learn the basics when working with the Telerik UI QRCode component for {{ site.framework }}."
55
previous_url: /helpers/barcodes/qrcode/overview
66
slug: overview_qrcodehelper_aspnetcore
7-
position: 1
7+
position: 0
88
---
99

1010
# {{ site.framework }} QRCode Overview
@@ -34,10 +34,10 @@ To see the component in action, check the examples:
3434

3535
The following example demonstrates how to define the QRCode.
3636

37-
3837
```HtmlHelper
3938
@(Html.Kendo().QRCode()
4039
.Name("qrUrl")
40+
)
4141
```
4242
{% if site.core %}
4343
```TagHelper
@@ -46,55 +46,48 @@ The following example demonstrates how to define the QRCode.
4646
{% endif %}
4747

4848

49-
### Basic Configuration
49+
## Basic Configuration
5050

5151
To configure the QRCode, pass the configuration options as attributes, for example:
5252

53-
* The name of the QRcode is mandatory&mdash;it specifies the "id" attribute of the widget.
54-
55-
* The value attribute allows you to set the initial value of the widget.
56-
57-
* The error correction level allows you to control the density of the QRcode image.
53+
* The name of the QRCode is mandatory&mdash;it specifies the `id` and the `name` attributes of the QRCode element.
54+
* The `Value()` option allows you to set the initial QRCode value.
55+
* The error correction level allows you to control the density of the QRCode image. You can specify it by using the `ErrorCorrection()` method.
5856

5957
```HtmlHelper
60-
Html.Kendo().QRCode()
58+
@(Html.Kendo().QRCode()
6159
.Name("qrUrl")
6260
.Value("https://docs.telerik.com/aspnet-core/introduction")
6361
.ErrorCorrection(QRErrorCorrectionLevel.M)
6462
.Size(150)
6563
.Border(border => border.Color("#AA11AA").Width(2))
6664
)
67-
)
6865
```
6966
{% if site.core %}
7067
```TagHelper
7168
<kendo-qrcode name="qrUrl"
72-
value="https://docs.telerik.com/aspnet-core/introduction"
73-
error-correction="QRErrorCorrectionLevel.M
74-
size=" 150">
69+
value="https://docs.telerik.com/aspnet-core/introduction"
70+
error-correction="QRErrorCorrectionLevel.M
71+
size=" 150">
7572
<border color="#AA11AA" width="2" />
7673
</kendo-qrcode>
7774
```
7875
{% endif %}
7976

8077
## Functionality and Features
8178

82-
The QRCode supports a set of [encoding conventions]({% slug encoding_qrcode_aspnetcore_helper %}).
83-
84-
## Referencing Existing Instances
79+
* [Encoding]({% slug encoding_qrcode_aspnetcore_helper %})&mdash;The QRCode supports a set of encoding conventions.
80+
* [Types]({% slug types_qrcodehelper_aspnetcore %})&mdash;Explore the available types of overlay.
8581

86-
To reference an existing QRCode instance, use the [`jQuery.data()`](https://api.jquery.com/jQuery.data/) configuration option. Once a reference is established, use the [QRCode client-side API](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/qrcode#methods) to control its behavior.
82+
## Next Steps
8783

88-
// Place the following after the declaration of the QRCode for {{ site.framework }}.
89-
<script>
90-
$(function() {
91-
// The Name() of the QRCode is used to get its client-side instance.
92-
var qrcode = $("#qrcode").data("kendoQRCode");
93-
});
94-
</script>
84+
* [Getting Started with the QRCode]({% slug qrcode_getting_started %})
85+
* [Basic Usage of the QRCode HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/qrcode)
86+
{% if site.core %}
87+
* [Basic Usage of the QRCode TagHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/qrcode/tag-helper)
88+
{% endif %}
9589

9690
## See Also
9791

98-
* [Basic Usage of the QRCode component for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/qrcode/index)
99-
* [Using the API of the QRCode component for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/qrcode/api)
100-
* [Server-Side API](/api/qrcode)
92+
* [Using the API of the QRCode for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/qrcode/api)
93+
* [Knowledge Base Section](/knowledge-base)

0 commit comments

Comments
 (0)