Skip to content

Commit febb27d

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 22a1a6b commit febb27d

Some content is hidden

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

50 files changed

+1947
-280
lines changed

docs-aspnet/_config-mvc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ defaults:
371371
path: "html-helpers/navigation/breadcrumb"
372372
values:
373373
title_prefix: "MVC Breadcrumb Component"
374-
-
374+
title: "Breadcrumb"
375+
-
375376
scope:
376377
path: "html-helpers/navigation/button"
377378
values:

docs-aspnet/_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ navigation:
326326
title: "Layout"
327327
"html-helpers/navigation":
328328
title: "Navigation"
329+
"html-helpers/navigation/breadcrumb":
330+
title: "Breadcrumb"
329331
"html-helpers/navigation/radiobutton":
330332
title: "RadioButton"
331333
"html-helpers/navigation/menu/contextmenu":

docs-aspnet/accessibility/accessibility-compliance-core.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
<td>AAA</td>
2121
<td>n/a</td>
2222
</tr>
23+
<tr>
24+
<td>Breadcrumb</td>
25+
<td>Yes</td>
26+
<td>AA</td>
27+
<td><a href="http://demos.telerik.com/aspnet-core/breadcrumb/keyboard-navigation">Yes</a></td>
28+
</tr>
2329
<tr>
2430
<td>Button</td>
2531
<td>Yes</td>

docs-aspnet/accessibility/accessibility-compliance-mvc.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
<td>AAA</td>
2121
<td>-</td>
2222
</tr>
23+
<tr>
24+
<td>Breadcrumb</td>
25+
<td>Yes</td>
26+
<td>AA</td>
27+
<td><a href="http://demos.telerik.com/aspnet-core/breadcrumb/keyboard-navigation">Yes</a></td>
28+
</tr>
2329
<tr>
2430
<td>Button</td>
2531
<td>Yes</td>

docs-aspnet/html-helpers/data-management/filemanager/binding/local.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,63 @@ page_title: Local Binding
44
description: "Learn how to implement Local Binding with Telerik UI FileManager HtmlHelper for {{ site.framework }}."
55
slug: htmlhelpers_filemanager_aspnetcore_localbinding
66
position: 1
7+
published: false
78
---
89

910
# Local Data
11+
12+
The {{ site.product }} FileManager enables you to bind it to local arrays of data.
13+
14+
15+
To bind the FileManager to local data, set the `dataSource` option of the `kendoFileManager` object. The data should correspond ot the FileManager built-in model schema (see [Data Binding Overview]({% slug bindingoverview_kendoui_filemanager_widget %}) article)
16+
17+
```dojo
18+
// Define the HTML div that will contain the FileManager.
19+
<div id="filemanager"></div>
20+
21+
// Initialize the FileManager with local data.
22+
<script>
23+
var myData = [
24+
{
25+
name: "Folder",
26+
isDirectory: true,
27+
hasDirectories: false,
28+
path: "folder",
29+
extension: "",
30+
size: 0,
31+
createdUtc: new Date(),
32+
items: [
33+
{
34+
name: "Image.jpg",
35+
isDirectory: false,
36+
hasDirectories: false,
37+
path: "folder/Image.jpg",
38+
extension: ".jpg",
39+
size: 20,
40+
createdUtc: new Date(),
41+
},
42+
{
43+
name: "Image2.jpg",
44+
isDirectory: false,
45+
hasDirectories: false,
46+
path: "folder/Image2.jpg",
47+
extension: ".jpg",
48+
size: 20,
49+
createdUtc: new Date(),
50+
}
51+
]
52+
}
53+
];
54+
$("#filemanager").kendoFileManager({
55+
dataSource: {
56+
schema: kendo.data.schemas.filemanager,
57+
data: myData
58+
}
59+
});
60+
61+
</script>
62+
```
63+
64+
* [Overview of Kendo UI FileManager]({% slug overview_kendoui_filemanager_widget %})
65+
* [Sort in Kendo UI FileManager]({% slug sort_kendoui_filemanager_widget %})
66+
* [Toolbar Commands in Kendo UI FileManager]({% slug toolbar_kendoui_filemanager_widget %})

