Skip to content

Commit 42a22de

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 956aee3 commit 42a22de

File tree

6 files changed

+116
-4
lines changed

6 files changed

+116
-4
lines changed

docs-aspnet/html-helpers/layout/window/dimensions.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@ Apart from the automatic size calculation, you can explicitly set the `Width()`
4343

4444
The Window also allows configuration for its `min` and `max` dimensions (height and width).
4545

46+
{% if site.mvc %}
47+
```HtmlHelper
48+
@(Html.Kendo().Window()
49+
.Name("window")
50+
.Title("Alvar Aalto")
51+
.Resizable(r => r.MinWidth(150).MaxWidth(450).MinHeight(200).MaxHeight(300))
52+
.Content(@<text>
53+
<p>
54+
Alvar Aalto is one of the greatest names in modern architecture and design.
55+
Glassblowers at the iittala factory still meticulously handcraft the legendary vases
56+
that are variations on one theme, fluid organic shapes that let the end user decide the use.
57+
</p>
58+
</text>)
59+
)
60+
```
61+
{% endif %}
62+
63+
{% if site.core %}
4664
```HtmlHelper
4765
@(Html.Kendo().Window()
4866
.Name("window")
@@ -60,7 +78,6 @@ The Window also allows configuration for its `min` and `max` dimensions (height
6078
</text>)
6179
)
6280
```
63-
{% if site.core %}
6481
```TagHelper
6582
<kendo-window name="window" title="Alvar Aalto" min-width="150" max-width="450" min-height="200" max-height="300">
6683
<content>

docs/intro/installation/using-license-code.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ Then, utilize the `KendoLicensing.setScriptKey()` method.
4545

4646
Use the [previously generated code](#1-get-a-license-key) and place it in the main script file the where Kendo UI for jQuery scripts are imported.
4747

48+
```js
49+
import "@progress/kendo-ui";
50+
51+
KendoLicensing.setScriptKey(
52+
'Your license code'
53+
);
54+
55+
$("#grid").kendoGrid();
56+
```
57+
58+
or
59+
4860
```js
4961
require("@progress/kendo-ui");
5062

@@ -55,7 +67,33 @@ KendoLicensing.setScriptKey(
5567
$("#grid").kendoGrid();
5668
```
5769

58-
### Use a Script Reference
70+
The examples above illustrates a single include of `kendo.all.js` in your main javascript file that could be located in one of the [common places](#common-places-to-setup-the-license-code).
71+
72+
In most cases you would need several imports of the Kendo libraries and you would need to setup the license code only on one place (most likely your main js file in your application). In that case, import the `kendo.core.js` and register your license code as usual:
73+
74+
```js
75+
import '@progress/kendo-ui/js/kendo.core';
76+
77+
KendoLicensing.setScriptKey(
78+
'Your license code'
79+
);
80+
81+
// Rest of the code
82+
```
83+
84+
or
85+
86+
```js
87+
require("@progress/kendo-ui/js/kendo.core");
88+
89+
KendoLicensing.setScriptKey(
90+
'Your license code'
91+
);
92+
93+
// Rest of the code
94+
```
95+
96+
### Using Script Reference
5997

6098
Use the [previously generated code](#1-get-a-license-key) and place it right after the script tag.
6199

@@ -69,6 +107,30 @@ Use the [previously generated code](#1-get-a-license-key) and place it right aft
69107
</script>
70108
```
71109

110+
### Common Places to Setup the License Code
111+
112+
Most common files to place the license code in your application are:
113+
114+
**For JS Applications:**
115+
- `./index.(html|js|ts)`
116+
- `./main.(html|js|ts)`
117+
- `./app.(html|js|ts)`
118+
- `./(dist|src)/index.(html|js|ts)`
119+
- `./(dist|src)/main.(html|js|ts)`
120+
- `./(dist|src)/app.(html|js|ts)`
121+
122+
**For ASP.NET MVC Applications:**
123+
- `./Views/Shared/_Layout.cshtml`
124+
- `./Scripts/index.(js|ts)`
125+
- `./Scripts/site.(js|ts)`
126+
127+
**For ASP.NET Core Applications:**
128+
- `./Views/Shared/_Layout.cshtml`
129+
- `./Pages/Shared/_Layout.cshtml`
130+
- `./Pages/_Layout.cshtml`
131+
- `./wwwroot/js/index.js`
132+
- `./wwwroot/js/site.js`
133+
72134
## Next Steps
73135

74136
* [Create Your Own Custom Bundles]({% slug include_only_what_you_need_kendoui_scripts %})

src/kendo.dropdownbutton.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ var __meta__ = {
8989

9090
_mainButton: function() {
9191
var that = this,
92-
options = extend({}, that.options);
92+
options = extend({}, that.options, {
93+
type: that.element.attr("type") || "button"
94+
});
9395

9496
delete options.click;
9597

src/kendo.splitbutton.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ var __meta__ = {
134134

135135
_mainButton: function() {
136136
var that = this,
137-
options = extend({}, that.options);
137+
options = extend({}, that.options, {
138+
type: that.element.attr("type") || "button"
139+
});
138140

139141
delete options.click;
140142

@@ -144,6 +146,7 @@ var __meta__ = {
144146
_arrowButton: function() {
145147
var that = this,
146148
options = extend({}, that.options, {
149+
type: "button",
147150
icon: that.options.arrowIcon,
148151
});
149152

tests/dropdownbutton/initialization.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,18 @@
153153
assert.equal(button.attr("disabled"), "disabled");
154154
assert.isOk(button.hasClass("k-disabled"));
155155
});
156+
157+
it("DropDownButton renders type button", function() {
158+
var dropDownButton = new DropDownButton(button, { items: defaultItems });
159+
160+
assert.equal(button.attr("type"), "button");
161+
});
162+
163+
it("DropDownButton renders type button as defined from DOM", function() {
164+
button.attr("type", "submit");
165+
var dropDownButton = new DropDownButton(button, { items: defaultItems });
166+
167+
assert.equal(button.attr("type"), "submit");
168+
});
156169
});
157170
}());

tests/splitbutton/initialization.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,5 +197,20 @@
197197
assert.equal(button.next().attr("disabled"), "disabled");
198198
assert.isOk(button.next().hasClass("k-disabled"));
199199
});
200+
201+
it("SplitButton renders type button", function() {
202+
var splitButton = new SplitButton(button, { items: defaultItems });
203+
204+
assert.equal(button.attr("type"), "button");
205+
assert.equal(splitButton.arrowButton.attr("type"), "button");
206+
});
207+
208+
it("SplitButton renders type button as defined from DOM", function() {
209+
button.attr("type", "submit");
210+
var splitButton = new SplitButton(button, { items: defaultItems });
211+
212+
assert.equal(button.attr("type"), "submit");
213+
assert.equal(splitButton.arrowButton.attr("type"), "button");
214+
});
200215
});
201216
}());

0 commit comments

Comments
 (0)