Don't add new attribute if value is empty in Composer Advanced Edit dialog, r=96906, r=brade, sr=hewitt

This commit is contained in:
cmanske%netscape.com 2001-10-16 21:51:12 +00:00
Родитель bbd838172b
Коммит b556aab536
3 изменённых файлов: 3 добавлений и 12 удалений

Просмотреть файл

@ -56,7 +56,6 @@ function BuildCSSAttributeTable()
ClearCSSInputWidgets();
}
// add or select attribute in the tree widget
function onChangeCSSAttribute()
{
var name = TrimString(gDialog.AddCSSAttributeNameInput.value);
@ -67,7 +66,7 @@ function onChangeCSSAttribute()
// First try to update existing attribute
// If not found, add new attribute
if ( !UpdateExistingAttribute( name, value, "CSSAList" ) )
if ( !UpdateExistingAttribute( name, value, "CSSAList" ) && value)
AddTreeItem( name, value, "CSSAList", CSSAttrs );
}
@ -104,14 +103,6 @@ function onInputCSSAttributeName()
gDialog.AddCSSAttributeValueInput.value = newValue;
}
function onInputCSSAttributeValue()
{
// Update value in the tree list
UpdateExistingAttribute( gDialog.AddCSSAttributeNameInput.value,
gDialog.AddCSSAttributeValueInput.value,
"CSSAList" );
}
function editCSSAttributeValue(targetCell)
{
if (IsNotTreeHeader(targetCell))

Просмотреть файл

@ -163,7 +163,7 @@ function onInputJSEAttributeValue()
// Update value in the tree list
// Since we have a non-editable menulist,
// we MUST automatically add the event attribute if it doesn't exist
if (!UpdateExistingAttribute( name, value, "JSEAList" ))
if (!UpdateExistingAttribute( name, value, "JSEAList" ) && value)
AddTreeItem( name, value, "JSEAList", JSEAttrs );
}
}

Просмотреть файл

@ -167,7 +167,7 @@
oninput="onInputCSSAttributeName();"
onchange="onChangeCSSAttribute();"/>
<textbox id="AddCSSAttributeValueInput" flex="1"
oninput="onInputCSSAttributeValue();"/>
oninput="onChangeCSSAttribute();"/>
</row>
</rows>
</grid>