How can I set thumbnail image for FileBrowser. ImageBrowser has thumbnailUrl configuration.
I would like to show pdf icon if the file is pdf, word icon if the file is word, zip icon if the file is archive ...
3 Answers, 1 is accepted
answered on 10 Oct 2014, 07:31 AM
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.
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.
answered on 20 Oct 2014, 07:46 AM
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.