你好傢伙我使用jstree,我在同一頁面有多個樹。我有兩個問題:JsTree multitree cookie
1)我想要cookie來區分哪些節點在每棵樹中打開。我嘗試實現這個功能使用的前綴,但遺憾的是:
"cookies" : { "cookie_options" : { "prefix" : "home" } },
不起作用,因爲只有最後一個打開的節點被刷新後重新打開。
2)我不希望能夠創建新的根節點。我只希望能夠創建文件或將文件傳輸到我的根目錄。
我想實現,使用:
"types" : {
"types" : {
// The default type
"default" : {
"valid_children" : "none",
"icon" : {
"image" : "./file.png"
}
},
// The `folder` type
"folder" : {
"valid_children" : [ "default", "folder", "file" ],
"icon" : {
"image" : "./folder.png"
}
},
// The `drive` nodes
"drive" : {
// can have files and folders inside, but NOT other `drive` nodes
"valid_children" : [ "default", "folder" ],
"icon" : {
"image" : "./root.png"
},
// those prevent the functions with the same name to be used on `drive` nodes
// internally the `before` event is used
"start_drag" : false,
"move_node" : false,
"delete_node" : false,
"remove" : false
}
}
},
,但我仍然能夠將文件發佈到我的根目錄。我應該在根目錄之上創建另一個<li>
而沒有rel=drive
嗎?
謝謝。
ad 1)我認爲這是使用cookies插件的副作用... – Radek 2012-02-02 04:54:45
你知道如何解決它嗎?我已經修復了第二個.. – glarkou 2012-02-02 09:51:44
你是否設法爲不同的樹木獲得多個餅乾?我正在尋找同樣的問題! – andreapier 2012-05-28 08:37:03