зеркало из https://github.com/mozilla/pjs.git
Bug 146598. Disable Search button until we have entered text. Patch by Stephen Walker <walk84@yahoo.com> r=oeschger, sr=alecf
This commit is contained in:
Родитель
54a35d2834
Коммит
b93175f8d5
|
@ -545,6 +545,12 @@ function doFind() {
|
|||
searchTree.builder.rebuild();
|
||||
}
|
||||
|
||||
function doEnabling() {
|
||||
var findButton = document.getElementById("findButton");
|
||||
var findTextbox = document.getElementById("findText");
|
||||
findButton.disabled = !findTextbox.value;
|
||||
}
|
||||
|
||||
function clearDatabases(compositeDataSource) {
|
||||
var enumDS = compositeDataSource.GetDataSources()
|
||||
while (enumDS.hasMoreElements()) {
|
||||
|
|
|
@ -225,9 +225,10 @@
|
|||
<hbox align="center">
|
||||
<textbox id="findText"
|
||||
flex="1"
|
||||
oninput="doEnabling();"
|
||||
onkeypress="if (event.keyCode == KeyEvent.DOM_VK_ENTER || event.keyCode == KeyEvent.DOM_VK_RETURN) doFind();"/>
|
||||
|
||||
<button id="findButton" default="true" label="&gobtn.label;" oncommand="doFind()" flex="0"/>
|
||||
<button id="findButton" default="true" disabled="true" label="&gobtn.label;" oncommand="doFind()" flex="0"/>
|
||||
</hbox>
|
||||
<tree id="help-search-tree"
|
||||
flex="1" hidecolumnpicker="true"
|
||||
|
|
Загрузка…
Ссылка в новой задаче