docs-aspnet/html-helpers/data-management/filemanager/binding/overview.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,145 @@ position: 0
77
---
88

99
# DataBiding Overview
10+
11+
Depending on the configuration of its [DataSource]({% slug htmlhelpers_datasource_aspnetcore %}), the {{ site.product_short }} FileManager provides different types of data binding.
12+
13+
14+
## Remote Binding
15+
16+
The {{ site.product }} FileManager provides its own `ContentProviderController` which you need to inherit, in order to use the inbuilt `read`, `create`, `update` and `destroy` methods. As those as virtual methods, they can be overwritten and extended.
17+
18+
19+
To bind the FileManager to remote data, specify the `dataSource` option and supply the object with the needed endpoints for `read`, `create`, `update` and `destroy` operations. The following example demonstrates such implementation, where the FileManagerData inherits the `ContentProviderController`:
20+
21+
```Razor
22+
@(Html.Kendo().FileManager()
23+
.Name("filemanager")
24+
.DataSource(ds =>
25+
{
26+
ds.Read(operation => operation
27+
.Type(HttpVerbs.Post)
28+
.Action("Read", "FileManagerData")
29+
);
30+
ds.Destroy(operation => operation
31+
.Type(HttpVerbs.Post)
32+
.Action("Destroy", "FileManagerData")
33+
);
34+
ds.Create(operation => operation
35+
.Type(HttpVerbs.Post)
36+
.Action("Create", "FileManagerData")
37+
);
38+
ds.Update(operation => operation
39+
.Type(HttpVerbs.Post)
40+
.Action("Update", "FileManagerData")
41+
);
42+
})
43+
.UploadUrl("Upload", "FileManagerData")
44+
)
45+
```
46+
```Controller
47+
// GET: /FileManager/
48+
private const string contentFolderRoot = "~/Content/";
49+
private const string prettyName = "Folders/";
50+
private static readonly string[] foldersToCopy = new[] { "~/Content/shared/filemanager" };
51+
52+
53+
/// <summary>
54+
/// Gets the base paths from which content will be served.
55+
/// </summary>
56+
public override string ContentPath
57+
{
58+
get
59+
{
60+
return CreateUserFolder();
61+
}
62+
}
63+
64+
/// <summary>
65+
/// Gets the valid file extensions by which served files will be filtered.
66+
/// </summary>
67+
public override string Filter
68+
{
69+
get
70+
{
71+
return "*.*";
72+
}
73+
}
74+
75+
private string CreateUserFolder()
76+
{
77+
var virtualPath = Path.Combine(contentFolderRoot, "UserFiles", prettyName);
78+
79+
var path = Server.MapPath(virtualPath);
80+
if (!Directory.Exists(path))
81+
{
82+
Directory.CreateDirectory(path);
83+
foreach (var sourceFolder in foldersToCopy)
84+
{
85+
CopyFolder(Server.MapPath(sourceFolder), path);
86+
}
87+
}
88+
return virtualPath;
89+
}
90+
91+
private void CopyFolder(string source, string destination)
92+
{
93+
if (!Directory.Exists(destination))
94+
{
95+
Directory.CreateDirectory(destination);
96+
}
97+
98+
foreach (var file in Directory.EnumerateFiles(source))
99+
{
100+
var dest = Path.Combine(destination, Path.GetFileName(file));
101+
System.IO.File.Copy(file, dest);
102+
}
103+
104+
foreach (var folder in Directory.EnumerateDirectories(source))
105+
{
106+
var dest = Path.Combine(destination, Path.GetFileName(folder));
107+
CopyFolder(folder, dest);
108+
}
109+
}
110+
```
111+
112+
113+
114+
The following list provides information about the default requests and responses for the `create`, `read`, `destroy` operations.
115+
116+
- `Create`&mdash;Makes a `POST` request for the creation of a directory with the following parameters.
117+
118+
{"Name":"...","Size":0,"Path":"...","Extension":".txt","IsDirectory":...,"HasDirectories":...,"Created":"...","CreatedUtc":"...","Modified":"...","ModifiedUtc":"..."}
119+
120+
- `Read`&mdash;Makes a `POST` request that contains the `path` parameter to specify the path which is browsed and expects a file listing in the following format:
121+
122+
[
123+
{"Name":"Documents","Size":0,"Path":"Documents","Extension":"","IsDirectory":true,"HasDirectories":false,"Created":"\/Date(1578897289317)\/","CreatedUtc":"\/Date(1578897289317)\/","Modified":"\/Date(1578897289332)\/","ModifiedUtc":"\/Date(1578897289332)\/"},
124+
...
125+
]
126+
127+
128+
- `Destroy`&mdash;Makes a `POST` request containing `FormData` with the following parameters:
129+
130+
- `Name`&mdash;The file or directory to be deleted.
131+
- `Path`&mdash;The directory in which the file or the directory resides.
132+
- `Extension`&mdash; The extension of the deleted file. No extension in the data, if a folder is deleted.
133+
- `Size`&mdash The file size, as provided by the `read` response.
134+
- `IsDirectory`&mdash; Boolean, specifying if the deleted is a file or not.
135+
- `HasDirectories`&mdash; Boolean, specifying if the deleted contains folders.
136+
- `Created`&mdash; Created Date of the deleted item.
137+
- `CreatedUtc`&mdash; Created Date in UTC format of the deleted item.
138+
- `Modified`&mdash; Modified Date of the deleted item.
139+
- `mModifiedUtc`&mdash; Created Date in UTC formats of the deleted item.
140+
141+
- `Update`&mdash;Makes a `POST` request, containing the `FileEntry` object. The expected response is a `file` object in the following format:
142+
143+
{"Name":"...","Size":0,"Path":"...","Extension":".txt","IsDirectory":...,"HasDirectories":...,"Created":"...","CreatedUtc":"...","Modified":"...","ModifiedUtc":"..."}
144+
145+
146+
## See Also
147+
* [Overview of {{ site.product }} FileManager]({% slug htmlhelpers_filemanager_aspnetcore_overview %})
148+
* [Navigation in {{ site.product }} FileManager]({% slug htmlhelpers_filemanager_aspnetcore_navigation %})
149+
* [Preview Panes in {{ site.product }} FileManager]({% slug htmlhelpers_filemanager_aspnetcore_previewpane %})
150+
151+
​​​​​​​ 

