jstree 对从右到左语言的支持不起作用
我正在开发一个阿拉伯语网络应用程序,我需要使用树视图来重新呈现我的数据。我环顾四周,发现jstree是这方面最好的。 使用默认主题(LTR)时,树工作正常,但是当我切换到名为 default-rtl 的内置主题时,我没有看到任何变化。我在 firebug 中环顾四周,脚本确实正在加载适当的 css 文件。这是我的代码:
$("#tree").bind("select_node.jstree", function(event, data) {
// My handler function here
}).bind("open_node.jstree", function (event, data) {
// another function here
}).jstree({
core: {
"animation": 0
},
"themes" : {
"rtl": true,
"theme" : "default-rtl",
"url": "js/libs/jstree/themes/default-rtl/style.css",
"dots" : false,
"icons" : true
},
"plugins" : [ "themes", "html_data", "ui"]
});
我做错了什么吗?
I'm developing an web app in Arabic and i need to use a tree view to reprent my data. I looked around and found that jstree is the best in this area.
The tree works fine when using the default theme (which is LTR), but when i switched to a built-in theme called default-rtl, i didnt see any changes. I looked around in firebug and the script is indeed loading the appropriate css file. Here is my code:
$("#tree").bind("select_node.jstree", function(event, data) {
// My handler function here
}).bind("open_node.jstree", function (event, data) {
// another function here
}).jstree({
core: {
"animation": 0
},
"themes" : {
"rtl": true,
"theme" : "default-rtl",
"url": "js/libs/jstree/themes/default-rtl/style.css",
"dots" : false,
"icons" : true
},
"plugins" : [ "themes", "html_data", "ui"]
});
is there something I am doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我设法解决了这个问题。
我稍微修改了这个 CSS 文件(附件)并将其包含在
JSTREE 附带的 CSS 文件夹(通常称为 default.css 或
默认-rtl)。您可以从这里下载:http://www.mediafire.com/download.php?ah26sq0b0isbboa< /a>
确保您没有任何
相关内容
你的树的 ul 根元素
希望这是清楚的,
享受吧,
I managed to solve this issue.
I modifed this CSS file (attached) a little bit and included it in the
CSS folder that comes with JSTREE (usually it's called default.css or
default-rtl). You can download it from here: http://www.mediafire.com/download.php?ah26sq0b0isbboa
Make sure you don't have any
related to
your ul root element of ur tree
Hope that was clear,
Enjoy,
请将核心 RTL 选项设置为 True
Please Set Core RTL Option To True