Single click behavior for What's Related panel. Now it is consistent with the Search panel. bug 41609. r=mcafee
git-svn-id: svn://10.0.0.236/trunk@75100 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4ac0fae83a
commit
a9efe402ba
@ -27,47 +27,73 @@
|
||||
*/
|
||||
|
||||
#Tree, .tree-container-treerows
|
||||
{
|
||||
border : none;
|
||||
}
|
||||
{
|
||||
border: none;
|
||||
}
|
||||
|
||||
treeitem > treerow.relatedresult > treecell
|
||||
{
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
treeitem > treerow.relatedresult > treecell:hover
|
||||
{
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
treeitem > treerow.relatedresult > treecell > titledbutton:active
|
||||
{
|
||||
color: red;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
treeitem[container="true"][open="true"][loading="true"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://global/skin/loading.gif") ! important ;
|
||||
list-style-image: url("chrome://global/skin/loading.gif") ! important ;
|
||||
}
|
||||
|
||||
treeitem[container="true"][open="true"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-open.gif");
|
||||
}
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-folder-open.gif");
|
||||
}
|
||||
|
||||
/* Uncomment if double-click model is needed
|
||||
treeitem[container="true"][open="true"][selected="true"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-open-sel.gif");
|
||||
}
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-folder-open-sel.gif");
|
||||
}
|
||||
*/
|
||||
|
||||
treeitem[container="true"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-closed.gif");
|
||||
}
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-folder-closed.gif");
|
||||
}
|
||||
|
||||
/* Uncomment if double-click model is needed
|
||||
treeitem[container="true"][selected="true"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-closed-sel.gif");
|
||||
}
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-folder-closed-sel.gif");
|
||||
}
|
||||
*/
|
||||
|
||||
treeitem[container="true"][id="NC:SiteMapRoot"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/related/sitemap.gif");
|
||||
}
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/related/sitemap.gif");
|
||||
}
|
||||
|
||||
treeitem[container="true"][open="true"][id="NC:SiteMapRoot"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/related/sitemap.gif");
|
||||
}
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/related/sitemap.gif");
|
||||
}
|
||||
|
||||
/* Single click model, so undo regular search tree selection look. */
|
||||
treeitem[selected="true"] > treerow.relatedseparator,
|
||||
treeitem[selected="true"] > treerow.relatedresult
|
||||
{
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-item.gif");
|
||||
}
|
||||
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-item.gif");
|
||||
}
|
||||
|
||||
@ -26,48 +26,74 @@
|
||||
|
||||
*/
|
||||
|
||||
treeitem[container="true"][open="true"][loading="true"] > treerow > .treecell-indent
|
||||
treeitem > treerow.relatedresult > treecell
|
||||
{
|
||||
list-style-image : url("chrome://global/skin/loading.gif") ! important ;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
treeitem > treerow.relatedresult > treecell:hover
|
||||
{
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
treeitem > treerow.relatedresult > treecell > titledbutton:active
|
||||
{
|
||||
color: red;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
treeitem[container="true"][open="true"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-open.gif");
|
||||
}
|
||||
treeitem[container="true"][open="true"][loading="true"] > treerow.relatedresult > .treecell-indent
|
||||
{
|
||||
list-style-image: url("chrome://global/skin/loading.gif") ! important ;
|
||||
}
|
||||
|
||||
treeitem[container="true"][open="true"][selected="true"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-open-sel.gif");
|
||||
}
|
||||
treeitem[container="true"][open="true"] > treerow.relatedresult > .treecell-indent
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-folder-open.gif");
|
||||
}
|
||||
|
||||
treeitem[container="true"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-closed.gif");
|
||||
}
|
||||
/* Uncomment if double-click model is needed
|
||||
treeitem[container="true"][open="true"][selected="true"] > treerow.relatedresult > .treecell-indent
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-folder-open-sel.gif");
|
||||
}
|
||||
*/
|
||||
|
||||
treeitem[container="true"][selected="true"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-folder-closed-sel.gif");
|
||||
}
|
||||
treeitem[container="true"] > treerow.relatedresult > .treecell-indent
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-folder-closed.gif");
|
||||
}
|
||||
|
||||
treeitem[container="true"][id="NC:SiteMapRoot"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/related/sitemap.gif");
|
||||
}
|
||||
/* Uncomment if double-click model is needed
|
||||
treeitem[container="true"][selected="true"] > treerow.relatedresult > .treecell-indent
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-folder-closed-sel.gif");
|
||||
}
|
||||
*/
|
||||
|
||||
treeitem[container="true"][open="true"][id="NC:SiteMapRoot"] > treerow > .treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/related/sitemap.gif");
|
||||
}
|
||||
treeitem[container="true"][id="NC:SiteMapRoot"] > treerow.relatedresult > .treecell-indent
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/related/sitemap.gif");
|
||||
}
|
||||
|
||||
treeitem[container="true"][open="true"][id="NC:SiteMapRoot"] > treerow.relatedresult > .treecell-indent
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/related/sitemap.gif");
|
||||
}
|
||||
|
||||
/* Single click model, so undo regular search tree selection look. */
|
||||
treeitem[selected="true"] > treerow.relatedseparator,
|
||||
treeitem[selected="true"] > treerow.relatedresult
|
||||
{
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.treecell-indent
|
||||
{
|
||||
list-style-image : url("chrome://communicator/skin/bookmarks/bookmark-item.gif");
|
||||
}
|
||||
{
|
||||
list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-item.gif");
|
||||
}
|
||||
|
||||
.tree-cell-twisty
|
||||
{
|
||||
display : none;
|
||||
}
|
||||
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -232,16 +232,28 @@ function Destruct() {
|
||||
|
||||
function openURL(event, root)
|
||||
{
|
||||
if( event.type == "click" &&
|
||||
( event.button != 1 || event.detail != 2 ) )
|
||||
if (event.type == "click" && event.button != 1) {
|
||||
return false;
|
||||
else if( event.type == "keypress" && event.which != 13 )
|
||||
}
|
||||
var target = event.target.parentNode.parentNode;
|
||||
if (target.getAttribute('container') == 'true') {
|
||||
// If single-clicking a folder, open/close it.
|
||||
if (target.getAttribute('open') == 'true') {
|
||||
target.removeAttribute('open');
|
||||
} else {
|
||||
target.setAttribute('open','true');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (event.detail != 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var treeitem = document.getElementById(root).selectedItems[0];
|
||||
if (treeitem.getAttribute('container') == 'true' ||
|
||||
treeitem.getAttribute("type") == "http://home.netscape.com/NC-rdf#BookmarkSeparator")
|
||||
if (treeitem.getAttribute("type") ==
|
||||
"http://home.netscape.com/NC-rdf#BookmarkSeparator") {
|
||||
return(false);
|
||||
}
|
||||
|
||||
var id = treeitem.getAttribute('id');
|
||||
if (!id) return(false);
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<treechildren flex="1">
|
||||
<treeitem uri="..."
|
||||
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
|
||||
<treerow>
|
||||
<treerow class="relatedseparator">
|
||||
<treecell>
|
||||
<separator class="groove" flex="1"/>
|
||||
</treecell>
|
||||
@ -63,7 +63,7 @@
|
||||
<treechildren flex="1">
|
||||
<treeitem uri="..."
|
||||
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
|
||||
<treerow>
|
||||
<treerow class="relatedresult">
|
||||
<treecell class="treecell-indent" value="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
src="rdf:http://home.netscape.com/NC-rdf#Icon" />
|
||||
</treerow>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user