Permalink
Browse files

Issue #47 : Alleviating problem of obscured upload button

  • Loading branch information...
1 parent 4cabdf8 commit 9ff988e4c632e57d5e7f5656a85089f628516213 @brianking brianking committed Apr 20, 2012
Showing with 21 additions and 27 deletions.
  1. +4 −0 chrome/content/photoupload/photoupload.js
  2. +17 −27 chrome/content/photoupload/photoupload.xul
@@ -984,6 +984,7 @@ var PhotoUpload = {
_uploadCancelled: false,
_uploadStatus: null,
_uploadStatusDeck: null,
+ _uploadStatusBox: null,
_uploadProgress: null,
_uploadBroadcaster: null,
_observerService: null,
@@ -1025,6 +1026,7 @@ var PhotoUpload = {
this._uploadStatus = document.getElementById("uploadStatus")
this._uploadStatusDeck = document.getElementById("uploadStatusDeck");
+ this._uploadStatusBox = document.getElementById("uploadStatusBox");
this._uploadProgress = document.getElementById("uploadProgress");
this._uploadBroadcaster = document.getElementById("uploadBroadcaster");
@@ -1445,6 +1447,7 @@ var PhotoUpload = {
}
// TODO: store albumId in a field instead of passing it around.
+ this._uploadStatusBox.removeAttribute("collapsed");
this._uploadStatusDeck.selectedIndex = 1;
this._uploadBroadcaster.setAttribute("disabled", "true");
this._uploadStatus.className = "upload-status";
@@ -1466,6 +1469,7 @@ var PhotoUpload = {
this._uploadCancelled = false;
this._uploadProgress.value = 0;
this._uploadBroadcaster.setAttribute("disabled", "false");
+ this._uploadStatusBox.setAttribute("collapsed", "true");
this._uploadStatusDeck.selectedIndex = 0;
if (status == UPLOAD_CANCELLED) {
@@ -61,41 +61,31 @@
<hbox align="center">
- <hbox align="center" flex="1">
- <label id="loadingAlbumsLabel" value="&upload.addtoalbum.label;"/>
- <menulist id="albumsList"
- observes="uploadBroadcaster">
- <menupopup id="albumsPopup">
- <menuitem id="albumsPopupPlaceHolder" collapsed="true"/>
- <menuseparator/>
- <menuitem label="&upload.createnewalbum.label;" oncommand="PhotoUpload.doOpenCreateNewAlbumDialog();"/>
- </menupopup>
- </menulist>
- <spacer flex="1"/>
- </hbox>
+ <hbox align="center">
+ <label id="loadingAlbumsLabel" value="&upload.addtoalbum.label;"/>
+ <menulist id="albumsList"
+ observes="uploadBroadcaster">
+ <menupopup id="albumsPopup">
+ <menuitem id="albumsPopupPlaceHolder" collapsed="true"/>
+ <menuseparator/>
+ <menuitem label="&upload.createnewalbum.label;" oncommand="PhotoUpload.doOpenCreateNewAlbumDialog();"/>
+ </menupopup>
+ </menulist>
+ </hbox>
<deck id="uploadStatusDeck" flex="1">
- <hbox align="center">
- <button label="&upload.photos.remove.label;" icon="clear" id="removeAllButton"
- hidden="true"
- disabled="true"
- oncommand="PhotoUpload.removeAllPhotos();"
+ <hbox align="center" pack="end" flex="1">
+ <button label="&upload.all.label;" id="uploadButton" disabled="true"
+ oncommand="PhotoUpload.upload();"
observes="uploadBroadcaster"/>
- <!-- For debugging -->
- <button id="reopenButton" label="close and reopen this window" hidden="true" oncommand="
- window.close();
- window.openDialog('chrome://facebook/content/photoupload/photoupload.xul',
- 'facebook:photoupload', 'all');"/>
- <label class="upload-status" id="uploadStatus"/>
</hbox>
- <hbox>
+ <hbox id="uploadStatusBox" align="center" pack="start" collapsed="true" flex="1">
+ <label class="upload-status" id="uploadStatus"/>
<button label="&upload.cancel.label;" oncommand="PhotoUpload.cancelUpload()"/>
<progressmeter id="uploadProgress" mode="determined" value="0" flex="1"/>
</hbox>
</deck>
- <button label="&upload.all.label;" id="uploadButton" disabled="true"
- oncommand="PhotoUpload.upload();"
- observes="uploadBroadcaster"/>
+
</hbox>
</vbox>

0 comments on commit 9ff988e

Please sign in to comment.