Revision f5023f13 src/gr/grnet/pithos/web/client/Pithos.java
b/src/gr/grnet/pithos/web/client/Pithos.java | ||
---|---|---|
76 | 76 |
import com.google.gwt.http.client.RequestCallback; |
77 | 77 |
import com.google.gwt.http.client.RequestException; |
78 | 78 |
import com.google.gwt.http.client.Response; |
79 |
import com.google.gwt.http.client.URL; |
|
80 |
import com.google.gwt.i18n.client.DateTimeFormat; |
|
81 |
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat; |
|
79 | 82 |
import com.google.gwt.json.client.JSONArray; |
80 | 83 |
import com.google.gwt.json.client.JSONObject; |
81 | 84 |
import com.google.gwt.json.client.JSONParser; |
... | ... | |
94 | 97 |
import com.google.gwt.user.client.ui.HasVerticalAlignment; |
95 | 98 |
import com.google.gwt.user.client.ui.HorizontalPanel; |
96 | 99 |
import com.google.gwt.user.client.ui.HorizontalSplitPanel; |
97 |
import com.google.gwt.user.client.ui.Image; |
|
98 | 100 |
import com.google.gwt.user.client.ui.RootPanel; |
99 | 101 |
import com.google.gwt.user.client.ui.VerticalPanel; |
100 | 102 |
import com.google.gwt.view.client.SelectionChangeEvent; |
... | ... | |
175 | 177 |
@Source("gr/grnet/pithos/resources/document.png") |
176 | 178 |
ImageResource folders(); |
177 | 179 |
|
178 |
@Source("gr/grnet/pithos/resources/edit_group_22.png") |
|
179 |
ImageResource groups(); |
|
180 |
|
|
181 | 180 |
@Source("gr/grnet/pithos/resources/advancedsettings.png") |
182 | 181 |
ImageResource tools(); |
183 | 182 |
} |
... | ... | |
820 | 819 |
} |
821 | 820 |
|
822 | 821 |
public void deleteFolder(final Folder folder) { |
823 |
String path = getApiPath() + folder.getOwner() + "/" + folder.getContainer() + "?format=json&delimiter=/&prefix=" + folder.getPrefix();
|
|
822 |
String path = getApiPath() + folder.getOwner() + "/" + folder.getContainer() + "?format=json&delimiter=/&prefix=" + URL.encodeQueryString(folder.getPrefix()) + "&t=" + System.currentTimeMillis();
|
|
824 | 823 |
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, path); |
825 |
builder.setHeader("If-Modified-Since", "0"); |
|
826 | 824 |
builder.setHeader("X-Auth-Token", getToken()); |
827 | 825 |
try { |
828 | 826 |
builder.sendRequest("", new RequestCallback() { |
... | ... | |
877 | 875 |
else if (o != null) { |
878 | 876 |
String subdir = o.get("subdir").isString().stringValue(); |
879 | 877 |
subdir = subdir.substring(0, subdir.length() - 1); |
880 |
String path = getApiPath() + getUsername() + "/" + folder.getContainer() + "?format=json&delimiter=/&prefix=" + subdir;
|
|
878 |
String path = getApiPath() + getUsername() + "/" + folder.getContainer() + "?format=json&delimiter=/&prefix=" + URL.encodeQueryString(subdir) + "&t=" + System.currentTimeMillis();
|
|
881 | 879 |
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, path); |
882 |
builder.setHeader("If-Modified-Since", "0"); |
|
883 | 880 |
builder.setHeader("X-Auth-Token", getToken()); |
884 | 881 |
try { |
885 | 882 |
builder.sendRequest("", new RequestCallback() { |
... | ... | |
1004 | 1001 |
PutRequest createFolder = new PutRequest(getApiPath(), targetUsername, path) { |
1005 | 1002 |
@Override |
1006 | 1003 |
public void onSuccess(@SuppressWarnings("unused") Resource result) { |
1007 |
GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, getApiPath(), f.getOwner(), "/" + f.getContainer() + "?format=json&delimiter=/&prefix=" + f.getPrefix(), f) {
|
|
1004 |
GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, getApiPath(), f.getOwner(), "/" + f.getContainer() + "?format=json&delimiter=/&prefix=" + URL.encodeQueryString(f.getPrefix()), f) {
|
|
1008 | 1005 |
|
1009 | 1006 |
@Override |
1010 | 1007 |
public void onSuccess(final Folder _f) { |
Also available in: Unified diff