More chrome tweaks. Add igroup and irow xbl widgets that group content

with descriptive information that can be toggled on and off. Add
descriptions to configuration page.


git-svn-id: svn://10.0.0.236/branches/ZAP_20050610_BRANCH@186526 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alex%croczilla.com
2005-12-23 13:36:29 +00:00
parent bb7133a0ff
commit b4133188ef
8 changed files with 312 additions and 44 deletions

View File

@@ -43,8 +43,9 @@
]>
<page id="zap_new_account"
<page id="zap_config"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
onload="initPage()">
<!-- Scripts -->
@@ -116,57 +117,132 @@
<label class="titlebox" value="Configuration"/>
<cgroup title="UI Preferences">
<grid>
<columns><column/><column flex="1"/><column/></columns>
<rows>
<irow>
<label control="urn:mozilla:zap:max_recent_calls"
value="Recent calls history size:"/>
<textbox id="urn:mozilla:zap:max_recent_calls"/>
<irow-info>
<description>
Maximum number of inactive calls to keep in the recent
calls history. Older calls can still be accessed through the
logs.
</description>
</irow-info>
</irow>
</rows>
</grid>
</cgroup>
<cgroup title="Notifications">
<grid>
<columns><column/><column flex="1"/></columns>
<rows>
<row>
<label control="urn:mozilla:zap:max_recent_calls"
value="Length of recent calls history:"/>
<textbox id="urn:mozilla:zap:max_recent_calls"/>
</row>
<irow>
<label control="urn:mozilla:zap:ringtone" value="Ringtone:"/>
<textbox id="urn:mozilla:zap:ringtone"/>
<irow-info>
<description>
Ringtone for incoming calls in <html:a href="http://en.wikipedia.org/wiki/RTTTL">RTTTL format</html:a>. In future other formats will be supported
as well (midi, ogg/vorbis, ...).
</description>
</irow-info>
</irow>
</rows>
</grid>
</cgroup>
<cgroup title="SIP Settings">
<grid>
<columns><column/><column flex="1"/></columns>
<columns><column/><column flex="1"/><column/></columns>
<rows>
<row>
<irow>
<label control="urn:mozilla:zap:instance_id"
value="UA Instance ID:"/>
<textbox id="urn:mozilla:zap:instance_id"/>
</row>
<row>
<irow-info>
<description>
A unique identifier assigned to this instance of zap when it was
first started. It is used by GRUU-enabled services to route
messages to this zap instance.
See <html:a href="http://www.croczilla.com/zap/rfcs/draft-ietf-sip-gruu-05.txt">draft-ietf-sip-gruu-05.txt</html:a>.
</description>
</irow-info>
</irow>
<irow>
<label control="urn:mozilla:zap:sip_port_base"
value="SIP port base:"/>
<textbox id="urn:mozilla:zap:sip_port_base"/>
</row>
<row>
<irow-info>
<description>
zap will use the first available socket greater than or
equal to this value to listen for SIP traffic.
</description>
</irow-info>
</irow>
<irow>
<label control="urn:mozilla:zap:registration_recovery_max_time"
value="Max time for re-attempting registration (s):"/>
value="Registration failure Tmax:"/>
<textbox id="urn:mozilla:zap:registration_recovery_max_time"/>
</row>
<row>
<irow-info>
<description>
Maximum time (in seconds) to wait before re-attempting a failed registration.
See <html:a href="http://www.croczilla.com/zap/rfcs/draft-ietf-sip-outbound-01.txt">draft-ietf-sip-outbound-01.txt</html:a> section 4.3 for the
re-registration logic used in zap.
</description>
</irow-info>
</irow>
<irow>
<label control="urn:mozilla:zap:registration_recovery_base_time_not_failed"
value="Base time for re-connecting registrations flows (s):"/>
value="Flow failure Tbase:"/>
<textbox id="urn:mozilla:zap:registration_recovery_base_time_not_failed"/>
</row>
<row>
<irow-info>
<description>
Base time (in seconds) to wait before attempting to reconnect a failed
flow when other flows for the same registration are still alive.
See <html:a href="http://www.croczilla.com/zap/rfcs/draft-ietf-sip-outbound-01.txt">draft-ietf-sip-outbound-01.txt</html:a> section 4.3 for the
re-registration logic used in zap.
</description>
</irow-info>
</irow>
<irow>
<label control="urn:mozilla:zap:registration_recovery_base_time_all_fail"
value="Base time for re-attempting registrations (s):"/>
value="Registration failure Tbase:"/>
<textbox id="urn:mozilla:zap:registration_recovery_base_time_all_fail"/>
</row>
<row>
<irow-info>
<description>
Base time (in seconds) to wait before attempting to a failed registration.
See <html:a href="http://www.croczilla.com/zap/rfcs/draft-ietf-sip-outbound-01.txt">draft-ietf-sip-outbound-01.txt</html:a> section 4.3 for the
re-registration logic used in zap.
</description>
</irow-info>
</irow>
<irow>
<label control="urn:mozilla:zap:dnd_code"
value="Do Not Disturb INVITE response code:"/>
value="DND response code:"/>
<textbox id="urn:mozilla:zap:dnd_code"/>
</row>
<row>
<irow-info>
<description>
Response code to send for INVITE requests when zap is in
"Do Not Disturb" mode (i.e. when the DND button in the toolbar
is depressed). Default: 480 (Temporarily Unavailable).
</description>
</irow-info>
</irow>
<irow>
<label control="urn:mozilla:zap:dnd_headers"
value="Additional headers for DND response:"/>
value="Additional DND headers:"/>
<textbox id="urn:mozilla:zap:dnd_headers" multiline="true" rows="2"/>
</row>
<irow-info>
<description>
Additional headers to append to a "Do Not Disturb" response.
Each header must begin on a new line and be formatted as it
should appear in the serialized SIP message.
</description>
</irow-info>
</irow>
</rows>
</grid>
<button label="Configure SIP Services..." oncommand="configureServices()"/>

