import com.google.gwt.core.client.Scheduler;\r
import com.google.gwt.event.dom.client.ClickEvent;\r
import com.google.gwt.event.dom.client.ClickHandler;\r
+import com.google.gwt.http.client.Response;\r
import com.google.gwt.i18n.client.DateTimeFormat;\r
import com.google.gwt.resources.client.ImageResource;\r
import com.google.gwt.user.client.Window;\r
else\r
app.displayError("System error unable to fetch versions: "+t.getMessage());\r
}\r
+\r
+ @Override\r
+ protected void onUnauthorized(Response response) {\r
+ app.sessionExpired();\r
+ }\r
};\r
getVersions.setHeader("X-Auth-Token", app.getToken());\r
Scheduler.get().scheduleDeferred(getVersions);\r
\r
String[] tagset = null;\r
if (!tags.getText().equals(initialTagText))\r
- tagset = tags.getText().split(",");\r
+ tagset = tags.getText().trim().split(",");\r
final String[] newTags = tagset;\r
\r
if (newFilename != null) {\r
GWT.log("", t);\r
app.displayError("System error modifying file:" + t.getMessage());\r
}\r
+\r
+ @Override\r
+ protected void onUnauthorized(Response response) {\r
+ app.sessionExpired();\r
+ }\r
};\r
updateFile.setHeader("X-Auth-Token", app.getToken());\r
updateFile.setHeader("X-Move-From", file.getUri());\r
GWT.log("", t);\r
app.displayError("System error modifying file:" + t.getMessage());\r
}\r
+\r
+ @Override\r
+ protected void onUnauthorized(Response response) {\r
+ app.sessionExpired();\r
+ }\r
};\r
updateFile.setHeader("X-Auth-Token", app.getToken());\r
if (newTags != null)\r
for (String t : newTags)\r
- updateFile.setHeader("X-Object-Meta-" + t.trim(), "true");\r
+ if (t.length() > 0)\r
+ updateFile.setHeader("X-Object-Meta-" + t.trim(), "true");\r
+ for (String t : file.getTags())\r
+ updateFile.setHeader("X-Object-Meta-" + t.trim(), "~");\r
if (published != null)\r
updateFile.setHeader("X-Object-Public", published.toString());\r
if (newPermissions != null) {\r