Bug 312867 - Implement textbox.reset(), expose input's editor, r+sr=neil, r=gavin

This commit is contained in:
martijn.martijn%gmail.com 2006-12-19 11:17:27 +00:00
Родитель bae24bb77b
Коммит 4e4ffb5fbc
2 изменённых файлов: 28 добавлений и 0 удалений

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

@ -47,6 +47,8 @@
<property name="value" onset="this.inputField.value = val; return val;"
onget="return this.inputField.value;"/>
<property name="defaultValue" onset="this.inputField.defaultValue = val; return val;"
onget="return this.inputField.defaultValue;"/>
<property name="type" onset="this.inputField.type = val; return val;"
onget="return this.inputField.type;"/>
<property name="maxLength" onset="this.inputField.maxLength = val; return val;"
@ -77,6 +79,18 @@
]]></getter>
</property>
<method name="reset">
<body><![CDATA[
this.value = this.defaultValue;
try {
this.editor.transactionManager.clear();
return true;
}
catch(e) {}
return false;
]]></body>
</method>
<method name="select">
<body>
this.inputField.select();

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

@ -47,6 +47,8 @@
<property name="value" onset="this.inputField.value = val; return val;"
onget="return this.inputField.value;"/>
<property name="defaultValue" onset="this.inputField.defaultValue = val; return val;"
onget="return this.inputField.defaultValue;"/>
<property name="type" onset="this.inputField.type = val; return val;"
onget="return this.inputField.type;"/>
<property name="maxLength" onset="this.inputField.maxLength = val; return val;"
@ -77,6 +79,18 @@
]]></getter>
</property>
<method name="reset">
<body><![CDATA[
this.value = this.defaultValue;
try {
this.editor.transactionManager.clear();
return true;
}
catch(e) {}
return false;
]]></body>
</method>
<method name="select">
<body>
this.inputField.select();