зеркало из https://github.com/mozilla/gecko-dev.git
Bug 432132 - Use <textbox type=number> in Composer where applicable (preference part). Also removed one obsolete function. NPOTDB. r+sr=Neil.
This commit is contained in:
Родитель
035317dfe2
Коммит
17bc4722ad
|
@ -80,11 +80,13 @@
|
|||
accesskey="&documentsInMenu.accesskey;"
|
||||
control="recentFiles"/>
|
||||
<textbox id="recentFiles"
|
||||
name="recent string"
|
||||
size="3"
|
||||
value="10"
|
||||
preference="editor.history.url_maximum"
|
||||
oninput=" ValidateNumber(this, null, 0, 99); LimitStringLength('recentFiles',2);"/>
|
||||
name="recent string"
|
||||
type="number"
|
||||
max="99"
|
||||
min="0"
|
||||
size="3"
|
||||
value="10"
|
||||
preference="editor.history.url_maximum"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
|
|
|
@ -303,8 +303,8 @@ function onInputHTMLAttributeValue()
|
|||
if (value)
|
||||
{
|
||||
// Do value filtering based on type of attribute
|
||||
// (Do not use "LimitStringLength()" and "forceInteger()"
|
||||
// to avoid multiple reseting of input's value and flickering)
|
||||
// (Do not use "forceInteger()" to avoid multiple
|
||||
// input's value and flickering)
|
||||
var selectedItem = gDialog.AddHTMLAttributeNameInput.selectedItem;
|
||||
|
||||
if (selectedItem)
|
||||
|
|
|
@ -273,17 +273,6 @@ function forceInteger(elementID)
|
|||
}
|
||||
}
|
||||
|
||||
function LimitStringLength(elementID, length)
|
||||
{
|
||||
var editField = document.getElementById( elementID );
|
||||
if ( !editField )
|
||||
return;
|
||||
|
||||
var stringIn = editField.value;
|
||||
if (stringIn && stringIn.length > length)
|
||||
editField.value = stringIn.slice(0,length);
|
||||
}
|
||||
|
||||
function InitPixelOrPercentMenulist(elementForAtt, elementInDoc, attribute, menulistID, defaultIndex)
|
||||
{
|
||||
if (!defaultIndex) defaultIndex = gPixel;
|
||||
|
|
Загрузка…
Ссылка в новой задаче