mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
add SetPixelOrPercentByID()
This commit is contained in:
parent
9e17a12a99
commit
e2af06b196
@ -81,6 +81,26 @@ function SetLabelEnabledByID( labelID, doEnable )
|
||||
}
|
||||
}
|
||||
|
||||
// Input string is "" for pixel, or "%" for percent
|
||||
function SetPixelOrPercentByID(elementID, percentString)
|
||||
{
|
||||
percentChar = percentString;
|
||||
dump("SetPixelOrPercent. PercentChar="+percentChar+"\n");
|
||||
|
||||
btn = document.getElementById( elementID );
|
||||
if ( btn )
|
||||
{
|
||||
if ( percentChar == "%" )
|
||||
{
|
||||
btn.setAttribute( "value", "percent" );
|
||||
}
|
||||
else
|
||||
{
|
||||
btn.setAttribute( "value", "pixels" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// All dialogs share this simple method
|
||||
function onCancel()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user