fix for #48813 - add feedback when a "find" fails

r=blake
sr=ben
This commit is contained in:
alecf%netscape.com 2000-12-06 22:40:39 +00:00
Родитель 5e3861c881
Коммит de4aa35615
4 изменённых файлов: 8 добавлений и 3 удалений

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

@ -27,6 +27,7 @@
dialog.find = document.getElementById("ok");
dialog.cancel = document.getElementById("cancel");
dialog.enabled = false;
dialog.bundle = document.getElementById("findBundle");
}
function loadDialog()
@ -112,7 +113,9 @@
loadData();
// Search.
finder.findNext( data );
var result = finder.findNext( data );
if (!result)
window.alert(dialog.bundle.getString("notFoundWarning"));
// don't close the window
return false;

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

@ -45,8 +45,8 @@ Contributor(s): Stuart Parmenter <pavlov@netscape.com>
persist="screenX screenY"
screenX="24" screenY="24">
<html:script language="JavaScript" src="chrome://global/content/finddialog.js"/>
<script language="JavaScript" src="chrome://global/content/finddialog.js"/>
<stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
<box>
<!-- hack. we seem to need this separator to get it to render -->

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

@ -0,0 +1 @@
notFoundWarning=The text you entered was not found.

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

@ -162,6 +162,7 @@ en-US.jar:
locale/en-US/global/console.dtd (console/resources/locale/en-US/console.dtd)
locale/en-US/global/console.properties (console/resources/locale/en-US/console.properties)
locale/en-US/global/finddialog.dtd (find/resources/locale/en-US/finddialog.dtd)
locale/en-US/global/finddialog.properties (find/resources/locale/en-US/finddialog.properties)
toolkit.jar:
content/global/console.js (console/resources/content/console.js)