The checkboxes were not settable in the previous implementation.
[dirtag.git] / template / dirtag.xul
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="/static/dirtag.css" type="text/css"?>
3
4 <!-- Firefox doesn't load external DTDs for web-served XML,
5     https://developer.mozilla.org/en/XML_in_Mozilla#DTDs_and_Other_External_Entities
6   so we use and internal DOCTYPE.  This does make localization a bit
7   more annoying. -->
8 <!DOCTYPE window [
9   <!ENTITY window.title "{{ repository_name }}">
10   <!ENTITY XUL_note.text.pre_XUL "DirTag uses ">
11   <!ENTITY XUL_note.text.XUL_to_Firefox ", an XML user interface markup language developed by the Mozilla project.  You probably need to view this page using ">
12   <!ENTITY XUL_note.text.post_Firefox ".">
13   <!ENTITY new_tag.caption "Add a new tag">
14   <!ENTITY new_tag_button.label "Add">
15   <!ENTITY new_tag_button.key "a">
16   <!ENTITY browser.caption "Browser">
17   <!ENTITY raw_browser.tab "Raw">
18   <!ENTITY tag_browser.tab "Tags">
19   <!ENTITY path_column.label "Path">
20   <!ENTITY tag_column.label "Tags">
21   <!ENTITY tags.caption "Tags">
22   <!ENTITY selected.caption "Selected">
23 ]>
24
25 <window id="window" title="&window.title;"
26    onload="initialize();"
27    xmlns:html="http://www.w3.org/1999/xhtml"
28    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
29    >
30
31   <script type="application/javascript" src="/static/dirtag.js"/>
32   <groupbox id="new-tag">
33     <caption label="&new_tag.caption;"/>
34     <hbox>
35       <textbox id="new-tag-text"/>
36       <button
37          id="new-tag-button"
38          class="dialog"
39          disabled="false"
40          label="&new_tag_button.label;"
41          accesskey="&new_tag_button.key;"
42          oncommand="new_tag_button();"/>
43     </hbox>
44   </groupbox>
45   <hbox flex="1">
46     <groupbox id="browser" flex="1">
47       <caption label="&browser.caption;"/>
48       <tabbox id="browser-tabbox" flex="1">
49         <tabs>
50           <tab label="&raw_browser.tab;"/>
51           <tab label="&tag_browser.tab;"/>
52         </tabs>
53         <tabpanels flex="1">
54           <tabpanel flex="1">
55             <tree id="raw-tree" rows="2" seltype="single" flex="1"
56                   datasources="raw.rdf" ref="http://dirtag.com/raw/files"
57                   flags="dont-build-content" onselect="raw_tree_select();">
58               <treecols>
59                 <treecol id="tab-tree-path-column" label="&path_column.label;" primary="true"
60                          sort="rdf:http://dirtag.com/rdf#name" flex="1"/>
61                 <splitter class="tree-splitter"/>
62                 <treecol id="tab-tree-tag-column" label="&tag_column.label;"
63                          sort="rdf:http://dirtag.com/rdf#tags" flex="1"/>
64               </treecols>
65               <template>
66                 <rule>
67                   <treechildren>
68                     <treeitem uri="rdf:*">
69                       <treerow>
70                         <treecell label="rdf:http://dirtag.com/rdf#name"/>
71                         <treecell label="rdf:http://dirtag.com/rdf#tags"/>
72                       </treerow>
73                     </treeitem>
74                   </treechildren>
75                 </rule>
76               </template>
77             </tree>
78           </tabpanel>
79           <tabpanel flex="1">
80             <tree id="tag-tree" rows="2" seltype="single" flex="1"
81                   datasources="tag.rdf raw.rdf"
82                   ref="http://dirtag.com/tag/files"
83                   flags="dont-build-content" onselect="tag_tree_select();">
84               <treecols>
85                 <treecol id="tab-tree-path-column" label="&path_column.label;" primary="true"
86                          sort="rdf:http://dirtag.com/rdf#name" flex="1"/>
87                 <splitter class="tree-splitter"/>
88                 <treecol id="tab-tree-tag-column" label="&tag_column.label;"
89                          sort="rdf:http://dirtag.com/rdf#tags" flex="1"/>
90               </treecols>
91               <template>
92                 <rule>
93                   <treechildren>
94                     <treeitem uri="rdf:*">
95                       <treerow>
96                         <treecell label="rdf:http://dirtag.com/rdf#name"/>
97                         <treecell label="rdf:http://dirtag.com/rdf#tags"/>
98                       </treerow>
99                     </treeitem>
100                   </treechildren>
101                 </rule>
102               </template>
103             </tree>
104           </tabpanel>
105         </tabpanels>
106       </tabbox>
107     </groupbox>
108     <splitter collapse="before"><grippy/></splitter>
109     <groupbox id="selected" flex="2" orient="horizontal">
110       <caption label="&selected.caption;"/>
111       <groupbox id="tags" flex="1">
112         <caption label="&tags.caption;"/>
113         <tree id="checkbox-tree" rows="2" seltype="single" selstype="primary"
114               editable="true"
115               datasources="tag.rdf raw.rdf"
116               ref="http://dirtag.com/tag/files"
117               flex="1">
118           <!-- checkbox callback attached in dirtag.js's initialize() -->
119           <treecols>
120             <treecol id="checkbox-tree-check-column" label="CK" type="checkbox"
121                      editable="true"/>
122             <treecol id="checkbox-tree-path-column" label="&path_column.label;"
123                      editable="true" primary="true"
124                      sort="rdf:http://dirtag.com/rdf#name" flex="1"/>
125             <splitter class="tree-splitter"/>
126           </treecols>
127           <template>
128             <rule iscontainer="true">
129               <treechildren>
130                 <treeitem uri="rdf:*" open="true">
131                   <treerow>
132                     <treecell value="true" editable="true"/>
133                     <treecell label="rdf:http://dirtag.com/rdf#name"/>
134                   </treerow>
135                 </treeitem>
136               </treechildren>
137             </rule>
138           </template>
139         </tree>
140       </groupbox>
141       <iframe id="element" src="" flex="1"/>
142     </groupbox>
143   </hbox>
144 <!--  <description id="XUL_note">
145     <html:p>
146       &XUL_note.text.pre_XUL;<html:a
147         href="http://en.wikipedia.org/wiki/XUL">XUL</html:a
148       >&XUL_note.text.XUL_to_Firefox;<html:a
149         href="http://www.firefox.com/">Firefox</html:a
150       >&XUL_note.text.post_Firefox;
151     </html:p>
152   </description>-->
153 </window>