зеркало из https://github.com/mozilla/pjs.git
Move title back into xul file
This commit is contained in:
Родитель
fe956060e9
Коммит
9c8452c5a3
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
<?xml-stylesheet href="resource:/res/samples/xul.css" type="text/css"?>
|
||||
<?xml-stylesheet href="resource:/res/rdf/sidebar-browser.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window
|
||||
[
|
||||
<!ENTITY sidebar.title.label "Sidebar">
|
||||
<!ENTITY sidebar.reload.label "Reload">
|
||||
<!ENTITY sidebar.customize.label "Customize">
|
||||
]>
|
||||
|
||||
<window
|
||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
|
@ -10,6 +17,12 @@
|
|||
<html:script src="sidebar.js" />
|
||||
|
||||
<box id="sidebox" align="vertical">
|
||||
<box class="sidebartitle">
|
||||
<titledbutton class="sidebartitle" value="&sidebar.title.label;"/>
|
||||
<spring flex="100%"/>
|
||||
<titledbutton value="&sidebar.reload.label;"
|
||||
onclick="window.location.reload"/>
|
||||
<titledbutton value="&sidebar.customize.label;"/>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
</window>
|
||||
|
|
|
@ -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');
|
||||
|
|
Загрузка…
Ссылка в новой задаче