summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2006-12-18 13:22:11 (UTC)
committer Michael Krelin <hacker@klever.net>2006-12-18 13:22:11 (UTC)
commit676ead33f615fbc2affb3cb979d1316f0676daef (patch) (side-by-side diff)
tree06e7afff01a0c1df631c7f635618403d7989572a
parentb609e9157c1587b11f177edfa7fe65f6851e9706 (diff)
downloadfireflix-676ead33f615fbc2affb3cb979d1316f0676daef.zip
fireflix-676ead33f615fbc2affb3cb979d1316f0676daef.tar.gz
fireflix-676ead33f615fbc2affb3cb979d1316f0676daef.tar.bz2
make file properties visible but readonly for non-pending downloads.
And while we're at it show failure reason for failed uploads. git-svn-id: http://svn.klever.net/kin/fireflix/trunk@238 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--content/fireflix-panel.xul57
-rw-r--r--content/fireflix.css8
-rw-r--r--content/fireflix.js25
3 files changed, 56 insertions, 34 deletions
diff --git a/content/fireflix-panel.xul b/content/fireflix-panel.xul
index 0e511c5..aa3dbd6 100644
--- a/content/fireflix-panel.xul
+++ b/content/fireflix-panel.xul
@@ -257,29 +257,32 @@
<progressmeter id="upload_progress" mode="undetermined" hidden="true" />
- <groupbox id="upload_file_props" orient="horizontal" hidden="true">
- <image id="upload_file_preview" width="100" height="100" />
- <grid flex="1">
- <columns>
- <column/>
- <column flex="1"/>
- </columns>
- <rows>
- <row>
- <label control="upload_filename"
- value="&panel.upload_props.filename.label;" />
- <textbox id="upload_filename"
- oninput="fireflix.uploads.propsToSel('filename')"/>
- </row>
- <row>
- <label control="upload_title" value="&panel.upload_props.title.label;" />
- <textbox id="upload_title"
- oninput="fireflix.uploads.propsToSel('title')"/>
- </row>
- <row>
- <label control="uplod_tags" value="&panel.upload_props.tags.label;" />
- <textbox id="upload_tags"
- oninput="fireflix.uploads.propsToSel('tags')"/>
- </row>
- <!-- TODO: description, public, friend, family -->
- </rows>
- </grid>
+ <groupbox id="upload_file_props" orient="vertical" hidden="true">
+ <hbox>
+ <image id="upload_file_preview" width="100" height="100" />
+ <grid flex="1">
+ <columns>
+ <column/>
+ <column flex="1"/>
+ </columns>
+ <rows>
+ <row>
+ <label control="upload_filename"
+ value="&panel.upload_props.filename.label;" />
+ <textbox id="upload_filename"
+ oninput="fireflix.uploads.propsToSel('filename')"/>
+ </row>
+ <row>
+ <label control="upload_title" value="&panel.upload_props.title.label;" />
+ <textbox id="upload_title"
+ oninput="fireflix.uploads.propsToSel('title')"/>
+ </row>
+ <row>
+ <label control="upload_tags" value="&panel.upload_props.tags.label;" />
+ <textbox id="upload_tags"
+ oninput="fireflix.uploads.propsToSel('tags')"/>
+ </row>
+ <!-- TODO: description, public, friend, family -->
+ </rows>
+ </grid>
+ </hbox>
+ <description id="upload_failure" hidden="true"/>
</groupbox>
diff --git a/content/fireflix.css b/content/fireflix.css
index ab90c11..06ae28a 100644
--- a/content/fireflix.css
+++ b/content/fireflix.css
@@ -45,2 +45,10 @@ groupbox#upload_file_props label {
+description#upload_failure {
+ border-top: solid 1px red;
+ margin: 0px; padding: 2px;
+ text-align: left;
+ font-size: 85%;
+ line-height: 105%;
+}
+
image#search_photo, image#set_photo, image#set_primary {
diff --git a/content/fireflix.js b/content/fireflix.js
index 995ec5c..7291b68 100644
--- a/content/fireflix.js
+++ b/content/fireflix.js
@@ -334,3 +334,3 @@ var fireflix = {
'upload_file_props','upload_progress','upload_tags',
- 'cmd_uploads_upload'
+ 'cmd_uploads_upload', 'upload_failure'
]);
@@ -491,5 +491,5 @@ var fireflix = {
this.upload_file_preview.src = null;
- this.upload_file_props.hidden = true;
this.upload_tags.value='';
this.upload_tags.disabled = true;
+ /* this.upload_file_props.hidden = true; */
},
@@ -498,15 +498,24 @@ var fireflix = {
this.disableProps();
+ this.upload_file_props.hidden = true;
}else if(this.selection.count==1) {
var f=this.files[this.selection.currentIndex];
- if(f==null || f.state!='pending') {
+ if(f==null) {
this.disableProps();
+ this.upload_file_props.hidden = true;
}else{
+ var inactives = f.state!='pending';
this.upload_filename.value = f.file;
- this.upload_filename.disabled = false;
+ this.upload_filename.disabled = inactives;
this.upload_title.value = f.title;
- this.upload_title.disabled = false;
+ this.upload_title.disabled = inactives;
this.upload_file_preview.src = 'file:///'+f.file;
- this.upload_file_props.hidden = false;
this.upload_tags.value = f.tags;
- this.upload_tags.disabled = false;
+ this.upload_tags.disabled = inactives;
+ if(f.state=='failed') {
+ this.upload_failure.textContent=f.flickr_errcode+': '+f.flickr_errmsg;
+ this.upload_failure.hidden = false;
+ }else{
+ this.upload_failure.hidden = true;
+ }
+ this.upload_file_props.hidden = false;
}
@@ -541,2 +550,3 @@ var fireflix = {
this.upload_file_preview.src = null;
+ this.upload_failure.hidden = true;
this.upload_file_props.hidden = false;
@@ -544,2 +554,3 @@ var fireflix = {
this.disableProps();
+ this.upload_file_props.hidden = true;
}