source: chrome/content/v_identity/vI_rdfDataTree.xul @ 918de7

ng_0.8ng_0.9
Last change on this file since 918de7 was 918de7, checked in by rene <rene@…>, 11 years ago

dont show edit/remove buttons in storage-editor if nothing is selected

  • Property mode set to 100644
File size: 16.2 KB
Line 
1<?xml version="1.0"?>
2<!-- ***** BEGIN LICENSE BLOCK *****
3   - This program is free software; you can redistribute it and/or modify
4   - it under the terms of the GNU General Public License as published by
5   - the Free Software Foundation; either version 2 of the License, or
6   - (at your option) any later version.
7
8   - This program is distributed in the hope that it will be useful,
9   - but WITHOUT ANY WARRANTY; without even the implied warranty of
10   - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11   - GNU General Public License for more details.
12
13   - You should have received a copy of the GNU General Public License
14   - along with this program; if not, write to the Free Software
15   - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16
17   - The Original Code is the Virtual Identity Extension.
18
19   - The Initial Developer of the Original Code is Rene Ejury.
20   - Portions created by the Initial Developer are Copyright (C) 2007
21   - the Initial Developer. All Rights Reserved.
22
23   - Contributor(s):
24   - ***** END LICENSE BLOCK ***** -->
25
26<?xml-stylesheet href="chrome://v_identity/skin/v_identity.css" type="text/css"?>
27<?xml-stylesheet href="chrome://global/skin/tree.css" type="text/css"?>
28<?xml-stylesheet href="chrome://messenger/skin/mailWindow1.css" type="text/css"?>
29
30<!DOCTYPE window [
31<!-- for some unknown reason Seamonkey does not recognize the dtd correctly, or I made something wrong. -->
32<!-- therefore at the beginning an explizit declaration of tasksMenu.label / tasksMenu.accesskey -->
33<!-- this will be overridden by messengercomposeDTD if everything works right -->
34  <!ENTITY tasksMenu.label "Tools">
35  <!ENTITY tasksMenu.accesskey "T">
36<!-- for some unknown reason Thunderbird does not recognize the dtd correctly, or I made something wrong. -->
37<!-- therefore the declaration of messengercomposeDTD must be at the beginning -->
38<!-- at every later stage it will be not recognized the right way -->
39  <!ENTITY % messengercomposeDTD SYSTEM "chrome://messenger/locale/messengercompose/messengercompose.dtd" >
40  %messengercomposeDTD;
41<!-- now everything as usual -->
42  <!ENTITY % editDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd" >
43  %editDTD;
44  <!ENTITY % filtersDTD SYSTEM "chrome://messenger/locale/FilterListDialog.dtd" >
45  %filtersDTD;
46  <!ENTITY % dataTreeDTD SYSTEM "chrome://v_identity/locale/vI_rdfDataTree.dtd">
47  %dataTreeDTD;
48  <!ENTITY % abMainWindowDTD SYSTEM "chrome://messenger/locale/addressbook/abMainWindow.dtd">
49  %abMainWindowDTD;
50  <!ENTITY % communicatorDTD SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd">
51  %communicatorDTD;
52]>
53
54<window id="vI_rdfDataTreeWindow"
55    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
56        width="750"
57        height="500"
58        persist="width,height,screenX,screenY"
59        onload="vI_rdfDataTree.init();"
60        onunload="vI_rdfDataTree.clean();"
61        title="&vI_rdfDataTree.dlgTitle.label;">
62
63<script type="application/x-javascript" src="chrome://v_identity/content/vI_rdfDataTree.js" />
64<script type="application/x-javascript" src="chrome://v_identity/content/vI_identityData.js" />
65<script type="application/x-javascript" src="chrome://v_identity/content/vI_helper.js" />
66<script type="application/x-javascript" src="chrome://v_identity/content/vI_rdfDatasource.js" />
67<script type="application/x-javascript" src="chrome://v_identity/content/vI_notificationBar.js"/>
68<script type="application/x-javascript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
69
70<stringbundleset id="stringbundleset">
71    <stringbundle id="vI_rdfDataTreeBundle" src="chrome://v_identity/locale/vI_rdfDataEditor.properties" />
72    <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties" />
73    <stringbundle id="vIdentBundle" src="chrome://v_identity/locale/v_identity.properties" />
74        <stringbundle id="vIStorageExtrasBundle" src="chrome://v_identity/locale/vI_storageExtras.properties" />
75</stringbundleset>
76
77<menupopup hidden="true">  <!--just to hold the localized labels-->
78    <menuitem type="radio" name="output_format" label="&autoFormatCmd.label;" accesskey="&autoFormatCmd.accesskey;" id="format_auto" checked="true"/>
79    <menuitem type="radio" name="output_format" label="&plainTextFormatCmd.label;" accesskey="&plainTextFormatCmd.accesskey;" id="format_plain"/>
80    <menuitem type="radio" name="output_format" label="&htmlFormatCmd.label;" accesskey="&htmlFormatCmd.accesskey;" id="format_html"/>
81    <menuitem type="radio" name="output_format" label="&bothFormatCmd.label;" accesskey="&bothFormatCmd.accesskey;" id="format_both"/>
82</menupopup>
83
84<popup id="configContext" onpopupshowing="if (event.target == this) vI_rdfDataTree.updateContextMenu();">
85    <menuitem id="context_modifySelected" label="&vI_rdfDataTree.modifySelected.label;"
86        oncommand="vI_rdfDataTree.modifySelected(this);"/>
87    <menuitem id="context_removeSelected" label="&vI_rdfDataTree.removeSelected.label;"
88        oncommand="vI_rdfDataTree.removeSelected();"/>
89    <menuitem id="context_newItem" label="&vI_rdfDataTree.newItem.label;"
90        oncommand="vI_rdfDataTree.newItem();"/>
91    <menuseparator />
92    <menuitem id="context_menu_selectAll" label="&selectAllCmd.label;"
93        oncommand="vI_rdfDataTree.selectAll();"/>
94</popup>
95
96<keyset>
97    <key keycode="VK_ENTER" oncommand="vI_rdfDataTree.modifySelected();"/>
98    <key keycode="VK_RETURN" oncommand="vI_rdfDataTree.modifySelected();"/>
99    <key keycode="VK_DELETE" oncommand="vI_rdfDataTree.removeSelected();"/>
100    <key modifiers="accel" key="&selectAllCmd.accesskey;" oncommand="vI_rdfDataTree.selectAll();"/>
101</keyset>
102
103
104<hbox align="center">
105    <spacer width="3px" />
106    <vbox><spacer flex="1"/>
107    <menubar>
108        <menu id="editMenu" label="&vI_rdfDataTree.editMenu.label;"
109            accesskey="&vI_rdfDataTree.editMenu.accesskey;">
110        <menupopup onpopupshowing="if (event.target == this) vI_rdfDataTree.updateMenu();">
111            <menuitem id="menu_modifySelected" label="&vI_rdfDataTree.modifySelected.label;"
112                accesskey="&vI_rdfDataTree.modifySelected.accesskey;"
113                oncommand="vI_rdfDataTree.modifySelected();"/>
114            <menuitem id="menu_removeSelected" label="&vI_rdfDataTree.removeSelected.label;"
115                accesskey="&vI_rdfDataTree.removeSelected.accesskey;"
116                oncommand="vI_rdfDataTree.removeSelected();"/>
117            <menuitem id="menu_newItem" label="&vI_rdfDataTree.newItem.label;"
118                accesskey="&vI_rdfDataTree.newItem.accesskey;"
119                oncommand="vI_rdfDataTree.newItem();"/>
120            <menuseparator />
121            <menuitem id="menu_menu_selectAll" label="&selectAllCmd.label;" accesskey="&selectAllCmd.accesskey;"
122                oncommand="vI_rdfDataTree.selectAll();"/>
123        </menupopup>
124        </menu>
125        <menu id="tasksMenu" label="&tasksMenu.label;" accesskey="&tasksMenu.accesskey;">
126        <menupopup>
127            <menuitem label="&importCmd.label;" accesskey="&importCmd.accesskey;" oncommand="var vI_localRdfDatasource = new vI_rdfDatasourceImporter('virtualIdentity.rdf');"/>
128            <menuitem label="&exportCmd.label;" accesskey="&exportCmd.accesskey;" oncommand="var vI_localRdfDatasource = new vI_rdfDatasource(); vI_localRdfDatasource.export('virtualIdentity.rdf')"/>
129        </menupopup>
130        </menu>
131    </menubar>
132    <spacer flex="1"/></vbox>
133    <spacer width="20px" />
134    <label value="&vI_rdfDataTree.filterPrefs.label;" accesskey="&vI_rdfDataTree.filterPrefs.accesskey;" control="filter"/>
135    <textbox id="filter" flex="1" oninput="vI_rdfDataTree.inputFilter(event);"/>
136    <button id="clearFilter" label="&vI_rdfDataTree.showAll.label;" accesskey="&vI_rdfDataTree.showAll.accesskey;" oncommand="vI_rdfDataTree.clearFilter();" disabled="true"/>
137</hbox>
138
139<tabbox id="TreeTabbox" flex="1">
140<tabs onselect="vI_rdfDataTree.onTabSelect();" >
141<tab id="emailTab" />
142<tab id="maillistTab" />
143<tab id="newsgroupTab" />
144<tab id="filterTab" />
145</tabs>
146<tabpanels flex="1">
147<tabpanel id="email" flex="1">
148<hbox flex="1">
149<tree id="rdfDataTree_email" flex="1" class="plain" seltype="multiple"
150    persist="sortDirection sortResource" sortDirection="ascending" sortResource="recipientCol"
151    enableColumnDrag="true" context="configContext" onselect="vI_rdfDataTree.onselect(this);">
152    <treecols id="rdfDataTreeCols_email">
153        <treecol id="recipientCol_email" label="&vI_rdfDataTree.recipientColumn.label;" flex="10"
154            class="sortDirectionIndicator"
155            ignoreincolumnpicker="true"
156            persist="width ordinal sortDirection"/>
157        <splitter class="tree-splitter" />
158        <treecol id="senderCol_email" label="&vI_rdfDataTree.senderColumn.label;" flex="10"
159            class="sortDirectionIndicator"
160            persist="hidden width ordinal sortDirection"/>
161        <splitter class="tree-splitter" />
162        <treecol id="smtpCol_email" label="&vI_rdfDataTree.smtpColumn.label;" flex="5"
163            class="sortDirectionIndicator"
164            persist="hidden width ordinal sortDirection"/>
165        <splitter class="tree-splitter" />
166        <treecol id="idCol_email" label="&vI_rdfDataTree.idColumn.label;" flex="10"
167            class="sortDirectionIndicator"
168            persist="hidden width ordinal sortDirection"/>     
169    </treecols>
170    <treechildren id="configTreeBody_email" ondblclick="if (event.button == 0) vI_rdfDataTree.modifySelected();" />
171</tree>
172<vbox>
173          <button id="newButton_email" label="&newButton.label;" accesskey="&newButton.accesskey;"
174                  oncommand="vI_rdfDataTree.newItem();"/>
175          <button id="editButton_email" label="&editButton.label;" accesskey="&editButton.accesskey;"
176                  oncommand="vI_rdfDataTree.modifySelected();" disabled="true"/>
177          <button id="deleteButton_email" label="&deleteButton.label;" accesskey="&deleteButton.accesskey;"
178                  oncommand="vI_rdfDataTree.removeSelected();" disabled="true"/>
179          <spacer flex="1"/>
180</vbox>
181</hbox>
182</tabpanel>
183
184<tabpanel id="maillist" flex="1">
185<hbox flex="1">
186<tree id="rdfDataTree_maillist" flex="1" class="plain" seltype="multiple"
187    persist="sortDirection sortResource" sortDirection="ascending" sortResource="recipientCol"
188    enableColumnDrag="true" context="configContext" onselect="vI_rdfDataTree.onselect();">
189    <treecols id="rdfDataTreeCols_maillist">
190        <treecol id="recipientCol_maillist" label="&vI_rdfDataTree.recipientColumn.label;" flex="10"
191            class="sortDirectionIndicator"
192            ignoreincolumnpicker="true"
193            persist="width ordinal sortDirection"/>
194        <splitter class="tree-splitter" />
195        <treecol id="senderCol_maillist" label="&vI_rdfDataTree.senderColumn.label;" flex="10"
196            class="sortDirectionIndicator"
197            persist="hidden width ordinal sortDirection"/>
198        <splitter class="tree-splitter" />
199        <treecol id="smtpCol_maillist" label="&vI_rdfDataTree.smtpColumn.label;" flex="5"
200            class="sortDirectionIndicator"
201            persist="hidden width ordinal sortDirection"/>
202        <splitter class="tree-splitter" />
203        <treecol id="idCol_maillist" label="&vI_rdfDataTree.idColumn.label;" flex="10"
204            class="sortDirectionIndicator"
205            persist="hidden width ordinal sortDirection"/>     
206    </treecols>
207    <treechildren id="configTreeBody_maillist" ondblclick="if (event.button == 0) vI_rdfDataTree.modifySelected();" />
208</tree>
209<vbox>
210          <button id="newButton_maillist" label="&newButton.label;" accesskey="&newButton.accesskey;"
211                  oncommand="vI_rdfDataTree.newItem();"/>
212          <button id="editButton_maillist" label="&editButton.label;" accesskey="&editButton.accesskey;"
213                  oncommand="vI_rdfDataTree.modifySelected();" disabled="true"/>
214          <button id="deleteButton_maillist" label="&deleteButton.label;" accesskey="&deleteButton.accesskey;"
215                  oncommand="vI_rdfDataTree.removeSelected();" disabled="true"/>
216          <spacer flex="1"/>
217</vbox>
218</hbox>
219</tabpanel>
220<tabpanel id="newsgroup" flex="1">
221<hbox flex="1">
222<tree id="rdfDataTree_newsgroup" flex="1" class="plain" seltype="multiple"
223    persist="sortDirection sortResource" sortDirection="ascending" sortResource="recipientCol"
224    enableColumnDrag="true" context="configContext" onselect="vI_rdfDataTree.onselect();">
225    <treecols id="rdfDataTreeCols_newsgroup">
226        <treecol id="recipientCol_newsgroup" label="&vI_rdfDataTree.recipientColumn.label;" flex="10"
227            class="sortDirectionIndicator"
228            ignoreincolumnpicker="true"
229            persist="width ordinal sortDirection"/>
230        <splitter class="tree-splitter" />
231        <treecol id="senderCol_newsgroup" label="&vI_rdfDataTree.senderColumn.label;" flex="10"
232            class="sortDirectionIndicator"
233            persist="hidden width ordinal sortDirection"/>
234        <splitter class="tree-splitter" />
235        <treecol id="smtpCol_newsgroup" label="&vI_rdfDataTree.smtpColumn.label;" flex="5"
236            class="sortDirectionIndicator"
237            persist="hidden width ordinal sortDirection"/>
238        <splitter class="tree-splitter" />
239        <treecol id="idCol_newsgroup" label="&vI_rdfDataTree.idColumn.label;" flex="10"
240            class="sortDirectionIndicator"
241            persist="hidden width ordinal sortDirection"/>     
242    </treecols>
243    <treechildren id="configTreeBody_newsgroup" ondblclick="if (event.button == 0) vI_rdfDataTree.modifySelected();" />
244</tree>
245<vbox>
246          <button id="newButton_newsgroup" label="&newButton.label;" accesskey="&newButton.accesskey;"
247                  oncommand="vI_rdfDataTree.newItem();"/>
248          <button id="editButton_newsgroup" label="&editButton.label;" accesskey="&editButton.accesskey;"
249                  oncommand="vI_rdfDataTree.modifySelected();" disabled="true"/>
250          <button id="deleteButton_newsgroup" label="&deleteButton.label;" accesskey="&deleteButton.accesskey;"
251                  oncommand="vI_rdfDataTree.removeSelected();" disabled="true"/>
252          <spacer flex="1"/>
253</vbox>
254</hbox>
255</tabpanel>
256<tabpanel id="filter" flex="1">
257<hbox flex="1">
258<tree id="rdfDataTree_filter" flex="1" class="plain" seltype="multiple"
259    persist="sortDirection sortResource" sortDirection="ascending" sortResource="indexCol"
260    enableColumnDrag="true" context="configContext" onselect="vI_rdfDataTree.onselect();">
261    <treecols id="rdfDataTreeCols_filter">
262        <treecol id="indexCol_filter" label="&vI_rdfDataTree.indexColumn.label;" flex="10"
263            ignoreincolumnpicker="true"
264            class="sortDirectionIndicator"
265            persist="width ordinal"/>
266        <splitter class="tree-splitter" />
267        <treecol id="recipientCol_filter" label="&vI_rdfDataTree.recipientColumn.label;" flex="10"
268            ignoreincolumnpicker="true"
269            class="sortDirectionIndicator"
270            persist="width ordinal"/>
271        <splitter class="tree-splitter" />
272        <treecol id="senderCol_filter" label="&vI_rdfDataTree.senderColumn.label;" flex="10"
273            class="sortDirectionIndicator"
274            persist="hidden width ordinal"/>
275        <splitter class="tree-splitter" />
276        <treecol id="smtpCol_filter" label="&vI_rdfDataTree.smtpColumn.label;" flex="5"
277            class="sortDirectionIndicator"
278            persist="hidden width ordinal"/>
279        <splitter class="tree-splitter" />
280        <treecol id="idCol_filter" label="&vI_rdfDataTree.idColumn.label;" flex="10"
281            class="sortDirectionIndicator"
282            persist="hidden width ordinal"/>       
283    </treecols>
284    <treechildren id="configTreeBody_filter" ondblclick="if (event.button == 0) vI_rdfDataTree.modifySelected();" />
285</tree>
286<vbox>
287          <button id="newButton_filter" label="&newButton.label;" accesskey="&newButton.accesskey;"
288                  oncommand="vI_rdfDataTree.newItem();"/>
289          <button id="editButton_filter" label="&editButton.label;" accesskey="&editButton.accesskey;"
290                  oncommand="vI_rdfDataTree.modifySelected();" disabled="true"/>
291          <button id="deleteButton_filter" label="&deleteButton.label;" accesskey="&deleteButton.accesskey;"
292                  oncommand="vI_rdfDataTree.removeSelected();" disabled="true"/>
293          <spacer flex="1"/>
294          <button id="reorderUpButton_filter" label="&reorderUpButton.label;" accesskey="&reorderUpButton.accesskey;"
295                  class="up"
296                  oncommand="vI_rdfDataTree.moveUpSelected();"/>
297          <button id="reorderDownButton_filter" label="&reorderDownButton.label;" accesskey="&reorderDownButton.accesskey;"
298                  class="down"
299                  oncommand="vI_rdfDataTree.moveDownSelected();"/>
300          <spacer flex="1"/>
301</vbox>
302</hbox>
303</tabpanel>
304
305</tabpanels>
306</tabbox>
307<!-- <splitter /> -->
308<browser id="vI_rdfDataTreeInfoBox" class="vI_htmlTextBox" cssSource="vI_rdfTreeInfo.css" disablehistory="true" onoverflow="vI_rdfDataTree.overflow();"/>
309
310    <splitter id="vIDebugBoxSplitter" hidden="true"/>
311    <textbox id="vIDebugBox" hidden="true" multiline="true" readonly="true"
312    DOMAttrModified="if(event.attrName == 'value') this.value = event.newValue; return true;"/>
313
314</window>
Note: See TracBrowser for help on using the repository browser.