Added upload alert when droping files in the app and select the uploaded files at...
[pithos-web-client] / src / gr / grnet / pithos / web / client / commands / UploadFileCommand.java
index 1c8f1ff..a97f161 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2011 GRNET S.A. All rights reserved.
+ * Copyright 2011-2012 GRNET S.A. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
@@ -38,7 +38,6 @@ import gr.grnet.pithos.web.client.FileUploadDialog;
 import gr.grnet.pithos.web.client.Pithos;
 import gr.grnet.pithos.web.client.foldertree.Folder;
 
-import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.ui.PopupPanel;
 
@@ -67,15 +66,8 @@ public class UploadFileCommand implements Command {
        public void execute() {
                if(containerPanel!=null)
                        containerPanel.hide();
-               displayNewFile();
-       }
-
-       /**
-        * Display the 'new file' dialog for uploading a new file to the system.
-        */
-       private void displayNewFile() {
-        FileUploadDialog dlg = GWT.create(FileUploadDialog.class);
-        dlg.setApp(app);
+               
+        FileUploadDialog dlg = app.getFileUploadDialog();
         dlg.setFolder(folder);
                dlg.center();
        }