docs-aspnet/html-helpers/data-management/filemanager/binding/remote.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ page_title: Remote Binding
44
description: "Learn how to implement Remote Binding with Telerik UI FileManager HtmlHelper for {{ site.framework }}."
55
slug: htmlhelpers_filemanager_aspnetcore_remotebinding
66
position: 2
7+
published: false
78
---
89

910
# Remote Data
11+

docs-aspnet/html-helpers/data-management/filemanager/binding/server-operations.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ page_title: Server Operations
44
description: "Learn how to implement different Server Operations with Telerik UI FileManager HtmlHelper for {{ site.framework }}."
55
slug: htmlhelpers_filemanager_aspnetcore_serveroperations
66
position: 3
7+
published: false
78
---
89

910
# Server Operations

docs-aspnet/html-helpers/data-management/filemanager/context-menu.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,27 @@ slug: htmlhelpers_filemanager_aspnetcore_contextmenu
66
position: 3
77
---
88

9-
# ContextMenu
9+
10+
# ContextMenu in FileManager
11+
The {{ site.product }} FileManager's ContextMenu enables you to easily execute FileManager commands on the selected file or folder.
12+
13+
The component uses the {{ site.product }} ContextMenu, enabling you to get full advantage of its [Client API](/api/javascript/ui/filemanager). Once an item is selected, the corresponding command is executed.
14+
15+
The default items in the ContextMenu are `rename` and `delete`. You can define your custom items which can execute custom commands. You can also manage what items should be visible, by enumerating the needed ones in the initialization of the component (see Example below)
16+
17+
@(Html.Kendo().FileManager()
18+
.Name("filemanager")
19+
.ContextMenu(context => context.Items(items =>
20+
{
21+
items.Add("rename");
22+
items.Add("delete");
23+
}))
24+
...
25+
)
26+
27+
## See Also
28+
29+
* [Overview of FileManager]({% slug htmlhelpers_filemanager_aspnetcore_overview %})
30+
* [Drag and Drop FileManager]({% slug htmlhelpers_filemanager_aspnetcore_dragndrop %})
31+
* [Navigation in FileManager]({% slug htmlhelpers_filemanager_aspnetcore_navigation %})
32+

