Bug 361495 Advanced property editor should start suggesting values again r=IanN

This commit is contained in:
Neil Rashbrook 2011-08-07 14:08:49 +01:00
Родитель 3721c9ceba
Коммит e7d560646a
2 изменённых файлов: 9 добавлений и 23 удалений

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

@ -149,21 +149,6 @@ function BuildHTMLAttributeTable()
}
}
// add or select an attribute in the tree widget
function onChangeHTMLAttribute()
{
var name = TrimString(gDialog.AddHTMLAttributeNameInput.value);
if (!name)
return;
var value = TrimString(gDialog.AddHTMLAttributeValueInput.value);
// First try to update existing attribute
// If not found, add new attribute
if (!UpdateExistingAttribute( name, value, "HTMLAList" ) && value)
AddTreeItem (name, value, "HTMLAList", HTMLAttrs);
}
function ClearHTMLInputWidgets()
{
gDialog.AddHTMLAttributeTree.view.selection.clearSelection();
@ -236,7 +221,7 @@ function onInputHTMLAttributeName()
var valueList = gHTMLAttr[valueListName];
listLen = valueList.length;
if (listLen > 0)
if (listLen == 1)
newValue = valueList[0];
// Note: For case where "value list" is actually just
@ -285,6 +270,9 @@ function onInputHTMLAttributeName()
newValue = existingValue;
gDialog.AddHTMLAttributeValueInput.value = newValue;
if (!existingValue)
onInputHTMLAttributeValue();
}
}

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

@ -118,7 +118,7 @@
<!-- Lists are built at runtime -->
<menulist id="AddHTMLAttributeNameInput" editable="true" flex="1"
oninput="onInputHTMLAttributeName();"
onchange="onChangeHTMLAttribute();"/>
oncommand="onInputHTMLAttributeName();"/>
<deck id="AddHTMLAttributeValueDeck" selectedIndex="0">
<hbox align="top">
<textbox id="AddHTMLAttributeValueTextbox" flex="1"
@ -126,7 +126,8 @@
</hbox>
<hbox align="top">
<menulist id="AddHTMLAttributeValueMenulist" editable="true" flex="1"
oninput="onInputHTMLAttributeValue();"/>
oninput="onInputHTMLAttributeValue();"
oncommand="onInputHTMLAttributeValue();"/>
</hbox>
</deck>
</row>
@ -165,8 +166,7 @@
</row>
<row align="top" equalsize="always">
<textbox id="AddCSSAttributeNameInput" flex="1"
oninput="onInputCSSAttributeName();"
onchange="onChangeCSSAttribute();"/>
oninput="onInputCSSAttributeName();"/>
<textbox id="AddCSSAttributeValueInput" flex="1"
oninput="onChangeCSSAttribute();"/>
</row>
@ -206,9 +206,7 @@
<row align="top" equalsize="always">
<!-- List is built at runtime -->
<menulist id="AddJSEAttributeNameList" flex="1"
oncommand="onSelectJSEAttribute();">
<menupopup/>
</menulist>
oncommand="onSelectJSEAttribute();"/>
<textbox id="AddJSEAttributeValueInput" flex="1"
oninput="onInputJSEAttributeValue();"/>
</row>