View File

@@ -1,3 +1,11 @@
cgroup {
-moz-binding: url("chrome://zap/content/zap-widgets.xml#cgroup");
}
igroup {
-moz-binding: url("chrome://zap/content/zap-widgets.xml#igroup");
}
irow {
-moz-binding: url("chrome://zap/content/zap-widgets.xml#irow");
}

View File

@@ -70,4 +70,64 @@
</handlers>
</binding>
<!-- 'info' group widget -->
<binding id="igroup">
<content>
<xul:box class="igroup-content">
<children/>
<xul:spacer flex="1"/>
<xul:button class="igroup-info-button"/>
</xul:box>
<xul:hbox class="igroup-info">
<children includes="info"/>
</xul:hbox>
</content>
<handlers>
<handler event="click" button="0">
<![CDATA[
// toggle 'showinfo' attribute if the info button was clicked:
if (event.originalTarget.className.indexOf("igroup-info-button") == -1)
return;
if (this.getAttribute("showinfo") == "true")
this.setAttribute("showinfo", "false");
else
this.setAttribute("showinfo", "true");
event.cancelBubble = true;
]]>
</handler>
</handlers>
</binding>
<!-- info row widget -->
<binding id="irow" >
<content>
<children/>
<xul:button class="irow-info-button"/>
<xul:irow-hidden>
<children includes="irow-info"/>
</xul:irow-hidden>
</content>
<handlers>
<handler event="click" button="0">
<![CDATA[
// toggle 'showinfo' attribute if the info button was clicked:
if (event.originalTarget.className.indexOf("irow-info-button") == -1)
return;
if (this.getAttribute("showinfo") == "true") {
this.setAttribute("showinfo", "false");
this.parentNode.removeChild(this.infoNode);
}
else {
this.setAttribute("showinfo", "true");
// insert the info content as a column-spanning row:
if (!this.infoNode)
this.infoNode = this.getElementsByTagName("irow-info").item(0);
this.parentNode.insertBefore(this.infoNode, this.nextSibling);
}
event.cancelBubble = true;
]]>
</handler>
</handlers>
</binding>
</bindings>

View File

@@ -40,6 +40,7 @@
<!DOCTYPE window SYSTEM "chrome://zap/locale/zap.dtd">
<window id="zap"
class="zap_main_window"
width="640" height="480" screenX="20" screenY="20"
persist="width height screenX screenY sizemode"
title = "&zap.title;"

View File

@@ -28,7 +28,7 @@ en-US.jar:
classic.jar:
skin/classic/zap/splash.jpg (skin/classic/splash.jpg)
skin/classic/zap/go.png (skin/classic/go.png)
skin/classic/zap/zap.css (skin/classic/zap.css)
* skin/classic/zap/zap.css (skin/classic/zap.css)
skin/classic/zap/new-account.png (skin/classic/new-account.png)
skin/classic/zap/accounts.png (skin/classic/accounts.png)
skin/classic/zap/account.png (skin/classic/account.png)
@@ -49,3 +49,5 @@ classic.jar:
skin/classic/zap/home.png (skin/classic/home.png)
skin/classic/zap/inbound.png (skin/classic/inbound.png)
skin/classic/zap/outbound.png (skin/classic/outbound.png)
skin/classic/zap/info.png (skin/classic/info.png)
skin/classic/zap/info-2.png (skin/classic/info-2.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

View File

@@ -41,13 +41,17 @@
@namespace html url("http://www.w3.org/1999/xhtml");
/* ---------------------------------------------------------------------- */
/* main toolbox & statusbar */
/* main window & toolbox & statusbar */
.zap_main_window {
font-size: 11px !important;
}
#menubar, #menubar > menu, statusbarpanel {
-moz-appearance: none !important;
background-color: #b9b9b9;
color: #000000;
font-size: 11px;
font-size: inherit;
border: none;
}
@@ -76,13 +80,16 @@ statusbar {
-moz-border-radius: 1px;
min-width: 0px;
margin: 0px;
%ifdef XP_WIN
padding: 1px;
%else
padding: 2px;
%endif
border-width: 2px;
-moz-border-left-colors: #7a7a7a #e3e3e3;
-moz-border-right-colors: #7a7a7a #e3e3e3;
-moz-border-top-colors: #7a7a7a #f3f3f3;
-moz-border-bottom-colors: #7a7a7a #c3c3c3;
font-size: 11px;
}
.zap_tb_button > hbox {
@@ -90,8 +97,11 @@ statusbar {
-moz-appearance: none !important;
-moz-padding-start: 0px !important;
-moz-padding-end: 0px !important;
padding: 0px 0px 1px 1px!important;
%ifdef XP_WIN
padding: 0px 0px 1px 1px !important;
%else
padding: 0px !important;
%endif
}
.zap_tb_button:hover:active, .zap_tb_button[checked="true"] {
@@ -108,8 +118,7 @@ statusbar {
color: blue;
}
.zap_tb_label {
font-size: 11px;
.zap_tb_label {
}
/* ---------------------------------------------------------------------- */
@@ -139,7 +148,6 @@ statusbar {
padding: 0px;
margin: 0px;
background-color: #f3f3f3;
font-size: 11px;
}
/* ---------------------------------------------------------------------- */
@@ -157,7 +165,6 @@ statusbar {
-moz-border-right-colors: #7a7a7a #e3e3e3;
-moz-border-top-colors: #7a7a7a #f3f3f3;
-moz-border-bottom-colors: #7a7a7a #c3c3c3;
font-size: 11px;
}
#identities_list > dropmarker {
@@ -167,7 +174,7 @@ statusbar {
}
#identities_list > menupopup > * {
font-size: 11px;
font-size: inherit;
}
/* ---------------------------------------------------------------------- */
@@ -194,7 +201,6 @@ statusbar {
border: none;
margin: 0px;
-moz-appearance: none !important;
font-size: 11px;
}
#calls > treecols > treecol {
@@ -226,7 +232,6 @@ treechildren::-moz-tree-image(calls_direction, direction-outbound) {
margin: 0px;
border:none;
background-color: #f7f8ff;
font-size: 11px;
}
treechildren::-moz-tree-row(selected,focus) {
@@ -306,10 +311,10 @@ treechildren::-moz-tree-image(nodetype-contact) {
/* cgroup collapsable group widget */
.cgroup {
margin-top: 10px;
margin-bottom: 10px;
margin-left: 5px;
margin-right: 5px;
margin-top: 8px;
margin-bottom: 8px;
margin-left: 4px;
margin-right: 4px;
}
.cgroup-title {
@@ -321,6 +326,7 @@ treechildren::-moz-tree-image(nodetype-contact) {
max-height: 20px;
padding: 0px 2px 0px 8px;
font-weight: bold;
-moz-box-align: center;
}
.cgroup-title:hover {
@@ -367,14 +373,129 @@ treechildren::-moz-tree-image(nodetype-contact) {
visibility: collapse;
}
/* ---------------------------------------------------------------------- */
/* igroup collapsable 'info' widget */
igroup {
-moz-box-orient: vertical;
padding: 2px 0px 0px 2px;
}
igroup[showinfo=true] {
border: 1px solid yellow;
-moz-border-radius: 4px;
background-color: #fdffc2;
padding: 1px 0px 0px 1px;
}
igroup[showinfo=true] > .igroup-info {
visibility: visible;
}
.igroup-info-button {
list-style-image : url("chrome://zap/skin/info.png");
-moz-appearance : none !important;
border : none !important;
background-color : transparent !important;
padding : 0px !important;
margin : 0px !important;
margin-right : 1px !important;
-moz-user-focus : ignore !important;
max-width : 21px !important;
min-width : 21px !important;
}
.igroup-info-button:hover {
cursor: pointer;
}
igroup[showinfo=true] .igroup-info-button {
list-style-image : url("chrome://zap/skin/info-2.png");
}
.igroup-content {
}
.igroup-info {
visibility: hidden;
}
/* ---------------------------------------------------------------------- */
/* irow collapsable row 'info' widget */
irow {
display: -moz-grid-line;
-moz-box-orient: horizontal;
padding: 1px 1px 0px 1px;
}
irow[showinfo=true] {
border: 1px solid yellow;
border-bottom: none;
margin-bottom: 0px;
-moz-border-radius-topright: 4px;
-moz-border-radius-topleft: 4px;
padding: 0px;
background-color: #fdffc2;
}
irow-info {
margin: 0px;
margin-bottom: 4px;
border: 1px solid yellow;
border-top: none;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
background-color: #fdffc2;
}
.irow-info-button {
list-style-image : url("chrome://zap/skin/info.png");
-moz-appearance : none !important;
border : none !important;
background-color : transparent !important;
padding : 0px !important;
margin : 0px !important;
margin-right : 1px !important;
-moz-user-focus : ignore !important;
max-width : 21px !important;
min-width : 21px !important;
}
.irow-info-button:hover {
cursor: pointer;
}
irow[showinfo=true] .irow-info-button {
list-style-image : url("chrome://zap/skin/info-2.png");
}
irow-hidden {
display: none;
}
/* ---------------------------------------------------------------------- */
/* various element styles */
description {
width: 50px;
-moz-box-flex: 1;
}
html|a {
-moz-user-focus: ignore;
color: blue;
text-decoration: underline;
}
/* ---------------------------------------------------------------------- */
/* module pages */
#module_page {
overflow: auto;
background-color: #FFFFFF;
background-color: #e3e3e3;
padding: 10px;
font-size: 11px !important;
}
/*