docs-aspnet/html-helpers/data-management/filemanager/drag-and-drop.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,20 @@ position: 4
77
---
88

99
# Drag and Drop Overview
10+
11+
The {{ site.product }} FileManager provides inbuilt Drag and Drop functionality, which allows dragging and dropping files from the FileManager view(GridView, ListView) to the TreeView and vice versa. The functionality is enabled by default and it can be controlled by the `Draggable` option.
12+
13+
14+
The following example demonstrated how to disable the Drag and Drop functionality of the FileManager:
15+
16+
@(Html.Kendo().FileManager()
17+
.Name("filemanager")
18+
.Draggable(false)
19+
...
20+
)
21+
22+
## See Also
23+
24+
* [Overview of {{ site.product }} FileManager]({% slug htmlhelpers_filemanager_aspnetcore_overview %})
25+
* [Preview Panes in {{ site.product }} FileManager]({% slug htmlhelpers_filemanager_aspnetcore_previewpane %})
26+
* [ToolbarCommands in{{ site.product }} FileManager]({% slug htmlhelpers_filemanager_aspnetcore_toolbar %})
Loading
Loading

docs-aspnet/html-helpers/data-management/filemanager/navigation.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,21 @@ position: 5
88

99
# Navigation Overview
1010

11+
The navigation within the file structure in the {{ site.product }} FileManager is achieved with the help of an inbuilt [TreeView](#treeview) and [Breacrumb](#breadcrumb) components.
12+
1113
## TreeView
14+
On the left-hand side of the FileManager there is a nested [{{ site.product }} TreeView]({% slug htmlhelpers_treeview_aspnetcore %}) component, listing all folders loaded in the FileManager. The TreeView allows dragging and dropping files inside it, or between the Grid and ListView. It also provides you the possibility to rename files or folders, as well as execute commands with the inbuilt ContextMenu.
15+
16+
The nested [{{ site.product }} TreeView]({% slug htmlhelpers_treeview_aspnetcore %}) component is the standard component from the {{ site.product }} suite. This is why, all functionalities and features, such as Keyboard Support and Accessibility compliance, are inherited.
17+
1218
## Breadcrumb
19+
20+
As for R1 2020, the [{{ site.product }} Breadcrumb]({% slug htmlhelpers_breadcrumb_aspnetcore_overview %}) component is added to the Kendo UI suite and it is incorporated in the FileManager for easy navigation.
21+
22+
## See Also
23+
24+
* [Overview of Kendo UI FileManager]({% slug htmlhelpers_filemanager_aspnetcore_overview %})
25+
* [Kendo UI TreeView]({% slug htmlhelpers_treeview_aspnetcore %})
26+
* [Breadcrumb]({% slug htmlhelpers_breadcrumb_aspnetcore_overview %})
27+
* [Sort in Kendo UI FileManager]({% slug htmlhelpers_filemanager_aspnetcore_sort %})
28+
* [Search in Kendo UI FileManager]({% slug htmlhelpers_filemanager_aspnetcore_search %})

0 commit comments

Comments
 (0)