package gr.grnet.pithos.web.client;
-import gr.grnet.pithos.web.client.foldertree.File;
-import gr.grnet.pithos.web.client.foldertree.Folder;
-import gr.grnet.pithos.web.client.foldertree.FolderTreeView;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
import com.google.gwt.cell.client.Cell.Context;
import com.google.gwt.cell.client.ImageResourceCell;
import com.google.gwt.cell.client.SafeHtmlCell;
import com.google.gwt.view.client.MultiSelectionModel;
import com.google.gwt.view.client.ProvidesKey;
import com.google.gwt.view.client.SelectionChangeEvent;
+import gr.grnet.pithos.web.client.foldertree.File;
+import gr.grnet.pithos.web.client.foldertree.Folder;
+import gr.grnet.pithos.web.client.foldertree.FolderTreeView;
+
+import java.util.*;
/**
* A composite that displays the list of files in a particular folder.
if (DOM.eventGetType(event) == Event.ONDBLCLICK)
if (getSelectedFiles().size() == 1) {
File file = getSelectedFiles().get(0);
- Window.open(Pithos.getStorageAPIURL() + file.getOwnerID() + file.getUri(), "_blank", "");
+ Window.open(Pithos.getStorageViewURL() + file.getOwnerID() + file.getUri(), "_blank", "");
event.preventDefault();
return;
}
LOG("Computed STORAGE_API_URL = ", STORAGE_API_URL);
}
+
+ public static final String STORAGE_VIEW_URL;
+ static {
+ final String viewURL = getFromOtherPropertiesOrNull("STORAGE_VIEW_URL");
+ if(viewURL != null) {
+ STORAGE_VIEW_URL = viewURL;
+ }
+ else {
+ STORAGE_VIEW_URL = STORAGE_API_URL;
+ }
+
+ LOG("Computed STORAGE_VIEW_URL = ", STORAGE_VIEW_URL);
+ }
+
public static final String USER_CATALOGS_API_URL;
static {
if(OTHERPROPS_USER_CATALOGS_API_URL != null) {
return STORAGE_API_URL;
}
+ public static String getStorageViewURL() {
+ return STORAGE_VIEW_URL;
+ }
+
public static String getUserCatalogsURL() {
return USER_CATALOGS_API_URL;
}