diff --git a/chrome.manifest b/chrome.manifest index 4669c773..8bc71e9d 100644 --- a/chrome.manifest +++ b/chrome.manifest @@ -4,8 +4,9 @@ overlay chrome://browser/content/browser.xul chrome://treestyletab/content/trees overlay chrome://browser/content/bookmarks/bookmarksPanel.xul chrome://treestyletab/content/bookmarksOverlay.xul overlay chrome://browser/content/history/history-panel.xul chrome://treestyletab/content/bookmarksOverlay.xul - +overlay chrome://browser/content/places/places.xul chrome://treestyletab/content/bookmarksOverlay.xul overlay chrome://browser/content/places/places.xul chrome://treestyletab/content/bookmarksOverlayEditable.xul +overlay chrome://browser/content/places/bookmarkProperties.xul chrome://treestyletab/content/bookmarksOverlay.xul overlay chrome://browser/content/places/bookmarkProperties.xul chrome://treestyletab/content/bookmarksOverlayEditable.xul overlay chrome://multipletab/content/config.xul chrome://treestyletab/content/multipletabConfigOverlay.xul diff --git a/content/treestyletab/bookmarksOverlayEditable.js b/content/treestyletab/bookmarksOverlayEditable.js index b14de84f..10144494 100644 --- a/content/treestyletab/bookmarksOverlayEditable.js +++ b/content/treestyletab/bookmarksOverlayEditable.js @@ -129,7 +129,8 @@ var TreeStyleEditableBookmarkService = { var items = this._getItemsInFolder(PlacesUtils.bookmarks.getFolderIdForItem(aCurrentItem)); var treeStructure = TreeStyleTabBookmarksService.getTreeStructureFromItems(items); - var selected = treeStructure[items.indexOf(aCurrentItem)]; + var currentIndex = items.indexOf(aCurrentItem); + var selected = treeStructure[currentIndex]; if (selected > -1) selected = items[selected]; var fragment = document.createDocumentFragment(); @@ -141,14 +142,15 @@ var TreeStyleEditableBookmarkService = { let parent = aIndex; let nest = 0; + let disabled = false; while ((parent = treeStructure[parent]) != -1) { nest++; + if (parent == currentIndex) disabled = true; } if (nest) item.setAttribute('style', 'padding-left:'+nest+'em'); - if (aId == aCurrentItem) afterCurrent = true; - if (afterCurrent) item.setAttribute('disabled', true); + if (disabled || aId == aCurrentItem) item.setAttribute('disabled', true); if (aId == selected && !afterCurrent) item.setAttribute('selected', true); fragment.appendChild(item); diff --git a/content/treestyletab/bookmarksOverlayEditable.xul b/content/treestyletab/bookmarksOverlayEditable.xul index 17f7484f..7c55300f 100644 --- a/content/treestyletab/bookmarksOverlayEditable.xul +++ b/content/treestyletab/bookmarksOverlayEditable.xul @@ -1,5 +1,4 @@ -