开发者

Jquery File Tree - how to display the root folder icon?

Well I have my JQuery file tree working.

However I want to know how to display an icon and name for the root folder, as well as its contents listed in the tree.

Eg

.fileTree({ root: '/home/',

Displays a treeview of /home. But only the contents of it.

I want it to display the root folder 'home' at the top of the tree as well as its开发者_StackOverflow社区 contents.

Any ideas what I'll need to modify in jQueryFileTree.js to achieve this?


If I understand your question correctly, the answer is you can display the top level icon and root folder BUT it would also display all the sub folders under it (Ex. fileTree({ root: '/',) would also display /var /tmp /user ..etc.).

What you can do is just put a static image & text above the that displays the jTree.

<img src="folder_icon.png> /home  <br/>
<div id="file-tree" class="demo">
   Loading... <img src="${resource(dir: 'images', file: 'spinner.gif')}"/>
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