mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
fix the no more persisted "class" attribute in old profiles.
the expandable state may be persisted in the future.
This commit is contained in:
parent
a16baf64ec
commit
4562c8656f
@ -91,6 +91,20 @@ function Startup()
|
||||
gName.focus();
|
||||
onFieldInput();
|
||||
gSelectedFolder = RDF.GetResource(gMenulist.selectedItem.id);
|
||||
|
||||
// fix no more persisted class attribute in old profiles
|
||||
var localStore = RDF.GetDataSource("rdf:local-store");
|
||||
var rAttribute = RDF.GetResource("class");
|
||||
var rElement = RDF.GetResource("chrome://browser/content/bookmarks/addBookmark2.xul#expander");
|
||||
var rDialog = RDF.GetResource("chrome://browser/content/bookmarks/addBookmark2.xul");
|
||||
var rPersist = RDF.GetResource(NC_NS+"persist");
|
||||
|
||||
var rOldValue = localStore.GetTarget(rElement, rAttribute, true);
|
||||
if (rOldValue) {
|
||||
localStore.Unassert(rElement, rAttribute, rOldValue, true);
|
||||
localStore.Unassert(rDialog, rPersist, rElement, true);
|
||||
document.getElementById("expander").setAttribute("class", "down");
|
||||
}
|
||||
}
|
||||
|
||||
function onFieldInput()
|
||||
|
Loading…
Reference in New Issue
Block a user