From 9c8452c5a3d8aa20ad89ec5c2d9c4e36612e59c2 Mon Sep 17 00:00:00 2001 From: "slamm%netscape.com" Date: Sat, 15 May 1999 01:45:09 +0000 Subject: [PATCH] Move title back into xul file --- rdf/resources/sidebar-browser.css | 18 ++++++---------- rdf/resources/sidebar-browser.xul | 15 ++++++++++++- rdf/resources/sidebar.js | 35 ------------------------------- 3 files changed, 20 insertions(+), 48 deletions(-) diff --git a/rdf/resources/sidebar-browser.css b/rdf/resources/sidebar-browser.css index f132ad95135..8f4df5d6bf6 100644 --- a/rdf/resources/sidebar-browser.css +++ b/rdf/resources/sidebar-browser.css @@ -1,14 +1,11 @@ iframe { - height: 100; + height: 110; border: 0px; } box.sidebartitle { background-color: #505888; - padding-left : 2px; - padding-right : 2px; - padding-top : 3px; - padding-bottom: 3px; + padding: 2px 3px 3px 3px; border: 0px; margin: 0px; font: 10pt sans-serif; @@ -16,10 +13,7 @@ box.sidebartitle { box.panelbar { background-color: #006870; - padding-left : 2px; - padding-right : 2px; - padding-top : 3px; - padding-bottom: 3px; + padding: 2px 3px 3px 3px; border: 0px; margin: 0px; font: 10pt sans-serif; @@ -27,11 +21,11 @@ box.panelbar { box#sidebox { width: 100%; - //height: 100%; + height: 100%; display:block; } -titledbutton.sidebartitle[pseudoclass~="hover"] { +titledbutton.sidebartitle:hover { border: 0px; margin: 1px; } @@ -49,7 +43,7 @@ titledbutton { padding-bottom: 1px; } -titledbutton[pseudoclass~="hover"] { +titledbutton:hover { border: 1px outset white; margin: 0px; } diff --git a/rdf/resources/sidebar-browser.xul b/rdf/resources/sidebar-browser.xul index 5222bfde18b..9082bf93675 100644 --- a/rdf/resources/sidebar-browser.xul +++ b/rdf/resources/sidebar-browser.xul @@ -2,6 +2,13 @@ + + + +]> + + + + + + + - diff --git a/rdf/resources/sidebar.js b/rdf/resources/sidebar.js index d8402b87d87..e76f888f648 100644 --- a/rdf/resources/sidebar.js +++ b/rdf/resources/sidebar.js @@ -15,9 +15,6 @@ var sidebar_resource = 'NC:BrowserSidebarRoot'; function Init(sidebardb, sidebar_resource) { // Initialize the Sidebar - dump('Sidebar Init('+sidebardb+','+sidebar_resource+')\n'); - - //var tree = document.getElementById('tree'); // Install all the datasources named in the Flash Registry into // the tree control. Datasources are listed as members of the @@ -25,9 +22,6 @@ function Init(sidebardb, sidebar_resource) // they appear in that sequence. var registry = RDF.GetDataSource(sidebardb); - // Add it to the tree control's composite datasource. - //tree.database.AddDataSource(registry); - // Create a 'container' wrapper around the sidebar_resources // resource so we can use some utility routines that make access a // bit easier. @@ -36,14 +30,8 @@ function Init(sidebardb, sidebar_resource) sb_datasource.Init(registry, RDF.GetResource(sidebar_resource)); - //var sidebar_container = document.documentElement; var sidebox = document.getElementById('sidebox'); - var sidebar_title = createSidebarTitle('Sidebar'); - if (sidebar_title) { - sidebox.appendChild(sidebar_title); - } - // Now enumerate all of the flash datasources. var enumerator = sb_datasource.GetElements(); @@ -58,34 +46,11 @@ function Init(sidebardb, sidebar_resource) } } -function createSidebarTitle(title) { - var box = document.createElement('box'); - var titleB = document.createElement('titledbutton'); - var reloadB = document.createElement('titledbutton'); - var customizeB = document.createElement('titledbutton'); - var spring = document.createElement('spring'); - box.setAttribute ('class', 'sidebartitle'); - titleB.setAttribute ('value', title); - reloadB.setAttribute ('value', 'Reload'); - reloadB.setAttribute ('onclick', 'window.location.reload()'); - customizeB.setAttribute ('value', 'Customize'); - titleB.setAttribute ('class', 'sidebartitle'); - spring.setAttribute ('flex', '100%'); - - box.appendChild(titleB); - box.appendChild(spring); - box.appendChild(reloadB); - box.appendChild(customizeB); - - return box; -} - function createPanel(registry, service) { var panel_title = getAttr(registry, service, 'title'); var panel_customize = getAttr(registry, service, 'customize'); var panel_content = getAttr(registry, service, 'content'); - dump('Adding...' + panel_title + '\n'); var box = document.createElement('box'); var panelbar = createPanelTitle(panel_title, panel_customize); var iframe = document.createElement('html:iframe');