-rw-r--r-- | content/fireflix-panel.xul | 7 | ||||
-rw-r--r-- | content/fireflix.css | 8 | ||||
-rw-r--r-- | content/fireflix.js | 25 |
3 files changed, 31 insertions, 9 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 @@ -256,5 +256,6 @@ </tree> <progressmeter id="upload_progress" mode="undetermined" hidden="true" /> - <groupbox id="upload_file_props" orient="horizontal" hidden="true"> + <groupbox id="upload_file_props" orient="vertical" hidden="true"> + <hbox> <image id="upload_file_preview" width="100" height="100" /> <grid flex="1"> @@ -276,5 +277,5 @@ </row> <row> - <label control="uplod_tags" value="&panel.upload_props.tags.label;" /> + <label control="upload_tags" value="&panel.upload_props.tags.label;" /> <textbox id="upload_tags" oninput="fireflix.uploads.propsToSel('tags')"/> @@ -283,4 +284,6 @@ </rows> </grid> + </hbox> + <description id="upload_failure" hidden="true"/> </groupbox> <hbox> diff --git a/content/fireflix.css b/content/fireflix.css index ab90c11..06ae28a 100644 --- a/content/fireflix.css +++ b/content/fireflix.css @@ -44,4 +44,12 @@ 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 { border: black 1px solid; diff --git a/content/fireflix.js b/content/fireflix.js index 995ec5c..7291b68 100644 --- a/content/fireflix.js +++ b/content/fireflix.js @@ -333,5 +333,5 @@ var fireflix = { 'upload_filename','upload_title','upload_file_preview', 'upload_file_props','upload_progress','upload_tags', - 'cmd_uploads_upload' + 'cmd_uploads_upload', 'upload_failure' ]); document.getElementById('uploadlist').view = this; @@ -490,24 +490,33 @@ var fireflix = { this.upload_title.disabled = true; 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; */ }, selToProps: function() { if(!this.selection.count) { 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; } }else{ @@ -540,7 +549,9 @@ var fireflix = { this.upload_tags.disabled = false; this.upload_file_preview.src = null; + this.upload_failure.hidden = true; this.upload_file_props.hidden = false; }else this.disableProps(); + this.upload_file_props.hidden = true; } }, |