現在のタブより下の階層だけを選択不可に
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4933 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
e79d7f5c65
commit
fa23a2cbae
@ -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/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/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/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://browser/content/places/bookmarkProperties.xul chrome://treestyletab/content/bookmarksOverlayEditable.xul
|
||||||
|
|
||||||
overlay chrome://multipletab/content/config.xul chrome://treestyletab/content/multipletabConfigOverlay.xul
|
overlay chrome://multipletab/content/config.xul chrome://treestyletab/content/multipletabConfigOverlay.xul
|
||||||
|
@ -129,7 +129,8 @@ var TreeStyleEditableBookmarkService = {
|
|||||||
var items = this._getItemsInFolder(PlacesUtils.bookmarks.getFolderIdForItem(aCurrentItem));
|
var items = this._getItemsInFolder(PlacesUtils.bookmarks.getFolderIdForItem(aCurrentItem));
|
||||||
var treeStructure = TreeStyleTabBookmarksService.getTreeStructureFromItems(items);
|
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];
|
if (selected > -1) selected = items[selected];
|
||||||
|
|
||||||
var fragment = document.createDocumentFragment();
|
var fragment = document.createDocumentFragment();
|
||||||
@ -141,14 +142,15 @@ var TreeStyleEditableBookmarkService = {
|
|||||||
|
|
||||||
let parent = aIndex;
|
let parent = aIndex;
|
||||||
let nest = 0;
|
let nest = 0;
|
||||||
|
let disabled = false;
|
||||||
while ((parent = treeStructure[parent]) != -1)
|
while ((parent = treeStructure[parent]) != -1)
|
||||||
{
|
{
|
||||||
nest++;
|
nest++;
|
||||||
|
if (parent == currentIndex) disabled = true;
|
||||||
}
|
}
|
||||||
if (nest) item.setAttribute('style', 'padding-left:'+nest+'em');
|
if (nest) item.setAttribute('style', 'padding-left:'+nest+'em');
|
||||||
|
|
||||||
if (aId == aCurrentItem) afterCurrent = true;
|
if (disabled || aId == aCurrentItem) item.setAttribute('disabled', true);
|
||||||
if (afterCurrent) item.setAttribute('disabled', true);
|
|
||||||
if (aId == selected && !afterCurrent) item.setAttribute('selected', true);
|
if (aId == selected && !afterCurrent) item.setAttribute('selected', true);
|
||||||
|
|
||||||
fragment.appendChild(item);
|
fragment.appendChild(item);
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<?xul-overlay href="bookmarksOverlay.xul"?>
|
|
||||||
<?xml-stylesheet href="bookmarksOverlayEditable.css" type="text/css"?>
|
<?xml-stylesheet href="bookmarksOverlayEditable.css" type="text/css"?>
|
||||||
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
<script src="bookmarksOverlayEditable.js" type="application/x-javascript; version=1.7"/>
|
<script src="bookmarksOverlayEditable.js" type="application/x-javascript; version=1.7"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user