diff --git a/mozilla/themes/classic/communicator/related/related.css b/mozilla/themes/classic/communicator/related/related.css index 3a2298acb36..d678c37e996 100644 --- a/mozilla/themes/classic/communicator/related/related.css +++ b/mozilla/themes/classic/communicator/related/related.css @@ -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"); +} diff --git a/mozilla/themes/modern/communicator/related/related.css b/mozilla/themes/modern/communicator/related/related.css index 1fe137af7a4..155f522b115 100644 --- a/mozilla/themes/modern/communicator/related/related.css +++ b/mozilla/themes/modern/communicator/related/related.css @@ -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; +} diff --git a/mozilla/xpfe/components/related/resources/related-panel.js b/mozilla/xpfe/components/related/resources/related-panel.js index 1d46df7f03c..efe02347ec2 100644 --- a/mozilla/xpfe/components/related/resources/related-panel.js +++ b/mozilla/xpfe/components/related/resources/related-panel.js @@ -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); diff --git a/mozilla/xpfe/components/related/resources/related-panel.xul b/mozilla/xpfe/components/related/resources/related-panel.xul index 81b59b2cc08..99858246ada 100644 --- a/mozilla/xpfe/components/related/resources/related-panel.xul +++ b/mozilla/xpfe/components/related/resources/related-panel.xul @@ -50,7 +50,7 @@ - + @@ -63,7 +63,7 @@ - +