forked from openkylin/platform_build
am 557528a1: am 3f5fee62: am c942e879: fix sac search
* commit '557528a1542239026127c60e4da0e978e71bb6ad': fix sac search
This commit is contained in:
commit
c80298b08d
|
@ -1858,7 +1858,6 @@ function loadSearchResults() {
|
||||||
searchOptions = new google.search.SearcherOptions();
|
searchOptions = new google.search.SearcherOptions();
|
||||||
searchOptions.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
|
searchOptions.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
|
||||||
|
|
||||||
if(window.location.host=="source.android.com"){
|
|
||||||
// Configure s.a.c searchers
|
// Configure s.a.c searchers
|
||||||
sacSiteSearcher = new google.search.WebSearch();
|
sacSiteSearcher = new google.search.WebSearch();
|
||||||
sacSiteSearcher.setUserDefinedLabel("All");
|
sacSiteSearcher.setUserDefinedLabel("All");
|
||||||
|
@ -1886,46 +1885,6 @@ function loadSearchResults() {
|
||||||
searchControl.addSearcher(devicesSearcher, searchOptions);
|
searchControl.addSearcher(devicesSearcher, searchOptions);
|
||||||
searchControl.addSearcher(accessoriesSearcher, searchOptions);
|
searchControl.addSearcher(accessoriesSearcher, searchOptions);
|
||||||
searchControl.addSearcher(compatibilitySearcher, searchOptions);
|
searchControl.addSearcher(compatibilitySearcher, searchOptions);
|
||||||
}
|
|
||||||
else{
|
|
||||||
// configure each of the searchers, for each tab
|
|
||||||
devSiteSearcher = new google.search.WebSearch();
|
|
||||||
devSiteSearcher.setUserDefinedLabel("All");
|
|
||||||
devSiteSearcher.setSiteRestriction("001482626316274216503:zu90b7s047u");
|
|
||||||
|
|
||||||
designSearcher = new google.search.WebSearch();
|
|
||||||
designSearcher.setUserDefinedLabel("Design");
|
|
||||||
designSearcher.setSiteRestriction("http://developer.android.com/design/");
|
|
||||||
|
|
||||||
trainingSearcher = new google.search.WebSearch();
|
|
||||||
trainingSearcher.setUserDefinedLabel("Training");
|
|
||||||
trainingSearcher.setSiteRestriction("http://developer.android.com/training/");
|
|
||||||
|
|
||||||
guidesSearcher = new google.search.WebSearch();
|
|
||||||
guidesSearcher.setUserDefinedLabel("Guides");
|
|
||||||
guidesSearcher.setSiteRestriction("http://developer.android.com/guide/");
|
|
||||||
|
|
||||||
referenceSearcher = new google.search.WebSearch();
|
|
||||||
referenceSearcher.setUserDefinedLabel("Reference");
|
|
||||||
referenceSearcher.setSiteRestriction("http://developer.android.com/reference/");
|
|
||||||
|
|
||||||
googleSearcher = new google.search.WebSearch();
|
|
||||||
googleSearcher.setUserDefinedLabel("Google Services");
|
|
||||||
googleSearcher.setSiteRestriction("http://developer.android.com/google/");
|
|
||||||
|
|
||||||
blogSearcher = new google.search.WebSearch();
|
|
||||||
blogSearcher.setUserDefinedLabel("Blog");
|
|
||||||
blogSearcher.setSiteRestriction("http://android-developers.blogspot.com");
|
|
||||||
|
|
||||||
// add each searcher to the search control
|
|
||||||
searchControl.addSearcher(devSiteSearcher, searchOptions);
|
|
||||||
searchControl.addSearcher(designSearcher, searchOptions);
|
|
||||||
searchControl.addSearcher(trainingSearcher, searchOptions);
|
|
||||||
searchControl.addSearcher(guidesSearcher, searchOptions);
|
|
||||||
searchControl.addSearcher(referenceSearcher, searchOptions);
|
|
||||||
searchControl.addSearcher(googleSearcher, searchOptions);
|
|
||||||
searchControl.addSearcher(blogSearcher, searchOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// configure result options
|
// configure result options
|
||||||
|
|
Loading…
Reference in New Issue