Bug #362402 --> chrome toolbars aren't toggline on and off properly because goToggleToolbar was accidentally removed. sr=bienvenu

This commit is contained in:
scott%scott-macgregor.org 2006-12-01 22:07:14 +00:00
parent a626fb3a47
commit 34725d1762

View File

@ -188,3 +188,18 @@ function validateFileName(aFileName)
return aFileName.replace(re, "_");
}
function goToggleToolbar( id, elementID )
{
var toolbar = document.getElementById( id );
var element = document.getElementById( elementID );
if ( toolbar )
{
var isHidden = toolbar.getAttribute("hidden") == "true";
toolbar.setAttribute("hidden", !isHidden);
if ( element )
element.setAttribute("checked", isHidden)
document.persist(id, 'hidden');
document.persist(elementID, 'checked');
}
}