3 Answers, 1 is accepted
0
Hello Matjaz,
You can use the dataBound event of the ListView widget inside the FileBrowser to iterate all <li> elements and apply custom CSS styles, depending on the file name inside.
http://www.telerik.com/forums/readonly-folders-for-file-and-image-browser
Regards,
Dimo
Telerik
You can use the dataBound event of the ListView widget inside the FileBrowser to iterate all <li> elements and apply custom CSS styles, depending on the file name inside.
http://www.telerik.com/forums/readonly-folders-for-file-and-image-browser
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Matjaz
Top achievements
Rank 1
answered on 16 Oct 2014, 08:17 AM
Hi.
I need this functionality for FileBrowser and for Editor->FileBrowser.
I already extend you widgets with my own. The best logic would be to do this inside init method:
I am having problem with getting listView reference as pointed in url you provided.
Please help me, how can I get listView in FileBrowser and Editor->FileBrowser.
I need this functionality for FileBrowser and for Editor->FileBrowser.
I already extend you widgets with my own. The best logic would be to do this inside init method:
var
MatjazEditor = kendo.ui.Editor.extend(
{
init:
function
(element, options)
{
if
(options.tools != undefined)
{
if
(options.tools.indexOf(
"insertImage"
) != -1)
Matjaz.InitImageBrowser(options.imageBrowser);
if
(options.tools.indexOf(
"insertFile"
) != -1)
Matjaz.InitFileBrowser(options.fileBrowser);
}
kendo.ui.Editor.fn.init.call(
this
, element, options);
kendo.notify(
this
);
},
options:
{
name:
"MatjazEditor"
,
}
});
kendo.ui.plugin(MatjazEditor);
Please help me, how can I get listView in FileBrowser and Editor->FileBrowser.
0
Hello Matjaz,
The File and Image Browsers of the Editor are created on demand, when the respective popup is opened, and they are destroyed, when the popup is closed. The File and ImageBrowsers do not exist in the init event of the Editor, so the internal ListView widget does not exist then either. You need to think of some other approach, for example extend the FileBrowser widget as well and add a custom dataBound handler there in its init method. Keep in mind that the ListView already has a dataBound handler attached, so in order to preserve it, attach you custom handler with bind.
http://docs.telerik.com/kendo-ui/basics/events-and-methods#bind-to-the-widget-events
Regards,
Dimo
Telerik
The File and Image Browsers of the Editor are created on demand, when the respective popup is opened, and they are destroyed, when the popup is closed. The File and ImageBrowsers do not exist in the init event of the Editor, so the internal ListView widget does not exist then either. You need to think of some other approach, for example extend the FileBrowser widget as well and add a custom dataBound handler there in its init method. Keep in mind that the ListView already has a dataBound handler attached, so in order to preserve it, attach you custom handler with bind.
http://docs.telerik.com/kendo-ui/basics/events-and-methods#bind-to-the-widget-events
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!