View the actual version contents when clicking on 'View this version'.
authorPanagiotis Astithas <pastith@gmail.com>
Mon, 14 Jun 2010 14:00:44 +0000 (17:00 +0300)
committerPanagiotis Astithas <pastith@gmail.com>
Mon, 14 Jun 2010 14:00:44 +0000 (17:00 +0300)
src/gr/ebs/gss/client/VersionsList.java

index 6f23f1e..508d842 100644 (file)
@@ -106,7 +106,7 @@ public class VersionsList extends Composite {
                }
                for (final FileResource dto : versions) {
                        HTML restoreVersion = new HTML("<a href='#' class='hidden-link info'><span>"+AbstractImagePrototype.create(images.restore()).getHTML()+"</span><div>Restore this Version</div></a>");
-                       restoreVersion.addClickHandler( new ClickHandler() {
+                       restoreVersion.addClickHandler(new ClickHandler() {
                                @Override
                                public void onClick(ClickEvent event) {
                                        restoreVersion(dto);
@@ -125,7 +125,7 @@ public class VersionsList extends Composite {
                                        String dateString = RestCommand.getDate();
                                        String resource = dto.getUri().substring(app.getApiPath().length()-1, dto.getUri().length());
                                        String sig = app.getCurrentUserResource().getUsername()+" "+RestCommand.calculateSig("GET", dateString, resource, RestCommand.base64decode(app.getToken()));
-                                       String fileUrl = dto.getUri() + "&Authorization=" + URL.encodeComponent(sig) + "&Date="+URL.encodeComponent(dateString);
+                                       String fileUrl = dto.getUri() + "?version=" + dto.getVersion() + "&Authorization=" + URL.encodeComponent(sig) + "&Date="+URL.encodeComponent(dateString);
                                        Window.open(fileUrl, "_BLANK", "");
                                }
                        });