summaryrefslogtreecommitdiffabout
path: root/content/fireflix-panel.xul
authorMichael Krelin <hacker@klever.net>2006-09-28 19:40:39 (UTC)
committer Michael Krelin <hacker@klever.net>2006-09-28 19:40:39 (UTC)
commit438c60c606a15792893c38415d0f405ae21e433d (patch) (unidiff)
treed8a56268d5ebedf8669587af7469fedbe1527154 /content/fireflix-panel.xul
parentb62171950ffbbdae7826b1b8cdd4cfd0bde8cc93 (diff)
downloadfireflix-438c60c606a15792893c38415d0f405ae21e433d.zip
fireflix-438c60c606a15792893c38415d0f405ae21e433d.tar.gz
fireflix-438c60c606a15792893c38415d0f405ae21e433d.tar.bz2
Better tracking of auth state, added possibility to sign off and reauth
git-svn-id: http://svn.klever.net/kin/fireflix/trunk@164 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (limited to 'content/fireflix-panel.xul') (more/less context) (ignore whitespace changes)
-rw-r--r--content/fireflix-panel.xul33
1 files changed, 26 insertions, 7 deletions
diff --git a/content/fireflix-panel.xul b/content/fireflix-panel.xul
index 75d6c2d..70a58fe 100644
--- a/content/fireflix-panel.xul
+++ b/content/fireflix-panel.xul
@@ -1,252 +1,271 @@
1<?xml version="1.0"?> 1<?xml version="1.0"?>
2<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 2<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
3<?xml-stylesheet href="fireflix.css" type="text/css"?> 3<?xml-stylesheet href="fireflix.css" type="text/css"?>
4<!DOCTYPE page SYSTEM "chrome://fireflix/locale/fireflix.dtd"> 4<!DOCTYPE page SYSTEM "chrome://fireflix/locale/fireflix.dtd">
5<page 5<page
6 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 6 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
7 id="fireflixwindow" title="Fireflix" 7 id="fireflixwindow" title="Fireflix"
8 onload="fireflix.init()" 8 onload="fireflix.init()"
9 orient="vertical" 9 orient="vertical"
10 ondragover="nsDragAndDrop.dragOver(event,fireflix.uploadObserver)" 10 ondragover="nsDragAndDrop.dragOver(event,fireflix.uploadObserver)"
11 ondragdrop="nsDragAndDrop.drop(event,fireflix.uploadObserver)" 11 ondragdrop="nsDragAndDrop.drop(event,fireflix.uploadObserver)"
12 > 12 >
13 13
14 <script src="chrome://global/content/nsDragAndDrop.js"/> 14 <script src="chrome://global/content/nsDragAndDrop.js"/>
15 <script src="chrome://global/content/nsTransferable.js"/> 15 <script src="chrome://global/content/nsTransferable.js"/>
16 <script type="application/x-javascript" src="md5.js" /> 16 <script type="application/x-javascript" src="md5.js" />
17 <script type="application/x-javascript" src="flickr.js" /> 17 <script type="application/x-javascript" src="flickr.js" />
18 <script type="application/x-javascript" src="fireflix.js" /> 18 <script type="application/x-javascript" src="fireflix.js" />
19 19
20 <stringbundleset> 20 <stringbundleset>
21 <stringbundle id="loc_strings" src="chrome://fireflix/locale/fireflix.properties" /> 21 <stringbundle id="loc_strings" src="chrome://fireflix/locale/fireflix.properties" />
22 </stringbundleset> 22 </stringbundleset>
23 23
24 <commandset>
25 <command id="cmd_auth_auth" label="&panel.auth.auth.label;"
26 oncommand="fireflix.on_cmd_auth()"/>
27 <command id="cmd_auth_done" label="&panel.auth.done.label;"
28 oncommand="fireflix.on_cmd_auth_done()" disabled="true"/>
29 <command id="cmd_auth_open_flickr" label="&panel.auth.flickr.label;"
30 oncommand="fireflix.openTab('htp://www.flickr.com/')" />
31 <command id="cmd_auth_unauth" label="&panel.auth.unauth.label;"
32 oncommand="fireflix.on_cmd_auth_unauth()" />
33 </commandset>
34
35 <popupset>
36 <popup id="auth_menu">
37 <menuitem command="cmd_auth_auth"/>
38 <menuitem command="cmd_auth_done" hidden="true" id="menu_auth_done"/>
39 <menuitem command="cmd_auth_unauth" />
40 <menuseparator/>
41 <menuitem command="cmd_auth_open_flickr"/>
42 </popup>
43 </popupset>
44
24 <commandset id="cmdset_search"> 45 <commandset id="cmdset_search">
25 <command id="cmd_search" label="&panel.search.cmd_search.label;" 46 <command id="cmd_search" label="&panel.search.cmd_search.label;"
26 oncommand="fireflix.foundphotos.search_photos()"/> 47 oncommand="fireflix.foundphotos.search_photos()"/>
27 <command id="cmd_search_open" label="&panel.search.cmd_search_open.label;" 48 <command id="cmd_search_open" label="&panel.search.cmd_search_open.label;"
28 oncommand="fireflix.foundphotos.on_cmd_open(event)" /> 49 oncommand="fireflix.foundphotos.on_cmd_open(event)" />
29 </commandset> 50 </commandset>
30 51
31 <commandset id="cmdset_sets"> 52 <commandset id="cmdset_sets">
32 <command id="cmd_refresh_sets" label="&panel.sets.cmd_refresh_sets;" 53 <command id="cmd_refresh_sets" label="&panel.sets.cmd_refresh_sets;"
33 oncommand="fireflix.on_refresh_sets()" /> 54 oncommand="fireflix.on_refresh_sets()" />
34 <command id="cmd_set_props" label="&panel.sets.cmd_properties;" 55 <command id="cmd_set_props" label="&panel.sets.cmd_properties;"
35 oncommand="fireflix.on_set_props()" disabled="true" /> 56 oncommand="fireflix.on_set_props()" disabled="true" />
36 </commandset> 57 </commandset>
37 58
38 <popupset> 59 <popupset>
39 <popup id="sets_menu"> 60 <popup id="sets_menu">
40 <menuitem command="cmd_set_props"/> 61 <menuitem command="cmd_set_props"/>
41 <menuitem command="cmd_refresh_sets"/> 62 <menuitem command="cmd_refresh_sets"/>
42 <menuseparator/> 63 <menuseparator/>
43 <menu label="&panel.sets.generate_html;" id="sets_html_menu"/> 64 <menu label="&panel.sets.generate_html;" id="sets_html_menu"/>
44 </popup> 65 </popup>
45 </popupset> 66 </popupset>
46 67
47 <commandset id="cmdset_uploads"> 68 <commandset id="cmdset_uploads">
48 <command id="cmd_uploads_clear" label="&panel.uploads.clear.label;" 69 <command id="cmd_uploads_clear" label="&panel.uploads.clear.label;"
49 oncommand="fireflix.uploads.on_clear()" /> 70 oncommand="fireflix.uploads.on_clear()" />
50 <command id="cmd_uploads_upload" label="&panel.uploads.upload.label;" 71 <command id="cmd_uploads_upload" label="&panel.uploads.upload.label;"
51 oncommand="fireflix.uploads.on_upload()" /> 72 oncommand="fireflix.uploads.on_upload()" />
52 <command id="cmd_uploads_remove" label="&panel.uploads.remove.label;" 73 <command id="cmd_uploads_remove" label="&panel.uploads.remove.label;"
53 oncommand="fireflix.uploads.on_remove()" /> 74 oncommand="fireflix.uploads.on_remove()" />
54 <command id="cmd_uploads_add" label="&panel.uploads.add.label;" 75 <command id="cmd_uploads_add" label="&panel.uploads.add.label;"
55 oncommand="fireflix.uploads.on_add()" /> 76 oncommand="fireflix.uploads.on_add()" />
56 </commandset> 77 </commandset>
57 78
58 <popupset> 79 <popupset>
59 <popup id="uploads_menu"> 80 <popup id="uploads_menu">
60 <menuitem command="cmd_uploads_add"/> 81 <menuitem command="cmd_uploads_add"/>
61 <menuitem command="cmd_uploads_clear"/> 82 <menuitem command="cmd_uploads_clear"/>
62 <menuitem command="cmd_uploads_remove"/> 83 <menuitem command="cmd_uploads_remove"/>
63 <menuseparator/> 84 <menuseparator/>
64 <menuitem command="cmd_uploads_upload"/> 85 <menuitem command="cmd_uploads_upload"/>
65 <menuseparator/> 86 <menuseparator/>
66 <menu label="&panel.uploads.generate_html;" id="uploads_html_menu"/> 87 <menu label="&panel.uploads.generate_html;" id="uploads_html_menu"/>
67 </popup> 88 </popup>
68 </popupset> 89 </popupset>
69 90
70 <vbox class="wholething" flex="1"> 91 <vbox class="wholething" flex="1">
71 92
72 <groupbox> 93 <groupbox context="auth_menu">
73 <caption label="&panel.auth_info;"/> 94 <caption label="&panel.auth_info;"/>
74 <hbox> 95 <hbox>
75 <label id="auth_info" value="&panel.no_auth_info;" flex="1" disabled="true"/> 96 <label id="auth_info" value="&panel.no_auth_info;" flex="1" disabled="true"/>
76 <button id="b_auth" label="&panel.auth_button;" oncommand="fireflix.on_auth()"/> 97 <button id="b_auth" command="cmd_auth_auth"/>
77 <button id="b_auth_done" label="&panel.auth_complete_button;" hidden="true" 98 <button id="b_auth_done" command="cmd_auth_done" hidden="true"/>
78 oncommand="fireflix.on_auth_done()"/> 99 <button command="cmd_auth_open_flickr"
79 <button label="&panel.flickr_button.label;" 100 tooltiptext="&panel.auth.flickr.tip;"/>
80 tooltiptext="&panel.flickr_button.tip;"
81 oncommand="fireflix.openTab('http://www.flickr.com/')" />
82 </hbox> 101 </hbox>
83 </groupbox> 102 </groupbox>
84 103
85 <tabbox flex="1" id="fireflix_tabs"> 104 <tabbox flex="1" id="fireflix_tabs">
86 105
87 <tabs> 106 <tabs>
88 <tab label="&panel.tabs.search;"/> 107 <tab label="&panel.tabs.search;"/>
89 <tab label="&panel.tabs.sets;"/> 108 <tab label="&panel.tabs.sets;"/>
90 <tab label="&panel.tabs.tags;" hidden="true"/> <!-- TODO: --> 109 <tab label="&panel.tabs.tags;" hidden="true"/> <!-- TODO: -->
91 <tab id="tab_upload" label="&panel.tabs.upload;"/> 110 <tab id="tab_upload" label="&panel.tabs.upload;"/>
92 </tabs> 111 </tabs>
93 112
94 <tabpanels flex="1"> 113 <tabpanels flex="1">
95 114
96 <tabpanel id="tabpanel_search" flex="1"> 115 <tabpanel id="tabpanel_search" flex="1">
97 <vbox flex="1"> 116 <vbox flex="1">
98 <groupbox class="search_params" orient="vertical" onkeypress="if(event.keyCode==event.DOM_VK_RETURN) fireflix.foundphotos.search_photos()"> 117 <groupbox class="search_params" orient="vertical" onkeypress="if(event.keyCode==event.DOM_VK_RETURN) fireflix.foundphotos.search_photos()">
99 <hbox> 118 <hbox>
100 <label control="search_for" value="&panel.search.search_for.label;" 119 <label control="search_for" value="&panel.search.search_for.label;"
101 accesskey="s"/> 120 accesskey="s"/>
102 <textbox id="search_for" flex="1"/> 121 <textbox id="search_for" flex="1"/>
103 </hbox> 122 </hbox>
104 <hbox> 123 <hbox>
105 <checkbox id="search_tags" label="&panel.search.mode.tagsonly.label;" 124 <checkbox id="search_tags" label="&panel.search.mode.tagsonly.label;"
106 tooltiptext="&panel.search.mode.tagsonly.tip;" checked="false" 125 tooltiptext="&panel.search.mode.tagsonly.tip;" checked="false"
107 accesskey="t" /> 126 accesskey="t" />
108 <checkbox id="search_mine" label="&panel.search.mode.mine.label;" checked="true" accesskey="m"/> 127 <checkbox id="search_mine" label="&panel.search.mode.mine.label;" checked="true" accesskey="m"/>
109 <spacer flex="1"/> 128 <spacer flex="1"/>
110 <button command="cmd_search"/> 129 <button command="cmd_search"/>
111 </hbox> 130 </hbox>
112 </groupbox> 131 </groupbox>
113 <tree id="searchresults" rows="2" flex="1" 132 <tree id="searchresults" rows="2" flex="1"
114 onselect="fireflix.foundphotos.on_select()" 133 onselect="fireflix.foundphotos.on_select()"
115 ondblclick="fireflix.foundphotos.on_cmd_open(event)" 134 ondblclick="fireflix.foundphotos.on_cmd_open(event)"
116 onkeypress="if(event.keyCode==event.DOM_VK_RETURN) 135 onkeypress="if(event.keyCode==event.DOM_VK_RETURN)
117 fireflix.foundphotos.on_cmd_open(event)"> 136 fireflix.foundphotos.on_cmd_open(event)">
118 <treecols> 137 <treecols>
119 <treecol id="sr_title" label="&panel.search.col.title.label;" flex="2" crop="end" align="start" /> 138 <treecol id="sr_title" label="&panel.search.col.title.label;" flex="2" crop="end" align="start" />
120 </treecols> 139 </treecols>
121 <treechildren/> 140 <treechildren/>
122 </tree> 141 </tree>
123 <groupbox id="searchresult_props" orient="horizontal" hidden="true"> 142 <groupbox id="searchresult_props" orient="horizontal" hidden="true">
124 <vbox width="100" pack="center"> 143 <vbox width="100" pack="center">
125 <hbox pack="center"> 144 <hbox pack="center">
126 <image id="search_photo"/> 145 <image id="search_photo"/>
127 </hbox> 146 </hbox>
128 </vbox> 147 </vbox>
129 <vbox flex="1"> 148 <vbox flex="1">
130 <label id="searchresult_title"/> 149 <label id="searchresult_title"/>
131 <textbox flex="1" multiline="true" class="plain" readonly="true" id="searchresult_description"/> 150 <textbox flex="1" multiline="true" class="plain" readonly="true" id="searchresult_description"/>
132 <hbox pack="end"> 151 <hbox pack="end">
133 <button command="cmd_search_open"/> 152 <button command="cmd_search_open"/>
134 </hbox> 153 </hbox>
135 </vbox> 154 </vbox>
136 </groupbox> 155 </groupbox>
137 </vbox> 156 </vbox>
138 </tabpanel> 157 </tabpanel>
139 158
140 <tabpanel id="tabpanel_sets" flex="1" 159 <tabpanel id="tabpanel_sets" flex="1"
141 onkeypress="if(event.keyCode==event.DOM_VK_RETURN) 160 onkeypress="if(event.keyCode==event.DOM_VK_RETURN)
142 document.getElementById('setphotos').focus()"> 161 document.getElementById('setphotos').focus()">
143 <vbox flex="1"> 162 <vbox flex="1">
144 <tree id="setslist" rows="2" onselect="fireflix.photosets.on_select()" 163 <tree id="setslist" rows="2" onselect="fireflix.photosets.on_select()"
145 flex="1" context="sets_menu" 164 flex="1" context="sets_menu"
146 > 165 >
147 <treecols> 166 <treecols>
148 <treecol id="sl_name" label="&panel.sets.name.label;" flex="4" crop="end" align="start" tooltiptext="&panel.sets.name.tip;"/> 167 <treecol id="sl_name" label="&panel.sets.name.label;" flex="4" crop="end" align="start" tooltiptext="&panel.sets.name.tip;"/>
149 <splitter class="tree-splitter" /> 168 <splitter class="tree-splitter" />
150 <treecol id="sl_photos" label="&panel.sets.photos.label;" flex="1" align="end" tooltiptext="&panel.sets.photos.tip;" /> 169 <treecol id="sl_photos" label="&panel.sets.photos.label;" flex="1" align="end" tooltiptext="&panel.sets.photos.tip;" />
151 </treecols> 170 </treecols>
152 <treechildren/> 171 <treechildren/>
153 </tree> 172 </tree>
154 <hbox> 173 <hbox>
155 <button command="cmd_refresh_sets" /> 174 <button command="cmd_refresh_sets" />
156 <button command="cmd_set_props" /> 175 <button command="cmd_set_props" />
157 </hbox> 176 </hbox>
158 <tree id="setphotos" rows="2" onselect="fireflix.photoset.on_select()" 177 <tree id="setphotos" rows="2" onselect="fireflix.photoset.on_select()"
159 flex="1"> 178 flex="1">
160 <treecols> 179 <treecols>
161 <treecol id="sp_title" label="&panel.setphotos.title.label;" flex="1" crop="end" align="start" tooltiptext="&panel.setphotos.title.tip;" /> 180 <treecol id="sp_title" label="&panel.setphotos.title.label;" flex="1" crop="end" align="start" tooltiptext="&panel.setphotos.title.tip;" />
162 <splitter class="tree-splitter" /> 181 <splitter class="tree-splitter" />
163 <treecol id="sp_taken" label="&panel.setphotos.taken.label;" crop="end" align="start" tooltiptext="&panel.setphotos.taken.tip;" hidden="true" /> 182 <treecol id="sp_taken" label="&panel.setphotos.taken.label;" crop="end" align="start" tooltiptext="&panel.setphotos.taken.tip;" hidden="true" />
164 <treecol id="sp_upload" label="&panel.setphotos.upload.label;" crop="end" align="start" tooltiptext="&panel.setphotos.upload.tip;" hidden="true" /> 183 <treecol id="sp_upload" label="&panel.setphotos.upload.label;" crop="end" align="start" tooltiptext="&panel.setphotos.upload.tip;" hidden="true" />
165 </treecols> 184 </treecols>
166 <treechildren/> 185 <treechildren/>
167 </tree> 186 </tree>
168 <groupbox id="set_photo_props" orient="horizontal"> 187 <groupbox id="set_photo_props" orient="horizontal">
169 <vbox width="100" pack="center"> 188 <vbox width="100" pack="center">
170 <hbox pack="center"> 189 <hbox pack="center">
171 <image id="set_photo" hidden="true"/> 190 <image id="set_photo" hidden="true"/>
172 </hbox> 191 </hbox>
173 </vbox> 192 </vbox>
174 <spacer flex="1"/> 193 <spacer flex="1"/>
175 </groupbox> 194 </groupbox>
176 </vbox> 195 </vbox>
177 </tabpanel> 196 </tabpanel>
178 197
179 <tabpanel id="tabpanel_tags"> 198 <tabpanel id="tabpanel_tags">
180 <listbox id="tagslist" rows="8" flex="1"> 199 <listbox id="tagslist" rows="8" flex="1">
181 <listhead> 200 <listhead>
182 <listheader label="&panel.tagslist.tag.label;"/> 201 <listheader label="&panel.tagslist.tag.label;"/>
183 </listhead> 202 </listhead>
184 <listcols> 203 <listcols>
185 <listcol flex="1"/> 204 <listcol flex="1"/>
186 </listcols> 205 </listcols>
187 </listbox> 206 </listbox>
188 </tabpanel> 207 </tabpanel>
189 208
190 <tabpanel id="tabpanel_upload"> 209 <tabpanel id="tabpanel_upload">
191 <vbox flex="1"> 210 <vbox flex="1">
192 <tree id="uploadlist" rows="2" flex="1" 211 <tree id="uploadlist" rows="2" flex="1"
193 onselect="fireflix.uploads.selectionChanged()" 212 onselect="fireflix.uploads.selectionChanged()"
194 context="uploads_menu"> 213 context="uploads_menu">
195 <treecols> 214 <treecols>
196 <treecol id="up_file" label="&panel.uploadlist.file.label;" flex="4" crop="start" align="start"/> 215 <treecol id="up_file" label="&panel.uploadlist.file.label;" flex="4" crop="start" align="start"/>
197 <splitter class="tree-splitter" /> 216 <splitter class="tree-splitter" />
198 <treecol id="up_title" label="&panel.uploadlist.title.label;" flex="5" crop="end" align="start" /> 217 <treecol id="up_title" label="&panel.uploadlist.title.label;" flex="5" crop="end" align="start" />
199 <splitter class="tree-splitter" /> 218 <splitter class="tree-splitter" />
200 <treecol id="up_status" label="&panel.uploadlist.status.label;" flex="1" crop="end" align="start" /> 219 <treecol id="up_status" label="&panel.uploadlist.status.label;" flex="1" crop="end" align="start" />
201 </treecols> 220 </treecols>
202 <treechildren/> 221 <treechildren/>
203 </tree> 222 </tree>
204 <progressmeter id="upload_progress" mode="undetermined" hidden="true" /> 223 <progressmeter id="upload_progress" mode="undetermined" hidden="true" />
205 <groupbox id="upload_file_props" orient="horizontal" hidden="true"> 224 <groupbox id="upload_file_props" orient="horizontal" hidden="true">
206 <image id="upload_file_preview" width="100" height="100" /> 225 <image id="upload_file_preview" width="100" height="100" />
207 <grid flex="1"> 226 <grid flex="1">
208 <columns> 227 <columns>
209 <column/> 228 <column/>
210 <column flex="1"/> 229 <column flex="1"/>
211 </columns> 230 </columns>
212 <rows> 231 <rows>
213 <row> 232 <row>
214 <label control="upload_filename" 233 <label control="upload_filename"
215 value="&panel.upload_props.filename.label;" /> 234 value="&panel.upload_props.filename.label;" />
216 <textbox id="upload_filename" 235 <textbox id="upload_filename"
217 oninput="fireflix.uploads.propsToSel('filename')"/> 236 oninput="fireflix.uploads.propsToSel('filename')"/>
218 </row> 237 </row>
219 <row> 238 <row>
220 <label control="upload_title" value="&panel.upload_props.title.label;" /> 239 <label control="upload_title" value="&panel.upload_props.title.label;" />
221 <textbox id="upload_title" 240 <textbox id="upload_title"
222 oninput="fireflix.uploads.propsToSel('title')"/> 241 oninput="fireflix.uploads.propsToSel('title')"/>
223 </row> 242 </row>
224 <row> 243 <row>
225 <label control="uplod_tags" value="&panel.upload_props.tags.label;" /> 244 <label control="uplod_tags" value="&panel.upload_props.tags.label;" />
226 <textbox id="upload_tags" 245 <textbox id="upload_tags"
227 oninput="fireflix.uploads.propsToSel('tags')"/> 246 oninput="fireflix.uploads.propsToSel('tags')"/>
228 </row> 247 </row>
229 <!-- TODO: description, public, friend, family --> 248 <!-- TODO: description, public, friend, family -->
230 </rows> 249 </rows>
231 </grid> 250 </grid>
232 </groupbox> 251 </groupbox>
233 <hbox> 252 <hbox>
234 <button command="cmd_uploads_add" /> 253 <button command="cmd_uploads_add" />
235 <spacer flex="1"/> 254 <spacer flex="1"/>
236 <button command="cmd_uploads_remove" /> 255 <button command="cmd_uploads_remove" />
237 <spacer flex="1"/> 256 <spacer flex="1"/>
238 <button command="cmd_uploads_clear" /> 257 <button command="cmd_uploads_clear" />
239 </hbox> 258 </hbox>
240 <hbox pack="center"> 259 <hbox pack="center">
241 <button command="cmd_uploads_upload" flex="1"/> 260 <button command="cmd_uploads_upload" flex="1"/>
242 </hbox> 261 </hbox>
243 </vbox> 262 </vbox>
244 </tabpanel> 263 </tabpanel>
245 264
246 </tabpanels> 265 </tabpanels>
247 266
248 </tabbox> 267 </tabbox>
249 268
250 </vbox> 269 </vbox>
251 270
252</page> 271</page>