Merged backout

This commit is contained in:
Marco Bonardo 2009-01-23 01:48:33 +01:00
commit 855efe6a92

View File

@ -53,6 +53,7 @@ var gEditItemOverlay = {
_hiddenRows: [],
_observersAdded: false,
_staticFoldersListBuilt: false,
_initialized: false,
get itemId() {
return this._itemId;
@ -62,11 +63,6 @@ var gEditItemOverlay = {
return this._multiEdit;
},
get panel() {
delete this.panel;
return this.panel = document.getElementById("editBookmarkPanelContent");
},
/**
* Determines the initial data for the item edited or added by this dialog
*/
@ -130,10 +126,7 @@ var gEditItemOverlay = {
initPanel: function EIO_initPanel(aFor, aInfo) {
// For sanity ensure that the implementer has uninited the panel before
// trying to init it again, or we could end up leaking due to observers.
// We are using an attribute to allow detecting panel initialization from
// external implementers, for example Mozmill tests need to wait for us
// to be initialized.
if (this.panel.hasAttribute("initialized"))
if (this._initialized)
this.uninitPanel(false);
var aItemIdList;
@ -231,7 +224,7 @@ var gEditItemOverlay = {
// tags selector
this._rebuildTagsSelectorList();
this.panel.setAttribute("initialized", "true");
this._initialized = true;
}
// name picker
@ -526,9 +519,6 @@ var gEditItemOverlay = {
},
uninitPanel: function EIO_uninitPanel(aHideCollapsibleElements) {
if (!this.panel.hasAttribute("initialized"))
return;
if (aHideCollapsibleElements) {
// hide the folder tree if it was previously visible
var folderTreeRow = this._element("folderTreeRow");
@ -558,7 +548,7 @@ var gEditItemOverlay = {
this._allTags = [];
this._itemIds = [];
this._multiEdit = false;
this.panel.removeAttribute("initialized");
this._initialized = false;
},
onTagsFieldBlur: function EIO_onTagsFieldBlur() {