bug 70810 [XUL Syntax] Change tab syntax - another of the XUL 1.0 changes

r=ben, sr=hyatt
This commit is contained in:
maolson%earthlink.net 2001-04-18 06:59:04 +00:00
Родитель b46f58dc17
Коммит 7915e17171
37 изменённых файлов: 240 добавлений и 458 удалений

Просмотреть файл

@ -151,11 +151,10 @@ XUL_ATOM(titledboxContentPseudo, ":titledbox-content")
XUL_ATOM(stack, "stack")
XUL_ATOM(deck, "deck")
XUL_ATOM(tabcontrol, "tabcontrol")
XUL_ATOM(tab, "tab")
XUL_ATOM(tabpanel, "tabpanel")
XUL_ATOM(tabpage, "tabpage")
XUL_ATOM(tabbox, "tabbox")
XUL_ATOM(tab, "tab")
XUL_ATOM(tabpanels, "tabpanels")
XUL_ATOM(tabpanel, "tabpanel")
XUL_ATOM(index, "index")
XUL_ATOM(maxpos, "maxpos")
XUL_ATOM(curpos, "curpos")

Просмотреть файл

@ -162,7 +162,7 @@ function EditorStartup(editorType, editorElement)
gPreviewModeButton = document.getElementById("PreviewModeButton");
// mark first tab as selected
document.getElementById("EditModeTabbox").selectedTab = gNormalModeButton;
document.getElementById("EditModeTabs").selectedTab = gNormalModeButton;
// XUL elements we use when switching from normal editor to edit source
gContentWindowDeck = document.getElementById("ContentWindowDeck");
@ -1200,7 +1200,7 @@ function SetDisplayMode(mode)
if (mode == DisplayModeAllTags) selectedTab = gTagModeButton;
if (mode == DisplayModeSource) selectedTab = gSourceModeButton;
if (selectedTab)
document.getElementById("EditModeTabbox").selectedTab = selectedTab;
document.getElementById("EditModeTabs").selectedTab = selectedTab;
if (mode == DisplayModeSource)
{

Просмотреть файл

@ -239,12 +239,12 @@
</deck>
<box id="EditModeToolbar" hidden="false" autostretch="never" valign="middle" persist="hidden collapsed">
<tabbox id="EditModeTabbox" class="tabbox-bottom" flex="1">
<tab id="NormalModeButton"/>
<tabs id="EditModeTabs" class="tabs-bottom" flex="1">
<tab id="NormalModeButton"/>
<tab id="TagModeButton"/>
<tab id="SourceModeButton"/>
<tab id="PreviewModeButton"/>
</tabbox>
</tabs>
</box>
<!-- Some of this is from globarOverlay.xul -->

Просмотреть файл

@ -64,13 +64,13 @@
<separator class="thin"/>
<tabcontrol align="vertical" orient="vertical" flex="1">
<tabbox>
<tabbox orient="vertical" flex="1">
<tabs>
<tab label="&tabHTML.label;"/>
<tab label="&tabCSS.label;"/>
<tab label="&tabJSE.label;"/>
</tabbox>
<tabpanel flex="1">
</tabs>
<tabpanels flex="1">
<!-- ============================================================== -->
<!-- HTML Attributes -->
<!-- ============================================================== -->
@ -191,8 +191,8 @@
</box>
</box>
<!-- ============================================================== -->
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
<spring class="spacer"/>
<box id="okCancelButtonsRight"/>

Просмотреть файл

@ -26,7 +26,7 @@ var tagname = "table"
var TableElement;
var CellElement;
var TableCaptionElement;
var TabPanel;
var TabPanels;
var dialog;
var globalCellElement;
var globalTableElement
@ -142,7 +142,7 @@ function Startup()
dialog.TextWrapCheckbox = document.getElementById("TextWrapCheckbox");
dialog.CellColorCheckbox = document.getElementById("CellColorCheckbox");
TabPanel = document.getElementById("TabPanel");
TabPanels = document.getElementById("TabPanels");
var TableTab = document.getElementById("TableTab");
var CellTab = document.getElementById("CellTab");
@ -195,8 +195,8 @@ function Startup()
{
currentPanel = CellPanel;
//Set index for starting panel on the <tabpanel> element
TabPanel.setAttribute("index", CellPanel);
//Set index for starting panel on the <tabpanels> element
TabPanels.setAttribute("index", CellPanel);
// Trigger setting of style for the tab widgets
CellTab.setAttribute("selected", "true");
@ -771,8 +771,8 @@ function SwitchToValidatePanel()
{
if (currentPanel != validatePanel)
{
//Set index for starting panel on the <tabpanel> element
TabPanel.setAttribute("index", validatePanel);
//Set index for starting panel on the <tabpanels> element
TabPanels.setAttribute("index", validatePanel);
if (validatePanel == CellPanel)
{
// Trigger setting of style for the tab widgets

Просмотреть файл

@ -46,12 +46,12 @@
<broadcaster id="args" value=""/>
<keyset id="dialogKeys"/>
<tabcontrol align="vertical" orient="vertical">
<tabbox flex="1">
<tabbox orient="vertical">
<tabs flex="1">
<tab id="TableTab" oncommand="SelectTableTab()" label="&tableTab.label;"/>
<tab id="CellTab" oncommand="SelectCellTab()" label="&cellTab.label;"/>
</tabbox>
<tabpanel orient="vertical" id="TabPanel">
</tabs>
<tabpanels orient="vertical" id="TabPanels">
<!-- TABLE PANEL -->
<box id="TablePanel" orient="vertical">
@ -271,7 +271,7 @@
<spring flex="1"/>
</box><!-- Cell Panel -->
</tabpanel>
</tabpanels>
<spring class="spacer"/>
<!-- from EdDialogOverlay -->
<box>
@ -279,5 +279,5 @@
<button class="dialog" label="&applyButton.label;" oncommand="Apply();"/>
<box id="okCancelButtons"/>
</box>
</tabcontrol>
</tabbox>
</window>

Просмотреть файл

@ -69,12 +69,12 @@
<text value="&t3.label;"/>
</box>
<tabcontrol orient="vertical" flex="1">
<tabbox orient="horizontal">
<tabbox orient="vertical" flex="1">
<tabs orient="horizontal">
<tab label="&tab1.label;"/>
<tab label="&tab2.label;"/>
</tabbox>
<tabpanel flex="1">
</tabs>
<tabpanels flex="1">
<box id="help-toc">
<tree id="help-toc-tree" ref="urn:root" flex="1*"
datasources="chrome://help/locale/help-toc.rdf"
@ -129,8 +129,8 @@
src="chrome://help/locale/help_index.html" />
</box>
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
</box>
<splitter id="helpsidebar-splitter"

Просмотреть файл

@ -13,10 +13,10 @@
<script type="application/x-javascript" src="chrome://inspector/content/prefs/InspectorPrefs.js"/>
<tabcontrol flex="1">
<tabbox id="tbxPrefs"/>
<tabpanel id="tbpPrefs" flex="1"/>
</tabcontrol>
<tabbox flex="1">
<tabs id="tabsPrefs"/>
<tabpanels id="tabpanelsPrefs" flex="1"/>
</tabbox>
<box id="okCancelButtonsRight"/>
</window>

Просмотреть файл

@ -37,12 +37,12 @@
<popupset id="ppsGlobalPopupset" collapsed="true"/>
<broadcasterset id="brsGlobalCommands"/>
<tabcontrol id="tbcInspectorSidebar" flex="1">
<tabbox>
<tabbox id="tabboxInspectorSidebar" flex="1">
<tabs>
<tab label="Document"/>
<tab label="Node"/>
</tabbox>
<tabpanel flex="1">
</tabs>
<tabpanels flex="1">
<box id="bxDocPane" flex="1" orient="vertical">
<box id="bxDocHeader" autostretch="never">
<menubutton class="viewer-list" ins-role="viewer-list" disabled="true"/>
@ -60,6 +60,6 @@
</box>
<iframe id="ifObjViewer" class="viewer-iframe" flex="1" ins-role="viewer-iframe"/>
</box>
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
</window>

Просмотреть файл

@ -136,7 +136,7 @@
<vbox id="outer-box" flex="1">
<vbox id="upper-box" flex="1">
<hbox id="tabpanel-contents-box" flex="1">
<hbox id="tabpanels-contents-box" flex="1">
<vbox id="user-list-box" flex="1" width="20%" persist="collapsed width">
<tree id="user-list" container="true" datasources="rdf:null" flex="1"
@ -206,18 +206,18 @@
flex="1" src="chrome://chatzilla/content/outputwindow.html"/>
</vbox>
</hbox> <!-- tabpanel-contents-box -->
</hbox> <!-- tabpanels-contents-box -->
<hbox id="tabstrip-box" flex="0" crop="right">
<scrollbox id="views-tbar" persist="collapsed" orient="horizontal"
flex="1" onoverflow="dd('views-tbar overflow');"
onunderflow="dd('views-tbar underflow');">
<tabbox class="tabbox-bottom" id="views-tbar-inner" flex="1"
<tabs class="tabs-bottom" id="views-tbar-inner" flex="1"
crop="right">
<tab collapsed="true"/> <!-- dummy tab to keep the freaking xbl from
causing an exception -->
</tabbox>
</tabs>
</scrollbox>
</hbox>

Просмотреть файл

@ -34,7 +34,7 @@ window {
}
#tabpanel-contents-box {
#tabpanels-contents-box {
margin: 3px;
}
@ -112,4 +112,4 @@ window {
list-style-image: url(chrome://chatzilla/skin/images/isnt-voice.gif)
}
}

Просмотреть файл

@ -31,8 +31,8 @@
windowtype="xuledit:document"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tabcontrol id="scratchView" flex="1" orient="vertical">
<tabpanel flex="1">
<tabbox id="scratchView" flex="1" orient="vertical">
<tabpanels flex="1">
<box orient="vertical">
<iframe name="vfView" id="vfView" flex="1"
style="overflow: auto;"
@ -69,12 +69,11 @@
<spring flex="1"/>
</box>
</box>
</tabpanel>
<tabbox>
</tabpanels>
<tabs>
<tab label="Designer"/>
<tab label="DOM Tree"/>
</tabbox>
</tabcontrol>
</tabs>
</tabbox>
</window>

Просмотреть файл

@ -79,7 +79,7 @@ function Startup()
}
try {
var tab = window.arguments[0];
var element2 = document.getElementById("tabcontrol");
var element2 = document.getElementById("tabcontrols");
if (tab == "0") {
element = document.getElementById("cookiesTab");
element2.selectedTab = element;

Просмотреть файл

@ -44,13 +44,13 @@
<keyset id="dialogKeys"/>
<tabcontrol id="tabcontrol" flex="1" orient="vertical">
<tabbox>
<tabbox id="tabbox" flex="1" orient="vertical">
<tabs>
<tab id="cookiesTab" label="&tab.cookiesonsystem.label;"/>
<tab id="serversTab" label="&tab.bannedservers.label;"/>
<tab id="imagesTab" hidden="true" label="&tab.bannedimages.label;"/>
</tabbox>
<tabpanel id="panel" flex="1">
</tabs>
<tabpanels id="panel" flex="1">
<box class="tabpanel" id="system" flex="1" orient="vertical">
<text class="label" value="&div.cookiesonsystem.label;"/>
<separator class="thin"/>
@ -193,8 +193,8 @@
</box>
</box>
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
<separator class="thin"/>
<box id="okCancelButtonsRight"/>

Просмотреть файл

@ -44,14 +44,14 @@
<keyset id="dialogKeys"/>
<tabcontrol flex="1" orient="vertical">
<tabbox orient="horizontal">
<tabbox flex="1" orient="vertical">
<tabs orient="horizontal">
<tab id="signonTab" label="&tab.signonsstored.label;"/>
<tab id="signonSitesTab" label="&tab.signonsnotstored.label;"/>
<tab id="nopreview" label="&tab.nopreview.label;"/>
<tab id="nocapture" label="&tab.nocapture.label;"/>
</tabbox>
<tabpanel id="panel" flex="1">
</tabs>
<tabpanels id="panel" flex="1">
<!-- saved signons -->
<box id="savedsignons" flex="1" orient="vertical">
<html>&spiel.signonsstored.label;</html>
@ -170,8 +170,8 @@
oncommand="DeleteAllNocaptures();"/>
</box>
</box>
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
<separator class="thin"/>

Просмотреть файл

@ -32,14 +32,14 @@ Rights Reserved.
<box id="editcard" align="vertical">
<tabcontrol orient="vertical" style="margin:5px">
<tabbox id="abTabBox">
<tabbox orient="vertical" style="margin:5px">
<tabs id="abTabs">
<tab label="&Name.tab;"/>
<tab label="&Address.tab;"/>
<tab label="&Other.tab;"/>
</tabbox>
</tabs>
<tabpanel id="abTabPanel" flex="1">
<tabpanels id="abTabPanels" flex="1">
<!-- ** Name Tab ** -->
<box index="name" align="vertical" flex="1">
@ -319,8 +319,8 @@ Rights Reserved.
</box>
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
</box>
</overlay>

Просмотреть файл

@ -95,9 +95,9 @@ function folderPropsOnLoad()
// select the initial tab
if (window.arguments[0].tabID) {
// set index for starting panel on the <tabpanel> element
var folderPropTabPanel = document.getElementById("folderPropTabPanel");
folderPropTabPanel.setAttribute("index", window.arguments[0].tabIndex);
// set index for starting panel on the <tabpanels> element
var folderPropTabPanels = document.getElementById("folderPropTabPanels");
folderPropTabPanels.setAttribute("index", window.arguments[0].tabIndex);
var tab = document.getElementById(window.arguments[0].tabID);
tab.setAttribute("selected", "true");

Просмотреть файл

@ -40,13 +40,13 @@
<keyset id="dialogKeys"/>
<tabcontrol orient="vertical">
<tabbox>
<tabbox orient="vertical">
<tabs>
<tab id="GeneralTab" label="&generalInfo.label;" accesskey="&generalInfo.accesskey;"/>
<tab id="DownloadTab" label="&download.label;" accesskey="&download.accesskey;"/>
<tab id="folderCharsetTab" label="&folderCharsetTab.label;" accesskey="&folderCharsetTab.accesskey;"/>
</tabbox>
<tabpanel id="folderPropTabPanel">
</tabs>
<tabpanels id="folderPropTabPanels">
<box orient="vertical">
<box id="nameBox" orient="vertical">
<text class="label" value="&folderProps.name.label;" />
@ -74,8 +74,8 @@
<checkbox id="folderCharsetOverride" label="&folderCharsetOverride.label;" />
</box>
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
<box id="okCancelButtonsRight"/>

Просмотреть файл

Просмотреть файл

@ -1,17 +1,17 @@
/* ............. edit mode tabbox ............... */
/* ............. edit mode tabs ............... */
.tabbox-bottom {
.tabs-bottom {
border-top: none;
}
.tabbox-bottom > .tabbox-spring {
.tabs-bottom > .tabs-spring {
border-top: 1px solid threedshadow !important;
border-bottom: none;
}
/* ............. edit mode tabs ............... */
.tabbox-bottom > tab {
.tabs-bottom > tab {
margin-top: 0px;
margin-bottom: 2px;
border-top: none;
@ -20,7 +20,7 @@
-moz-user-focus: ignore;
}
.tabbox-bottom > tab > .tab-box {
.tabs-bottom > tab > .tab-box {
border-left: 1px solid threedhighlight;
border-top: 1px solid threedshadow;
border-right: 1px solid threedshadow;
@ -30,32 +30,32 @@
/* ............. selected state ............... */
.tabbox-bottom > tab[selected="true"] {
.tabs-bottom > tab[selected="true"] {
margin-bottom: 0px;
}
.tabbox-bottom > tab[selected="true"] > .tab-box {
.tabs-bottom > tab[selected="true"] > .tab-box {
background-color: #ffffff;
border-bottom: 1px solid threedshadow !important;
border-top: 1px solid #ffffff !important;
}
/* ............. after selected ............... */
.tabbox-bottom > tab[afterselected="true"] {
.tabs-bottom > tab[afterselected="true"] {
border-left: none !important;
}
.tabbox-bottom > tab[afterselected="true"] > .tab-box {
.tabs-bottom > tab[afterselected="true"] > .tab-box {
border-left: none !important;
}
/* ............. before selected ............... */
/* top & bottom tabs */
.tabbox-bottom > tab[beforeselected="true"] {
.tabs-bottom > tab[beforeselected="true"] {
border-right: none !important;
}
.tabbox-bottom > tab[beforeselected="true"] > .tab-box {
.tabs-bottom > tab[beforeselected="true"] > .tab-box {
border-right: none !important;
}

Просмотреть файл

@ -1,17 +1,17 @@
/* ............. edit mode tabbox ............... */
/* ............. edit mode tabs ............... */
.tabbox-bottom {
.tabs-bottom {
border-top: none;
}
.tabbox-bottom > .tabbox-spring {
.tabs-bottom > .tabs-spring {
border-top: 1px solid ThreeDShadow !important;
border-bottom: none;
}
/* ............. edit mode tabs ............... */
.tabbox-bottom > tab {
.tabs-bottom > tab {
margin-top: 0px;
margin-bottom: 2px;
border-top: none;
@ -20,7 +20,7 @@
-moz-user-focus: ignore;
}
.tabbox-bottom > tab > .tab-box {
.tabs-bottom > tab > .tab-box {
border-left: 1px solid ThreeDHighlight;
border-top: 1px solid ThreeDShadow;
border-right: 1px solid ThreeDShadow;
@ -30,32 +30,32 @@
/* ............. selected state ............... */
.tabbox-bottom > tab[selected="true"] {
.tabs-bottom > tab[selected="true"] {
margin-bottom: 0px;
}
.tabbox-bottom > tab[selected="true"] > .tab-box {
.tabs-bottom > tab[selected="true"] > .tab-box {
background-color: #ffffff;
border-bottom: 1px solid ThreeDShadow !important;
border-top: 1px solid #ffffff !important;
}
/* ............. after selected ............... */
.tabbox-bottom > tab[afterselected="true"] {
.tabs-bottom > tab[afterselected="true"] {
border-left: none !important;
}
.tabbox-bottom > tab[afterselected="true"] > .tab-box {
.tabs-bottom > tab[afterselected="true"] > .tab-box {
border-left: none !important;
}
/* ............. before selected ............... */
/* top & bottom tabs */
.tabbox-bottom > tab[beforeselected="true"] {
.tabs-bottom > tab[beforeselected="true"] {
border-right: none !important;
}
.tabbox-bottom > tab[beforeselected="true"] > .tab-box {
.tabs-bottom > tab[beforeselected="true"] > .tab-box {
border-right: none !important;
}

Просмотреть файл

@ -174,7 +174,7 @@
</content>
</binding>
<binding id="tabbox" extends="chrome://global/content/tabBindings.xml#tabbox">
<binding id="tabs" extends="chrome://global/content/tabBindings.xml#tabs">
<content>
<xul:spring class="tab-border-top-left-cap"/>
<xul:spring class="tab-border-top-left"/>

Просмотреть файл

@ -90,8 +90,8 @@ tab:hover:active[selected="true"] > .tab-image-right {
width : 2px;
}
tabbox {
-moz-binding : url(chrome://global/skin/classicBindings.xml#tabbox);
tabs {
-moz-binding : url(chrome://global/skin/classicBindings.xml#tabs);
padding : 0px;
}
@ -153,33 +153,33 @@ tabbox {
background : url(chrome://global/skin/tab-sm-bot-sel-right.gif) no-repeat;
}
.tabbox-bottom > .tab-border-top-left {
.tabs-bottom > .tab-border-top-left {
background : url(chrome://global/skin/tab-border-bot.gif) repeat-x top;
width : 2px;
}
.tabbox-bottom > .tab-border-top-left-cap {
.tabs-bottom > .tab-border-top-left-cap {
background : url(chrome://global/skin/tab-border-bot-left-cap.gif) no-repeat top;
width : 2px;
}
.tabbox-bottom > .tab-border-top-right {
.tabs-bottom > .tab-border-top-right {
background : url(chrome://global/skin/tab-border-bot.gif) repeat-x top;
}
.tabbox-bottom > .tab-border-top-right-cap {
.tabs-bottom > .tab-border-top-right-cap {
background : url(chrome://global/skin/tab-border-bot-right-cap.gif) no-repeat top;
width : 2px;
}
/* top tabs */
tabcontrol[align="vertical"] tabbox[align="horizontal"] tab {
tabbox[orient="vertical"] tabs[orient="horizontal"] tab {
padding: 0px;
margin: 0px;
}
/* bottom tabs */
tabcontrol[align="vertical"] tabpanel + tabbox[align="horizontal"] tab {
tabbox[orient="vertical"] tabpanels + tabs[orient="horizontal"] tab {
border-top: none;
border-bottom: 1px solid #666666;
border-left: 1px solid white;
@ -190,7 +190,7 @@ tabcontrol[align="vertical"] tabpanel + tabbox[align="horizontal"] tab {
}
/* left tabs */
tabcontrol[align="horizontal"] tabbox[align="vertical"] tab {
tabbox[orient="horizontal"] tabs[orient="vertical"] tab {
border-right: none;
-moz-border-radius: 8px 0px 0px 8px;
padding-right: 1px;
@ -198,7 +198,7 @@ tabcontrol[align="horizontal"] tabbox[align="vertical"] tab {
}
/* right tabs */
tabcontrol[align="horizontal"] tabpanel + tabbox[align="vertical"] tab {
tabbox[orient="horizontal"] tabpanels + tabs[orient="vertical"] tab {
border-top: 1px solid white;
border-bottom: 1px solid #666666;
border-left: none;
@ -208,18 +208,18 @@ tabcontrol[align="horizontal"] tabpanel + tabbox[align="vertical"] tab {
margin: 2px 1px 2px 1px;
}
tabcontrol {
tabbox {
border: none;
}
/* border on bottom only, no padding (used in search) */
tabpanel.light {
tabpanels.light {
border: none;
border-bottom: 1px outset #CCCCCC;
padding: 0px;
}
tabpanel {
tabpanels {
border-top: 0px;
border-bottom: 2px ridge #000000;
border-left: 2px groove #000000;

Просмотреть файл

@ -4,18 +4,18 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="tabbox" extends="chrome://global/content/tabBindings.xml#tabbox">
<binding id="tabs" extends="chrome://global/content/tabBindings.xml#tabs">
<content>
<xul:box class="tabcontainer">
<children/>
</xul:box>
<xul:spring class="tabbox-spring" flex="1"/>
<xul:spring class="tabs-spring" flex="1"/>
</content>
</binding>
<binding id="tabpanel" extends="chrome://global/content/tabBindings.xml#tabpanel">
<binding id="tabpanels" extends="chrome://global/content/tabBindings.xml#tabpanels">
<content>
<xul:box class="tabpanel-inner-box" flex="1">
<xul:box class="tabpanels-inner-box" flex="1">
<children/>
</xul:box>
</content>

Просмотреть файл

@ -1,20 +1,20 @@
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
/*============ tabpanel widget =============*/
/*============ tabpanels widget =============*/
tabpanel {
/*-moz-binding: url("chrome://global/skin/tabBindings.xml#tabpanel"); */
tabpanels {
/*-moz-binding: url("chrome://global/skin/tabBindings.xml#tabpanels"); */
padding: 5px;
}
/* top tabs */
tabcontrol[orient="vertical"] > tabbox + tabpanel {
tabbox[orient="vertical"] > tabs + tabpanels {
border-top: none !important;
border-bottom: 1px solid ThreeDShadow !important;
}
/* bottom tabs */
tabcontrol[orient="vertical"] > tabpanel {
tabbox[orient="vertical"] > tabpanels {
border-top: 1px solid ThreeDHighlight;
border-bottom: none;
border-left: 1px solid ThreeDHighlight;
@ -22,13 +22,13 @@ tabcontrol[orient="vertical"] > tabpanel {
}
/* left tabs */
tabcontrol[orient="horizontal"] > tabbox + tabpanel {
tabbox[orient="horizontal"] > tabs + tabpanels {
border-left: none !important;
border-right: 1px solid ThreeDShadow !important;
}
/* right tabs */
tabcontrol[orient="horizontal"] > tabpanel {
tabbox[orient="horizontal"] > tabpanels {
border-top: 1px solid ThreeDHighlight;
border-bottom: 1px solid ThreeDShadow;
border-right: none;
@ -36,43 +36,43 @@ tabcontrol[orient="horizontal"] > tabpanel {
}
/* border on bottom only, no padding (used in search) */
tabpanel.light {
tabpanels.light {
border: none;
border-bottom: 1px outset #CCCCCC;
padding: 0px;
}
.tabpanel-inner-box {
.tabpanels-inner-box {
border-right: 1px solid ThreeDShadow;
border-bottom: 1px solid ThreeDShadow;
}
/*============ tabbox widget ============*/
/*============ tabs widget ============*/
tabbox {
-moz-binding: url("chrome://global/skin/tabBindings.xml#tabbox");
tabs {
-moz-binding: url("chrome://global/skin/tabBindings.xml#tabs");
}
/* tabbox-spring ========================== */
/* tabs-spring ========================== */
/* top tabs */
tabcontrol[orient="vertical"] > tabbox > .tabbox-spring {
tabbox[orient="vertical"] > tabs > .tabs-spring {
border-bottom: 1px solid ThreeDHighlight;
}
/* bottom tabs */
tabcontrol[orient="vertical"] > tabpanel + tabbox > .tabbox-spring {
tabbox[orient="vertical"] > tabpanels + tabs > .tabs-spring {
border-top: 1px solid ThreeDShadow !important;
border-bottom: none;
}
/* left tabs */
tabcontrol[orient="horizontal"] > tabbox > .tabbox-spring {
tabbox[orient="horizontal"] > tabs > .tabs-spring {
border-right: 1px solid ThreeDHighlight;
}
/* right tabs */
tabcontrol[orient="horizontal"] > tabpanel + tabbox > .tabbox-spring {
tabbox[orient="horizontal"] > tabpanels + tabs > .tabs-spring {
border-left: 1px solid ThreeDShadow !important;
border-right: none;
}
@ -104,17 +104,17 @@ tab:focus > .tab-box > .tab-text {
}
/* top tabs */
tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] tab[first-tab="true"] {
tabbox[orient="vertical"] > tabs[orient="horizontal"] tab[first-tab="true"] {
margin-left: 2px;
}
tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] tab {
tabbox[orient="vertical"] > tabs[orient="horizontal"] tab {
margin-top: 2px;
border-right: 1px solid ThreeDDarkShadow;
-moz-border-radius: 4px 4px 0px 0px;
}
tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] tab > .tab-box {
tabbox[orient="vertical"] > tabs[orient="horizontal"] tab > .tab-box {
border-left: 1px solid ThreeDHighlight;
border-top: 1px solid ThreeDHighlight;
border-right: 1px solid ThreeDShadow;
@ -123,7 +123,7 @@ tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] tab > .tab-box {
}
/* bottom tabs */
tabcontrol[orient="vertical"] > tabpanel + tabbox[orient="horizontal"] > tab {
tabbox[orient="vertical"] > tabpanels + tabs[orient="horizontal"] > tab {
margin-top: 0px;
margin-bottom: 2px;
border-right: 1px solid ThreeDDarkShadow;
@ -131,7 +131,7 @@ tabcontrol[orient="vertical"] > tabpanel + tabbox[orient="horizontal"] > tab {
-moz-border-radius: 0px 0px 4px 4px;
}
tabcontrol[orient="vertical"] > tabpanel + tabbox[orient="horizontal"] > tab > .tab-box {
tabbox[orient="vertical"] > tabpanels + tabs[orient="horizontal"] > tab > .tab-box {
border-top: 1px solid ThreeDShadow;
border-right: 1px solid ThreeDShadow;
border-bottom: 1px solid ThreeDShadow;
@ -139,17 +139,17 @@ tabcontrol[orient="vertical"] > tabpanel + tabbox[orient="horizontal"] > tab > .
}
/* left tabs */
tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] tab[first-tab="true"] {
tabbox[orient="horizontal"] > tabs[orient="vertical"] tab[first-tab="true"] {
margin-top: 2px;
}
tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] tab {
tabbox[orient="horizontal"] > tabs[orient="vertical"] tab {
margin-left: 2px;
border-bottom: 1px solid ThreeDDarkShadow;
-moz-border-radius: 4px 0px 0px 4px;
}
tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] tab > .tab-box {
tabbox[orient="horizontal"] > tabs[orient="vertical"] tab > .tab-box {
border-left: 1px solid ThreeDHighlight;
border-top: 1px solid ThreeDHighlight;
border-right: 1px solid ThreeDHighlight;
@ -158,7 +158,7 @@ tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] tab > .tab-box {
}
/* right tabs */
tabcontrol[orient="horizontal"] > tabpanel + tabbox[orient="vertical"] > tab {
tabbox[orient="horizontal"] > tabpanels + tabs[orient="vertical"] > tab {
margin-right: 2px;
margin-left: 0px;
border-bottom: 1px solid ThreeDDarkShadow;
@ -166,7 +166,7 @@ tabcontrol[orient="horizontal"] > tabpanel + tabbox[orient="vertical"] > tab {
-moz-border-radius: 0px 4px 4px 0px !important;
}
tabcontrol[orient="horizontal"] > tabpanel + tabbox[orient="vertical"] > tab > .tab-box {
tabbox[orient="horizontal"] > tabpanels + tabs[orient="vertical"] > tab > .tab-box {
border-left: 1px solid ThreeDShadow !important;
border-right: 1px solid ThreeDShadow;
border-bottom: 1px solid ThreeDShadow !important;
@ -183,58 +183,58 @@ tabcontrol[orient="horizontal"] > tabpanel + tabbox[orient="vertical"] > tab > .
*/
/* top tabs */
tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] > tab[selected="true"] {
tabbox[orient="vertical"] > tabs[orient="horizontal"] > tab[selected="true"] {
margin-left: 0px;
margin-top: 0px;
}
tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] > tab[selected="true"] > .tab-box {
tabbox[orient="vertical"] > tabs[orient="horizontal"] > tab[selected="true"] > .tab-box {
border-bottom: 1px solid ThreeDFace;
padding-left: 5px !important;
padding-right: 4px !important;
}
tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] > tab[selected="true"][first-tab="true"] > .tab-box {
tabbox[orient="vertical"] > tabs[orient="horizontal"] > tab[selected="true"][first-tab="true"] > .tab-box {
border-bottom: 1px solid ThreeDFace;
padding-left: 5px !important;
padding-right: 4px !important;
}
/* bottom tabs */
tabcontrol[orient="vertical"] > tabpanel + tabbox[orient="horizontal"] > tab[selected="true"] {
tabbox[orient="vertical"] > tabpanels + tabs[orient="horizontal"] > tab[selected="true"] {
margin-bottom: 0px;
border-bottom: 1px solid ThreeDDarkShadow !important;
}
tabcontrol[orient="vertical"] > tabpanel + tabbox[orient="horizontal"] > tab[selected="true"] > .tab-box {
tabbox[orient="vertical"] > tabpanels + tabs[orient="horizontal"] > tab[selected="true"] > .tab-box {
border-top: 1px solid ThreeDFace;
border-bottom: 1px solid ThreeDShadow !important;
}
/* left tabs */
tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] > tab[selected="true"] {
tabbox[orient="horizontal"] > tabs[orient="vertical"] > tab[selected="true"] {
margin-left: 0px;
margin-top: 0px;
}
tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] > tab[selected="true"] > .tab-box {
tabbox[orient="horizontal"] > tabs[orient="vertical"] > tab[selected="true"] > .tab-box {
border-right: 1px solid ThreeDFace;
padding-top: 3px !important;
padding-bottom: 2px !important;
}
tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] > tab[selected="true"][first-tab="true"] > .tab-box {
tabbox[orient="horizontal"] > tabs[orient="vertical"] > tab[selected="true"][first-tab="true"] > .tab-box {
border-right: 1px solid ThreeDFace;
padding-top: 3px !important;
padding-bottom: 2px !important;
}
/* right tabs */
tabcontrol[orient="horizontal"] > tabpanel + tabbox[orient="vertical"] > tab[selected="true"] {
tabbox[orient="horizontal"] > tabpanels + tabs[orient="vertical"] > tab[selected="true"] {
margin-right: 0px;
}
tabcontrol[orient="horizontal"] > tabpanel + tabbox[orient="vertical"] > tab[selected="true"] > .tab-box {
tabbox[orient="horizontal"] > tabpanels + tabs[orient="vertical"] > tab[selected="true"] > .tab-box {
border-left: 1px solid ThreeDFace !important;
border-right: 1px solid ThreeDShadow !important;
}
@ -242,40 +242,40 @@ tabcontrol[orient="horizontal"] > tabpanel + tabbox[orient="vertical"] > tab[sel
/* before selected tabs ====================== */
/* top & bottom tabs */
tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] > tab[beforeselected="true"] {
tabbox[orient="vertical"] > tabs[orient="horizontal"] > tab[beforeselected="true"] {
border-right: none !important;
}
tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] > tab[beforeselected="true"] > .tab-box {
tabbox[orient="vertical"] > tabs[orient="horizontal"] > tab[beforeselected="true"] > .tab-box {
border-right: none !important;
}
/* left & right tabs */
tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] > tab[beforeselected="true"] {
tabbox[orient="horizontal"] > tabs[orient="vertical"] > tab[beforeselected="true"] {
border-bottom: none !important;
}
tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] > tab[beforeselected="true"] > .tab-box {
tabbox[orient="horizontal"] > tabs[orient="vertical"] > tab[beforeselected="true"] > .tab-box {
border-bottom: none !important;
}
/* after selected tabs ====================== */
/* top & bottom tabs */
tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] > tab[afterselected="true"] {
tabbox[orient="vertical"] > tabs[orient="horizontal"] > tab[afterselected="true"] {
border-left: none !important;
}
tabcontrol[orient="vertical"] > tabbox[orient="horizontal"] > tab[afterselected="true"] > .tab-box {
tabbox[orient="vertical"] > tabs[orient="horizontal"] > tab[afterselected="true"] > .tab-box {
border-left: none !important;
}
/* left & right tabs */
tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] > tab[afterselected="true"] {
tabbox[orient="horizontal"] > tabs[orient="vertical"] > tab[afterselected="true"] {
border-top: none !important;
}
tabcontrol[orient="horizontal"] > tabbox[orient="vertical"] > tab[afterselected="true"] > .tab-box {
tabbox[orient="horizontal"] > tabs[orient="vertical"] > tab[afterselected="true"] > .tab-box {
border-top: none !important;
}

Просмотреть файл

@ -89,28 +89,28 @@
color: #9DB8C1;
}
/* ::::: standard toolbar buttons on a tabpanel ::::: */
/* ::::: standard toolbar buttons on a tabpanels ::::: */
.button-toolbar.tabpanel,
.button-toolbar.tabpanel:hover,
.button-toolbar.tabpanel:hover:active {
.button-toolbar.tabpanels,
.button-toolbar.tabpanels:hover,
.button-toolbar.tabpanels:hover:active {
padding: 2px;
background-color: transparent;
color: #000000;
}
.button-toolbar.tabpanel,
.button-toolbar.tabpanel[disabled="true"],
.button-toolbar.tabpanel[disabled="true"]:hover,
.button-toolbar.tabpanel[disabled="true"]:hover:active {
.button-toolbar.tabpanels,
.button-toolbar.tabpanels[disabled="true"],
.button-toolbar.tabpanels[disabled="true"]:hover,
.button-toolbar.tabpanels[disabled="true"]:hover:active {
border: 1px solid transparent;
}
.button-toolbar.tabpanel:hover {
.button-toolbar.tabpanels:hover {
border: 1px outset #C2D0D0;
}
.button-toolbar.tabpanel:hover:active {
.button-toolbar.tabpanels:hover:active {
border-style: inset;
}

Просмотреть файл

@ -73,7 +73,7 @@ label {
background-color: #B4C3D4;
}
tabpanel title {
tabpanels title {
background-color: #C2D0D0;
}

Просмотреть файл

@ -174,13 +174,13 @@
</content>
</binding>
<binding id="tabbox" extends="chrome://global/content/tabBindings.xml#tabbox">
<binding id="tabs" extends="chrome://global/content/tabBindings.xml#tabs">
<content>
<xul:spring class="tabbox-top-left-cap"/>
<xul:spring class="tabbox-top-left"/>
<xul:spring class="tabs-top-left-cap"/>
<xul:spring class="tabs-top-left"/>
<children/>
<xul:spring class="tabbox-top-right" flex="1"/>
<xul:spring class="tabbox-top-right-cap"/>
<xul:spring class="tabs-top-right" flex="1"/>
<xul:spring class="tabs-top-right-cap"/>
</content>
</binding>

Просмотреть файл

@ -27,33 +27,33 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: tabbox ::::: */
/* ::::: tabs ::::: */
tabbox {
-moz-binding: url("chrome://global/skin/globalBindings.xml#tabbox");
tabs {
-moz-binding: url("chrome://global/skin/globalBindings.xml#tabs");
}
.tab-border-top-left,
.tabbox-top-right {
.tabs-top-right {
height: 2px;
background: url("chrome://global/skin/tabcontrol/tabbox-mid.gif") repeat-x bottom;
}
.tabbox-top-left-cap {
.tabs-top-left-cap {
width: 2px;
height: 2px;
background: url("chrome://global/skin/tabcontrol/tabbox-lft.gif") no-repeat bottom;
}
.tabbox-top-right-cap {
.tabs-top-right-cap {
width: 2px;
height: 2px;
background: url("chrome://global/skin/tabcontrol/tabbox-rit.gif") no-repeat bottom;
}
/* ::::: tabpanel ::::: */
/* ::::: tabpanels ::::: */
tabpanel {
tabpanels {
border-top: none;
border-right: 1px solid #313948;
border-bottom: 1px solid #313948;
@ -198,7 +198,7 @@ tab:hover:active[selected="true"] > box > box > .tab-image-right-btm {
/* ::::: tab-bottom ::::::::::
:: Tabs that are attached to the bottom of a panel, but not necessarily
:: a tabpanel.
:: a tabpanels.
::::: */
.tab-bottom {
@ -293,39 +293,39 @@ tab:hover:active[selected="true"] > box > box > .tab-image-right-btm {
background-image: url("chrome://global/skin/tabcontrol/tab-bot-sel-rit.gif");
}
/* ::::: tabbox-bottom ::::: */
/* ::::: tabs-bottom ::::: */
.tabbox-bottom > .tabbox-top-left,
.tabbox-bottom > .tabbox-top-right {
.tabs-bottom > .tabs-top-left,
.tabs-bottom > .tabs-top-right {
background: url("chrome://global/skin/tabcontrol/tabbox-bot-mid.gif") repeat-x top;
width: 2px;
}
.tabbox-bottom > .tabbox-top-left-cap {
.tabs-bottom > .tabs-top-left-cap {
background: url("chrome://global/skin/tabcontrol/tabbox-bot-lft.gif") no-repeat top;
width: 2px;
}
.tabbox-bottom > .tabbox-top-right-cap {
.tabs-bottom > .tabs-top-right-cap {
background: url("chrome://global/skin/tabcontrol/tabbox-bot-rit.gif") no-repeat top;
width: 2px;
}
/* ::::: special looks for widgets in tabpanels ::::: */
tree.tabpanel,
textbox.tabpanel {
tree.tabpanels,
textbox.tabpanels {
border-top: 1px solid #ACB9B9;
border-right: 1px solid #ECF0F0;
border-bottom: 1px solid #ECF0F0;
border-left: 1px solid #ACB9B9;
}
tree.tabpanel > .tree-container-treerows,
textbox.tabpanel > .textbox-internal-box {
tree.tabpanels > .tree-container-treerows,
textbox.tabpanels > .textbox-internal-box {
border: 1px solid #6E7676;
}
textbox.tabpanel[focused="true"] {
textbox.tabpanels[focused="true"] {
border: 1px solid #909090;
}

Просмотреть файл

@ -68,11 +68,11 @@ function onLoadPageInfo()
if (tabName)
{
var tabControl = document.getElementById("tabcontrol");
var tabbox = document.getElementById("tabbox");
var tab = document.getElementById(tabName);
if (tabControl && tab) {
tabControl.selectedTab = tab;
if (tabbox && tab) {
tabbox.selectedTab = tab;
}
}
}

Просмотреть файл

@ -49,14 +49,14 @@
<box id="cont" orient="vertical" flex="1">
<text class="header label" value="&pageInfo.description;"/>
<tabcontrol id="tabcontrol" flex="1">
<tabbox id="tabbox">
<tabbox id="tabbox" flex="1">
<tabs id="tabs">
<tab id="generalTab" label="&pageInfo.generalTab;"/>
<tab id="formsTab" label="&pageInfo.formsTab;" hidden="true" />
<tab id="imagesTab" label="&pageInfo.imagesTab;" hidden="true" />
<!-- Others added by overlay -->
</tabbox>
<tabpanel id="tabpanel" flex="1">
</tabs>
<tabpanels id="tabpanels" flex="1">
<!-- General page information -->
<box orient="vertical">
@ -139,7 +139,7 @@
</box>
<!-- Others added by overlay -->
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
</box>
</window>

Просмотреть файл

@ -7,8 +7,8 @@ xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<box align="vertical" flex="1">
<tabcontrol align="vertical" flex="100%" >
<tabbox align="horizontal">
<tabbox orient="vertical" flex="100%" >
<tabs orient="horizontal">
<tab selected="true" label="centered"/>
<tab label="percent"/>
<tab label="html"/>
@ -17,9 +17,9 @@ xmlns:html="http://www.w3.org/1999/xhtml"
<tab label="iframe"/>
<tab label="dialog"/>
<spring flex="1"/>
</tabbox>
</tabs>
<tabpanel flex="100%" style="border: 2px outset gray">
<tabpanels flex="100%" style="border: 2px outset gray">
<!-- tab 1 -->
<box align="horizontal">
@ -143,8 +143,8 @@ xmlns:html="http://www.w3.org/1999/xhtml"
</box>
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
</box>
</window>

Просмотреть файл

@ -48,13 +48,13 @@
<keyset id="keyset"/>
<tabcontrol orient="vertical">
<tabbox>
<tabbox orient="vertical">
<tabs>
<tab label="&generalInfo.label;" accesskey="&generalInfo.accesskey;"/>
<tab id="ScheduleTab" label="&schedule.label;" accesskey="&schedule.accesskey;"/>
<tab id="NotifyTab" label="&notification.label;" accesskey="&notification.accesskey;"/>
</tabbox>
<tabpanel>
</tabs>
<tabpanels>
<vbox>
<separator class="thin"/>
<hbox autostretch="never" valign="top">
@ -233,8 +233,8 @@
<spring flex="1"/>
</hbox>
</vbox>
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
<separator/>

Просмотреть файл

@ -30,16 +30,16 @@
<script type="application/x-javascript" src="chrome://communicator/content/search/search.js" />
<tabcontrol align="vertical">
<tabbox>
<tabbox orient="vertical">
<tabs>
<tab id="findTab" oncommand="loadPage('find', null);" label="&find.title.label;"/>
<tab id="internetTab" oncommand="loadPage('internet', null);" label="&internet.title.label;"/>
<tab id="mailnewsTab" oncommand="loadPage('mail', null);" label="&mailnews.title.label;"/>
<tab id="addressbookTab" oncommand="loadPage('addressbook', null);" label="&addressbook.title.label;"/>
</tabbox>
</tabs>
<tabpanel />
</tabcontrol>
<tabpanels/>
</tabbox>
<html:iframe src="about:blank" height="150" width="100%" style="height: 150; width: 100%;" id="content" />
<html:iframe src="about:blank" height="100%" width="100%" style="height: 100%; width: 100%;" flex="100%" id="results" />

Просмотреть файл

@ -33,17 +33,17 @@ Contributor(s): Michael Lowe <michael.lowe@bigfoot.com> -->
<box align="vertical" flex="100%" style="margin: 0.5em;">
<tabcontrol flex="100%" align="vertical">
<tabbox>
<tabbox orient="vertical" flex="100%">
<tabs>
<tab label="&aboutTab.label;"/>
<tab label="&contributorsTab.label;"/>
</tabbox>
</tabs>
<tabpanel align="vertical" flex="100%">
<tabpanels orient="vertical" flex="100%">
<iframe style="border: 1px inset gray;" src="about:"/>
<iframe style="border: 1px inset gray;" src="credits.html"/>
</tabpanel>
</tabcontrol>
</tabpanels>
</tabbox>
<box align="horizontal" style="margin-top: 1em;">
<spring flex="100%"/>

Просмотреть файл

@ -1,216 +0,0 @@
<?xml version="1.0"?>
<bindings id="tabBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="tabcontrol" extends="xul:box">
<content orient="vertical"/>
<!-- pass-through implementation -->
<implementation>
<property name="selectedTab">
<setter>
<![CDATA[
if (!val)
throw Components.results.NS_ERROR_NULL_POINTER;
var tabbox = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tabbox");
tabbox = tabbox.length ? tabbox[0] : null;
if (tabbox)
tabbox.selectedTab = val;
return val;
]]>
</setter>
<getter>
<![CDATA[
var tabbox = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tabbox");
tabbox = tabbox.length ? tabbox[0] : null;
return tabbox ? tabbox.selectedTab : null;
]]>
</getter>
</property>
</implementation>
<handlers>
<handler event="keypress" keycode="vk_tab" modifiers="control">
<![CDATA[
var tabbox = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tabbox");
tabbox = tabbox.length ? tabbox[0] : null;
if (tabbox)
tabbox.advanceSelectedTab(1);
]]>
</handler>
<handler event="keypress" keycode="vk_tab" modifiers="control,shift">
<![CDATA[
var tabbox = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tabbox");
tabbox = tabbox.length ? tabbox[0] : null;
if (tabbox)
tabbox.advanceSelectedTab(-1);
]]>
</handler>
</handlers>
</binding>
<binding id="tabbox" extends="xul:box">
<implementation>
<property name="selectedTab">
<getter>
<![CDATA[
for (var i = 0; i < this.childNodes.length; i++) {
if (this.childNodes[i].selected)
return this.childNodes[i];
}
// throw an exception when no tab is selected (we shouldn't get here)
throw Components.results.NS_ERROR_FAILURE;
]]>
</getter>
<setter>
<![CDATA[
if (!val)
throw Components.results.NS_ERROR_NULL_POINTER;
if (!val.selected)
val.selected = true;
var selectedIndex = 0;
for (var i = 0; i < this.childNodes.length; i++) {
if (this.childNodes[i].selected) {
if (this.childNodes[i] != val)
this.childNodes[i].selected = false;
else
selectedIndex = i;
}
}
var tabpanel = this.parentNode.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tabpanel");
tabpanel = tabpanel.length ? tabpanel[0] : null;
if (tabpanel)
tabpanel.index = selectedIndex;
return val;
]]>
</setter>
</property>
<method name="advanceSelectedTab">
<parameter name="aDir"/>
<body>
<![CDATA[
var next = this.selectedTab[aDir == -1 ? "previousSibling" : "nextSibling"];
if (next && !next.getAttribute("hidden")) {
this.selectedTab = next;
next.focus();
}
]]>
</body>
</method>
<constructor>
<![CDATA[
// first and last tabs need to be able to have unique styles
// and also need to select first tab on startup.
var tabs = this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tab");
if (tabs.length) {
if (tabs.length > 1) {
tabs[0].setAttribute("first-tab", "true");
tabs[tabs.length - 1].setAttribute("last-tab", "true");
}
else if (tabs.length == 1)
tabs[0].setAttribute("first-tab", "true");
}
this.selectedTab = tabs[0];
var o = this.getAttribute("orient");
if (!o)
this.setAttribute("orient", "horizontal");
]]>
</constructor>
</implementation>
</binding>
<binding id="tabpanel" extends="xul:deck">
<implementation>
<!-- should be defined on deck! -->
<property name="index"
onget="return this.getAttribute('index');"
onset="this.setAttribute('index',val); return val;"/>
</implementation>
</binding>
<binding id="tab" extends="xul:button">
<content>
<xul:box class="tab-box" flex="1" autostretch="never" orient="horizontal">
<xul:image class="tab-image" inherits="src"/>
<xul:text class="tab-text" inherits="value=label,accesskey,crop,disabled"/>
</xul:box>
</content>
<implementation>
<property name="label">
<getter>
return this.getAttribute("label");
</getter>
<setter>
this.setAttribute("label", val);
return val;
</setter>
</property>
<property name="tabbox"
onget="return this.getAttribute('tabbox');"
onset="this.setAttribute('tabbox', val); return val;"/>
<!-- XXX -->
<property name="selected">
<getter>
return this.getAttribute("selected") == "true" ? true : false;
</getter>
<setter>
this.setAttribute("selected",val);
if (this.previousSibling)
this.previousSibling.setAttribute("beforeselected",val);
if (this.nextSibling)
this.nextSibling.setAttribute("afterselected",val);
return val;
</setter>
</property>
</implementation>
<handlers>
<handler event="click" button="0">
<![CDATA[
var tabbox = this.parentNode;
do {
if (tabbox.localName == "tabbox")
break;
tabbox = tabbox.parentNode;
} while(tabbox.localName != "tabcontrol");
tabbox.selectedTab = this;
if (!this.selected) this.selected = true;
]]>
</handler>
<handler event="keypress" keycode="vk_left">
<![CDATA[
this.parentNode.advanceSelectedTab(-1);
]]>
</handler>
<handler event="keypress" keycode="vk_right">
<![CDATA[
this.parentNode.advanceSelectedTab(1);
]]>
</handler>
<handler event="keypress" keycode="vk_up">
<![CDATA[
this.parentNode.advanceSelectedTab(-1);
]]>
</handler>
<handler event="keypress" keycode="vk_down">
<![CDATA[
this.parentNode.advanceSelectedTab(1);
]]>
</handler>
</handlers>
</binding>
</bindings>

Просмотреть файл

@ -449,19 +449,19 @@ tab {
-moz-binding: url(chrome://global/content/tabBindings.xml#tab);
}
tabpanel {
tabpanels {
display: -moz-xul-deck;
-moz-binding: url(chrome://global/content/tabBindings.xml#tabpanel);
}
tabcontrol {
-moz-binding: url(chrome://global/content/tabBindings.xml#tabcontrol);
-moz-binding: url(chrome://global/content/tabBindings.xml#tabpanels);
}
tabbox {
-moz-binding: url(chrome://global/content/tabBindings.xml#tabbox);
}
tabs {
-moz-binding: url(chrome://global/content/tabBindings.xml#tabs);
}
:-moz-xul-deck-hidden {
visibility: hidden;
}