Search items from the menubar should always open up the search dialog.

This commit is contained in:
rjc%netscape.com 1999-12-30 23:39:08 +00:00
Родитель ca12d4e784
Коммит 5153e40b2b
6 изменённых файлов: 16 добавлений и 16 удалений

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

@ -875,7 +875,7 @@ function createBrowserInstance()
}
}
function OpenSearch(tabName, searchStr)
function OpenSearch(tabName, forceDialogFlag, searchStr)
{
var searchMode = 0;
var searchEngineURI = null;
@ -898,7 +898,7 @@ function OpenSearch(tabName, searchStr)
defaultSearchURL = "http://search.netscape.com/cgi-bin/search?search=";
}
if (searchMode == 1)
if ((searchMode == 1) || (forceDialogFlag == true))
{
window.openDialog("chrome://search/content/search.xul", "SearchWindow", "dialog=no,close,chrome,resizable", tabName, searchStr);
}

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

@ -356,7 +356,7 @@ Contributor(s): ______________________________________. -->
<!-- this is the search/go button -->
<titledbutton id="search-button" value="&searchButton.label;"
onclick="OpenSearch('internet',document.getElementById('urlbar').value);"
onclick="OpenSearch('internet',false, document.getElementById('urlbar').value);"
/>
<!-- this is for other functionality -->
@ -378,7 +378,7 @@ Contributor(s): ______________________________________. -->
<titledbutton id="search-button" crop="right" flex="1" align="top"
value="&searchButton.label;"
onclick="OpenSearch('internet', document.getElementById('urlbar').value);"/>
onclick="OpenSearch('internet', false, document.getElementById('urlbar').value);"/>
<titledbutton id="print-button" crop="right" flex="1" align="top"
value="&printButton.label;" onclick="BrowserPrint()">

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

@ -354,13 +354,13 @@ Contributor(s): ______________________________________. -->
<menuitem value="&findAgainCmd.label;" oncommand="BrowserFindAgain();"/>
<menuseparator />
<menuitem value="&searchBookmarksHistoryCmd.label;"
oncommand="OpenSearch('find', null);"/>
oncommand="OpenSearch('find', true, null);"/>
<menuitem value="&searchInternetCmd.label;"
oncommand="OpenSearch('internet', null);"/>
oncommand="OpenSearch('internet', true, null);"/>
<menuitem value="&searchAllMailCmd.label;"
oncommand="OpenSearch('mail', null);"/>
oncommand="OpenSearch('mail', true, null);"/>
<menuitem value="&searchAddressbookCmd.label;"
oncommand="OpenSearch('addressbook', null);"/>
oncommand="OpenSearch('addressbook', true, null);"/>
<menuseparator />
<menuitem value="&searchComputerCmd.label;"
oncommand="BrowserReload();"/>

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

@ -875,7 +875,7 @@ function createBrowserInstance()
}
}
function OpenSearch(tabName, searchStr)
function OpenSearch(tabName, forceDialogFlag, searchStr)
{
var searchMode = 0;
var searchEngineURI = null;
@ -898,7 +898,7 @@ function OpenSearch(tabName, searchStr)
defaultSearchURL = "http://search.netscape.com/cgi-bin/search?search=";
}
if (searchMode == 1)
if ((searchMode == 1) || (forceDialogFlag == true))
{
window.openDialog("chrome://search/content/search.xul", "SearchWindow", "dialog=no,close,chrome,resizable", tabName, searchStr);
}

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

@ -356,7 +356,7 @@ Contributor(s): ______________________________________. -->
<!-- this is the search/go button -->
<titledbutton id="search-button" value="&searchButton.label;"
onclick="OpenSearch('internet',document.getElementById('urlbar').value);"
onclick="OpenSearch('internet',false, document.getElementById('urlbar').value);"
/>
<!-- this is for other functionality -->
@ -378,7 +378,7 @@ Contributor(s): ______________________________________. -->
<titledbutton id="search-button" crop="right" flex="1" align="top"
value="&searchButton.label;"
onclick="OpenSearch('internet', document.getElementById('urlbar').value);"/>
onclick="OpenSearch('internet', false, document.getElementById('urlbar').value);"/>
<titledbutton id="print-button" crop="right" flex="1" align="top"
value="&printButton.label;" onclick="BrowserPrint()">

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

@ -354,13 +354,13 @@ Contributor(s): ______________________________________. -->
<menuitem value="&findAgainCmd.label;" oncommand="BrowserFindAgain();"/>
<menuseparator />
<menuitem value="&searchBookmarksHistoryCmd.label;"
oncommand="OpenSearch('find', null);"/>
oncommand="OpenSearch('find', true, null);"/>
<menuitem value="&searchInternetCmd.label;"
oncommand="OpenSearch('internet', null);"/>
oncommand="OpenSearch('internet', true, null);"/>
<menuitem value="&searchAllMailCmd.label;"
oncommand="OpenSearch('mail', null);"/>
oncommand="OpenSearch('mail', true, null);"/>
<menuitem value="&searchAddressbookCmd.label;"
oncommand="OpenSearch('addressbook', null);"/>
oncommand="OpenSearch('addressbook', true, null);"/>
<menuseparator />
<menuitem value="&searchComputerCmd.label;"
oncommand="BrowserReload();"/>