Jquery File Tree - 如何显示根文件夹图标?

发布于 2024-10-07 03:14:40 字数 250 浏览 0 评论 0原文

好吧,我的 JQuery 文件树正在工作。

但是我想知道如何显示根文件夹的图标和名称,以及树中列出的内容。

例如

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

显示/home 的树形视图。但仅限于其中的内容。

我希望它在树顶部显示根文件夹“home”及其内容。

有什么想法我需要在 jQueryFileTree.js 中修改什么来实现此目的吗?

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 contents.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

[浮城] 2024-10-14 03:14:40

如果我正确理解你的问题,答案是你可以显示顶级图标和根文件夹,但它也会显示其下的所有子文件夹(例如 fileTree({ root: '/',) 也会显示 /var / tmp /用户..等)。

你能做的就是放一张静态图像&上面显示 jTree 的文本。

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

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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文