зеркало из https://github.com/mozilla/gecko-dev.git
Send Link and Send Page in Manage Bookmarks do nothing, and some history polish (73904). r=hewitt sr=ben
This commit is contained in:
Родитель
953d9a055e
Коммит
e699ffca12
|
@ -21,12 +21,17 @@
|
|||
* Ben Goodger <ben@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
var gOKButton;
|
||||
var gSearchField;
|
||||
function Startup()
|
||||
{
|
||||
doSetOKCancel(find);
|
||||
var bundle = document.getElementById("historyBundle");
|
||||
document.getElementById("ok").label = bundle.getString("search_button_label");
|
||||
document.getElementById("searchField").focus();
|
||||
gOKButton = document.getElementById("ok");
|
||||
gOKButton.label = bundle.getString("search_button_label");
|
||||
gOKButton.disabled = true;
|
||||
gSearchField = document.getElementById("searchField");
|
||||
gSearchField.focus();
|
||||
}
|
||||
|
||||
function find()
|
||||
|
@ -35,11 +40,10 @@ function find()
|
|||
// rooted on the URI.
|
||||
var match = document.getElementById("matchList");
|
||||
var method = document.getElementById("methodList");
|
||||
var field = document.getElementById("searchField");
|
||||
var searchURI = "find:datasource=history"
|
||||
searchURI += "&match=" + match.selectedItem.value;
|
||||
searchURI += "&method=" + method.selectedItem.value;
|
||||
searchURI += "&text=" + escape(field.value);
|
||||
searchURI += "&text=" + escape(gSearchField.value);
|
||||
var hstWindow = findMostRecentWindow("history:searchresults", "chrome://communicator/content/history/history.xul", searchURI);
|
||||
|
||||
// Update the root of the tree if we're using an existing search window.
|
||||
|
@ -61,3 +65,7 @@ function findMostRecentWindow(aType, aURI, aParam)
|
|||
"", "chrome,all,dialog=no", aParam);
|
||||
}
|
||||
|
||||
function doEnabling()
|
||||
{
|
||||
gOKButton.disabled = !gSearchField.value;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,8 @@
|
|||
<menuitem value="doesntcontain" label="&search.doesntcontain.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<textbox id="searchField" onkeypress="if (event.keyCode == 13) find();" flex="1"/>
|
||||
<textbox id="searchField" onkeypress="if (event.keyCode == 13) find();" flex="1"
|
||||
oninput="doEnabling();"/>
|
||||
</hbox>
|
||||
|
||||
<separator/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче