transport: pass correct channel
[abstract.git] / app / chrome / content / viewer.xml
blob3ad8b0326505cbe00cc9141fad0b7f9558748dcf
1 <?xml version="1.0"?>
2 <!DOCTYPE bindings SYSTEM "chrome://abstract/locale/viewer.dtd">
4 <bindings id="viewers"
5           xmlns="http://www.mozilla.org/xbl"
6           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
7           xmlns:xbl="http://www.mozilla.org/xbl">
9   <binding id="viewer">
10     <content>
11       <xul:vbox flex="1">
12         <xul:vbox>
13           <xul:filter annoid="page1.filter" sendcommand="cmd_do_filter" clearcommand="cmd_clear_filter"/>
14         </xul:vbox>
15         <children includes="tree"/>
16         <xul:vbox>
17           <xul:description>&viewer.section.actions;</xul:description>
18           <xul:toolbar annoid="page1.browse" observes="page1.browseBar">
19             <xul:spacer flex="1"/>
20             <xul:toolbarbutton annoid="page1.new" command="cmd_page1_new"
21               label="&viewer.newCmd.label;"/>
22             <xul:toolbarbutton annoid="page1.change" command="cmd_page1_change"
23               label="&viewer.changeCmd.label;" observes="page1.canChange"/>
24           </xul:toolbar>
25           <xul:toolbar annoid="page1.edit"  observes="page1.editBar">
26             <xul:spacer flex="1"/>
27             <xul:toolbarbutton annoid="page1.cancel" command="cmd_page1_cancel"
28               label="&viewer.cancelCmd.label;"/>
29             <xul:toolbarbutton annoid="page1.reset" command="cmd_page1_reset"
30               label="&viewer.resetCmd.label;"/>
31             <xul:toolbarbutton annoid="page1.save" command="cmd_page1_save"
32               label="&viewer.saveCmd.label;" observes="page1.canSave"/>
33           </xul:toolbar>
34           <xul:description>&viewer.section.details;</xul:description>
35           <children includes="hbox"/>
36         </xul:vbox>
37       </xul:vbox>
38     </content>
39     <implementation>
40       <!-- Fields -->
41       <field name="mFilter"></field>
42       <!-- Properties -->
43       <property name="filter" readonly="true">
44         <getter>
45           <![CDATA[
46             if (!this.mFilter)
47               this.mFilter = document.getAnonymousElementByAttribute(this, "annoid", "page1.filter");
48             return this.mFilter;
49           ]]>
50         </getter>
51       </property>
52       <!-- Methods -->
53       <method name="getFilterValue">
54         <body>
55           <![CDATA[
56             if (!this.filter) return "";
57             return this.filter.value;
58           ]]>
59         </body>
60       </method>
61       <method name="getFilterType">
62         <body>
63           <![CDATA[
64             if (!this.filter) return "";
65             return this.filter.getTypeValue();
66           ]]>
67         </body>
68       </method>
69       <method name="addSubFilter">
70         <parameter name="userText"/>
71         <parameter name="sfValue"/>
72         <body>
73           <![CDATA[
74             if (!this.filter.typesIsHidden) {
75               this.filter.addType(userText, sfValue);
76             }
77           ]]>
78         </body>
79       </method>
80       <!-- Constructors -->
81       <constructor>
82         <![CDATA[
83           if (this.filter) {
84             this.filter.typesIsHidden = 'true';
85           }
86         ]]>
87       </constructor>
88     </implementation>
89   </binding>
91   <binding id="header">
92     <content>
93       <xul:vbox flex="1">
94         <xul:hbox align="center">
95           <children/>
96           <xul:spacer flex="1"/>
97           <xul:toolbarbutton annoid="header.discard" label="&header.discardCmd.label;"
98                              command="cmd_page1_discard">
99             <xul:observes element="page1.header" attribute="collapsed"/>
100             <xul:observes element="page1.headerDiscard" attribute="disabled"/>
101           </xul:toolbarbutton>
102           <xul:toolbarbutton annoid="header.submit" label="&header.submitCmd.label;"
103                              command="cmd_page1_submit" observes="page1.header" />
104         </xul:hbox>
105       </xul:vbox>
106     </content>
107   </binding>
109 </bindings>
110 <!-- vim: set ts=2 sw=2 sts=2 et cindent tw=79 ft=xml: -->