Libraryやブックマークのプロパティで、ツリーの親の変更が保存されない事があったのを修正
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6660 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
3607ac93a0
commit
804d383ff2
@ -151,9 +151,11 @@ var TreeStyleTabBookmarksService = {
|
||||
|
||||
/* The final step, this validates all of values.
|
||||
Smaller than -1 is invalid, so it becomes to -1. */
|
||||
return treeStructure.map(function(aIndex) {
|
||||
treeStructure = treeStructure.map(function(aIndex) {
|
||||
return aIndex < -1 ? aDefaultParentID : aIndex ;
|
||||
}, this);
|
||||
Application.console.log(treeStructure);
|
||||
return treeStructure;
|
||||
},
|
||||
|
||||
// based on PlacesUtils.getURLsForContainerNode()
|
||||
|
@ -147,7 +147,11 @@ var TreeStyleTabBookmarksServiceEditable = {
|
||||
|
||||
var currentIndex = items.indexOf(aCurrentItem);
|
||||
var selected = treeStructure[currentIndex];
|
||||
if (selected > -1) selected = items[selected];
|
||||
if (selected > -1) {
|
||||
let offset = treeStructure.lastIndexOf(-1, currentIndex);
|
||||
let subStructure = treeStructure.slice(offset);
|
||||
selected = items[selected + offset];
|
||||
}
|
||||
|
||||
var fragment = document.createDocumentFragment();
|
||||
items.forEach(function(aId, aIndex) {
|
||||
|
Loading…
Reference in New Issue
Block a user