From f54396c5525cd7a7cbd3bd7b459c36610577be3c Mon Sep 17 00:00:00 2001 From: Christos Stathis Date: Fri, 8 Jul 2011 11:41:08 +0300 Subject: [PATCH] Implemented download (with the authentication passed as parameter): --- .../gr/grnet/pithos/web/client/FileContextMenu.java | 16 ++-------------- .../src/gr/grnet/pithos/web/client/FileMenu.java | 2 +- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/web_client/src/gr/grnet/pithos/web/client/FileContextMenu.java b/web_client/src/gr/grnet/pithos/web/client/FileContextMenu.java index 9191f1e..7c562f8 100644 --- a/web_client/src/gr/grnet/pithos/web/client/FileContextMenu.java +++ b/web_client/src/gr/grnet/pithos/web/client/FileContextMenu.java @@ -171,25 +171,13 @@ public class FileContextMenu extends PopupPanel { propItem = new MenuItem("" + AbstractImagePrototype.create(newImages.viewText()).getHTML() + " Properties", true, new PropertiesCommand(this, images, 0)); contextMenu.addItem(propItem); - - String[] link = {"", ""}; - gss.getTopPanel().getFileMenu().createDownloadLink(link, false); - // The command that does some validation before downloading a file. - Command downloadCmd = new Command() { - + downloadItem = new MenuItem("" + AbstractImagePrototype.create(newImages.download()).getHTML() + " Download", true, new Command() { @Override public void execute() { - hide(); - GSS.get().getTopPanel().getFileMenu().preDownloadCheck(); } - }; - downloadItem = new MenuItem("" + link[0] + AbstractImagePrototype.create(newImages.download()).getHTML() + " Download" + link[1] + "", true, downloadCmd); + }); contextMenu.addItem(downloadItem); - gss.getTopPanel().getFileMenu().createDownloadLink(link, true); - saveAsItem = new MenuItem("" + link[0] + AbstractImagePrototype.create(newImages.download()).getHTML() + " Save As" + link[1] + "", true, downloadCmd); - contextMenu.addItem(saveAsItem); - final Command unselectAllCommand = new Command() { @Override diff --git a/web_client/src/gr/grnet/pithos/web/client/FileMenu.java b/web_client/src/gr/grnet/pithos/web/client/FileMenu.java index 0ffdd70..66d151d 100644 --- a/web_client/src/gr/grnet/pithos/web/client/FileMenu.java +++ b/web_client/src/gr/grnet/pithos/web/client/FileMenu.java @@ -151,7 +151,7 @@ public class FileMenu extends PopupPanel implements ClickHandler { void createDownloadLink(String[] link, boolean forceDownload) { String downloadURL = getDownloadURL(); if (!downloadURL.isEmpty()) { - link[0] = ""; link[1] = ""; } -- 1.7.10.4