getParentItemForBookmark => getParentItemForBookmarkItem

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4849 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-07-31 02:11:09 +00:00
parent 83a7f89827
commit 8623f70bed
2 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@ var TreeStyleTabBookmarksProperty = {
initParentMenuList : function()
{
var id = gEditItemOverlay.itemId;
var parent = TreeStyleTabService.getParentItemForBookmark(id);
var parent = TreeStyleTabService.getParentItemForBookmarkItem(id);
var popup = this.popup;
var range = document.createRange();
@ -82,7 +82,7 @@ var TreeStyleTabBookmarksProperty = {
let parent;
let current = aId;
let nest = 0;
while ((parent = current in parents ? parents[current] : TreeStyleTabService.getParentItemForBookmark(current) ) != -1)
while ((parent = current in parents ? parents[current] : TreeStyleTabService.getParentItemForBookmarkItem(current) ) != -1)
{
if (siblings.indexOf(parent) >= siblings.indexOf(current)) break;
nest++;

View File

@ -2622,7 +2622,7 @@ catch(e) {
this._addingBookmarkTreeStructure = [];
},
getParentItemForBookmark : function(aId)
getParentItemForBookmarkItem : function(aId)
{
if (aId < 0) return -1;
var annotations = PlacesUtils.getAnnotationsForItem(aId);
@ -2637,7 +2637,7 @@ catch(e) {
getTreeStructureFromBookmarkItems : function(aIDs)
{
var treeStructure = aIDs.map(function(aId) {
let id = this.getParentItemForBookmark(aId);
let id = this.getParentItemForBookmarkItem(aId);
return id < 0 ? -1 : aIDs.indexOf(id);
}, this);
treeStructure = treeStructure.reverse();