mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 10:27:03 +00:00
fixes for search panel appearance, 28103 r=german, a=jevering
This commit is contained in:
parent
aaa1772939
commit
04ca04b397
@ -23,10 +23,11 @@
|
||||
var rootNode = null;
|
||||
var textArc = null;
|
||||
var RDF_observer = new Object;
|
||||
var settingsButton = null;
|
||||
var settingsButtonText = null;
|
||||
var bundle = null;
|
||||
var pref = null;
|
||||
var settingsButton = null;
|
||||
var settingsButtonText = null;
|
||||
var bunremoveAttributedle = null;
|
||||
var pref = null;
|
||||
var mClickCount = null;
|
||||
|
||||
// get the click count pref
|
||||
try {
|
||||
@ -138,13 +139,14 @@ function SearchPanelStartup()
|
||||
categoryList.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// set the category name on the advanced panel
|
||||
var categoryText = categoryList.options[ categoryList.selectedIndex ].text;
|
||||
var textElement = document.getElementById( "categoryNameText" );
|
||||
textElement.setAttribute( "value", categoryText );
|
||||
//set the category name on the settings button
|
||||
settingsButton.value = settingsButtonText + categoryText + "...";
|
||||
|
||||
|
||||
if( lastCategoryName == "" )
|
||||
lastCategoryName = "NC:SearchEngineRoot";
|
||||
@ -397,6 +399,28 @@ function doStop()
|
||||
|
||||
function doSearch()
|
||||
{
|
||||
//get click count pref for later
|
||||
//and set tree attribute to cause proper results appearance (like links) to happen
|
||||
//when user set pref to single click
|
||||
try {
|
||||
if( pref ) {
|
||||
var prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" );
|
||||
mClickCount = prefvalue ? 2 : 1;
|
||||
}
|
||||
else
|
||||
mClickCount = 1;
|
||||
}
|
||||
catch(e) {
|
||||
mClickCount = 1;
|
||||
}
|
||||
var tree = document.getElementById("Tree");
|
||||
if (mClickCount == 1)
|
||||
tree.setAttribute("singleclick","true");
|
||||
else
|
||||
tree.removeAttribute("singleclick");
|
||||
|
||||
//end insert for single click appearance
|
||||
|
||||
// hide search button
|
||||
var searchButtonNode = document.getElementById("searchbutton");
|
||||
var stopButtonNode = document.getElementById("stopbutton");
|
||||
@ -468,14 +492,14 @@ function doSearch()
|
||||
engineURIs[engineURIs.length] = treeItem.getAttribute( "id" );
|
||||
}
|
||||
else {
|
||||
dump("*** multiple engines present, none selected, selecting the netscape search engine\n");
|
||||
dump("*** multiple search engines present, selecting the netscape search engine\n");
|
||||
for( var i = 0; i < treeChildrenNode.childNodes.length; i++ )
|
||||
{
|
||||
var currItem = treeChildrenNode.childNodes[i];
|
||||
dump("*** the current URI is = " + currItem.getAttribute("id") + "\n");
|
||||
if( currItem.getAttribute("id").indexOf("NetscapeSearchMain") != -1 ) {
|
||||
if( currItem.getAttribute("id").indexOf("Open_Directory") != -1 ) {
|
||||
|
||||
engineURIs[engineURIs.length] = currItem.getAttribute("id");
|
||||
engineURIs[engineURIs.length] = treeItem.getAttribute("id");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -537,7 +561,8 @@ function checkSearchProgress( aSearchURL )
|
||||
//window.frames["sidebar-content"].doStop();
|
||||
doStop();
|
||||
}
|
||||
return true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function FOO_doSearch()
|
||||
@ -551,7 +576,8 @@ function FOO_doSearch()
|
||||
|
||||
function openURL(event, treeitem, root)
|
||||
{
|
||||
try {
|
||||
/* mClickCount variable now made global and retrieved at start of doSearch() */
|
||||
/* try {
|
||||
if( pref ) {
|
||||
var prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" );
|
||||
mClickCount = prefvalue ? 2 : 1;
|
||||
@ -561,7 +587,7 @@ function openURL(event, treeitem, root)
|
||||
}
|
||||
catch(e) {
|
||||
mClickCount = 1;
|
||||
}
|
||||
} */
|
||||
|
||||
if ((event.button != 1) || (event.clickCount != mClickCount))
|
||||
return(false);
|
||||
@ -703,4 +729,3 @@ function switchTab( aPageIndex )
|
||||
var deck = document.getElementById( "advancedDeck" );
|
||||
deck.setAttribute( "index", aPageIndex );
|
||||
}
|
||||
|
||||
|
@ -39,11 +39,12 @@
|
||||
<deck id="advancedDeck" flex="100%" style="border:none;">
|
||||
|
||||
<!-- results panel -->
|
||||
<box align="vertical" flex="100%">
|
||||
<box class="searchpanel-outerbox" align="vertical" flex="100%">
|
||||
<spring style="height: 8px;"/>
|
||||
<box align="horizontal" class="spaced">
|
||||
<html:input id="sidebar-search-text" flex="1" onkeyup="if (event.which == 13) { return doSearch(); }" />
|
||||
<titledbutton id="searchbutton" value="&search.button.label;" onclick="return doSearch();" class="toolbar-non-iconic"/>
|
||||
<titledbutton id="stopbutton" value="&stop.button.label;" onclick="return doStop();" class="toolbar-non-iconic" style="display:none;"/>
|
||||
<titledbutton id="searchbutton" value="&search.button.label;" onclick="return doSearch();" class="dialog search-button"/>
|
||||
<titledbutton id="stopbutton" value="&stop.button.label;" onclick="return doStop();" class="dialog search-button" style="display:none;"/>
|
||||
</box>
|
||||
<box align="horizontal" class="spaced">
|
||||
<html:label for="">&within.label;</html:label>
|
||||
@ -89,9 +90,12 @@
|
||||
<treeitem uri="..." persist="open"
|
||||
loading="rdf:http://home.netscape.com/NC-rdf#loading"
|
||||
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
|
||||
<treerow>
|
||||
<treerow class="searchresult">
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
src="rdf:http://home.netscape.com/NC-rdf#Icon" />
|
||||
<!--<treecell>
|
||||
<html:a href="rdf:http://home.netscape.com/NC-rdf#URL"><html:div class="searchresult">This is a test</html:div></html:a>
|
||||
</treecell>-->
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
@ -108,16 +112,16 @@
|
||||
</box>
|
||||
|
||||
<!-- advanced panel -->
|
||||
<box align="vertical">
|
||||
<box align="vertical" class="searchpanel-outerbox" >
|
||||
|
||||
<box orient="horizontal" align="center">
|
||||
<text value="&whenSearching.label;"/><text value="&within.label;"/>
|
||||
<text value="&whenSearching.label;" class="indented-label"/><text value="&within.label;"/>
|
||||
</box>
|
||||
<box orient="horizontal" align="center" style="font-weight: bold">
|
||||
<box orient="horizontal" align="center" style="font-weight: bold;" class="indented-label">
|
||||
<text id="categoryNameText"/>
|
||||
</box>
|
||||
<box orient="horizontal" align="center">
|
||||
<text value="&useTheseProviders.label;"/>
|
||||
<text value="&useTheseProviders.label;" class="indented-label"/>
|
||||
</box>
|
||||
<spring style="height: 2px;"/>
|
||||
|
||||
@ -152,4 +156,4 @@
|
||||
<spring style="height: 2px;"/>
|
||||
</box>
|
||||
</deck>
|
||||
</window>
|
||||
</window>
|
@ -88,4 +88,43 @@ treeitem > treerow.searchresult > treecell > titledbutton:active {
|
||||
/*undo regular search tree selection look*/
|
||||
treeitem[selected="true"] > treerow.searchresult {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.searchpanel-outerbox {
|
||||
padding: 8px 4px 4px 4px;
|
||||
}
|
||||
|
||||
.indented-label {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
titledbutton.panelbtn {
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
tree[singleclick="true"] treeitem > treerow > treecell > titledbutton {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
tree[singleclick="true"] treeitem > treerow > treecell {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
tree[singleclick="true"] treeitem > treerow > treecell:hover {
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
tree[singleclick="true"] treeitem > treerow > treecell:active {
|
||||
color: red;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/*undo regular search tree selection look*/
|
||||
tree[singleclick="true"] treeitem[selected="true"] > treerow {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user