Completed
Last Updated: 26 May 2022 06:44 by ADMIN
Release 2022.R2.SP.next
Harish
Created on: 27 Aug 2021 10:57
Category: FileManager
Type: Bug Report
0
The Filemanager DataSource schema defined using the FileManager TagHelper is not serialized

Bug report

When the FileManager is defined using TagHelpers the defined schema is not serialized

Reproduction of the problem

The following FileManager definition:

<kendo-filemanager name="filemanager" upload-url="@Url.Action("FileManagerUpload", "FileManager")">
    <filemanager-datasource>
        <transport>
            <read url="@Url.Action("FileManagerRead", "FileManager")" type="POST" />
            <create url="@Url.Action("FileManagerCreate", "FileManager")" type="POST" />
            <destroy url="@Url.Action("FileManagerDestroy", "FileManager")" type="POST" />
            <update url="@Url.Action("FileManagerUpdate", "FileManager")" type="POST" />
        </transport>
        <schema>
            <filemanager-model id="path" has-children="hasDirectories">
                <fields>
                    <field name="path" type="string" from="Path"></field>
                    <field name="name" type="string" from="Name"></field>
                    <field name="extension" type="string" from="Extension"></field>
                    <field name="created" type="date" from="Created"></field>
                    <field name="createdUtc" type="date" from="CreatedUtc"></field>
                    <field name="modified" type="date" from="Modified"></field>
                    <field name="modifiedUtc" type="date" from="ModifiedUtc"></field>
                    <field name="size" type="number" from="Size"></field>
                </fields>
            </filemanager-model>
        </schema>
    </filemanager-datasource>
    <toolbar>
        <items>
            <item name="createFolder" />
            <item name="upload" />
            <item name="sortDirection" />
            <item name="sortField" />
            <item name="changeView" />
            <item name="spacer" />
            <item name="details" />
            <item name="search" />
        </items>
    </toolbar>
</kendo-filemanager>

generates the following script, without a schema definition:

<script> 
  kendo.syncReady(function() {
    jQuery("#filemanager").kendoFileManager({
        "uploadUrl": "/FileManager/FileManagerUpload",
        "toolbar": {
            "items": [{
                "name": "createFolder"
            }, {
                "name": "upload"
            }, {
                "name": "sortDirection"
            }, {
                "name": "sortField"
            }, {
                "name": "changeView"
            }, {
                "name": "spacer"
            }, {
                "name": "details"
            }, {
                "name": "search"
            }]
        },
        "dataSource": {
            "schema": {
                "model": {
                    "id": "path",
                    "hasChildren": "hasDirectories"
                }
            },
            "transport": {
                "destroy": {
                    "type": "POST",
                    "url": "/FileManager/FileManagerDestroy"
                },
                "read": {
                    "type": "POST",
                    "url": "/FileManager/FileManagerRead"
                },
                "update": {
                    "type": "POST",
                    "url": "/FileManager/FileManagerUpdate"
                },
                "create": {
                    "type": "POST",
                    "url": "/FileManager/FileManagerCreate"
                }
            }
        }
    });
}); 
</script>

Expected/desired behavior

The FileManager DataSource schema should be serialized

Environment

  • Kendo UI version: 2021.2.616
  • Browser: [all]
0 comments