[]this.getAttribute("value") || "URI"
= 0; )
if (this._directories[index] == aItem)
break;
if (index != -1)
// Are we removing the selected directory?
if (this.parentNode.selectedItem ==
this.removeChild(this.childNodes[index]))
// If so, try to select the first directory, if available.
if (this.hasChildNodes())
this.firstChild.doCommand();
else
this.parentNode.selectedItem = null;
}
]]>
= 0; )
if (this._directories[oldIndex] == aItem)
break;
if (oldIndex != -1) {
// Cache the matching item so that we can use indexOf next time.
aItem = this._directories[oldIndex];
var child = this.childNodes[oldIndex];
child.label = aItem.dirName;
this._directories.sort(this._compare);
// Reorder the menuitems if renaming changed the directory index.
var newIndex = this._directories.indexOf(aItem);
if (newIndex < oldIndex)
this.insertBefore(child, this.childNodes[newIndex]);
else if (newIndex > oldIndex)
this.insertBefore(child, this.childNodes[newIndex].nextSibling);
}
}
]]>