Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
Clean up instance files listing webpage.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellsundt committed May 5, 2014
1 parent 12ac691 commit 3eadd5b
Showing 1 changed file with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,14 @@ public class OdkTablesViewInstanceFileInfo extends FlexTable {
// this is the heading for the delete row button.
private static final String DELETE_HEADING = "Delete";

private static final int KEY_COLUMN = 1;
private static final String KEY_HEADING = "Key";
private static final int TABLE_ID_COLUMN = 2;
private static final String TABLE_ID_HEADING = "TableId";
private static final int FILENAME_COLUMN = 3;
private static final int INSTANCE_ID_COLUMN = 1;
private static final String INSTANCE_ID_HEADING = "Instance ID";
private static final int FILENAME_COLUMN = 2;
private static final String FILENAME_HEADING = "Filename";
private static final int DOWNLOAD_COLUMN = 4;
private static final int DOWNLOAD_COLUMN = 3;
private static final String DOWNLOAD_HEADING = "Download";

private static final int numColumns = 5;
private static final int numColumns = 4;

// this is just the tab that opened the table
private AggregateSubTabBase basePanel;
Expand Down Expand Up @@ -150,8 +148,7 @@ public void onSuccess(TableContentsForFilesClient tcc) {
private void setColumnHeadings() {
// create the table headers.
setText(0, DELETE_COLUMN, DELETE_HEADING);
setText(0, KEY_COLUMN, KEY_HEADING);
setText(0, TABLE_ID_COLUMN, TABLE_ID_HEADING);
setText(0, INSTANCE_ID_COLUMN, INSTANCE_ID_HEADING);
setText(0, FILENAME_COLUMN, FILENAME_HEADING);
setText(0, DOWNLOAD_COLUMN, DOWNLOAD_HEADING);
getRowFormatter().addStyleName(0, "titleBar");
Expand Down Expand Up @@ -180,8 +177,8 @@ private void setRows() {
FileSummaryClient sum = fileSummaries.get(j);
setWidget(currentRow, DELETE_COLUMN, new OdkTablesDeleteFileButton(this.basePanel,
currentTable.getTableId(), sum.getId()));
setText(currentRow, KEY_COLUMN, sum.getId());
setText(currentRow, TABLE_ID_COLUMN, sum.getTableId());
String[] args = sum.getFilename().split("/");
setText(currentRow, INSTANCE_ID_COLUMN, args[0]);
setText(currentRow, FILENAME_COLUMN, sum.getFilename());
Widget downloadCol;
if (sum.getDownloadUrl() != null) {
Expand Down

0 comments on commit 3eadd5b

Please sign in to comment.