Updated folder statistics
authorChristos Stathis <chstath@ebs.gr>
Thu, 22 Sep 2011 09:45:59 +0000 (12:45 +0300)
committerChristos Stathis <chstath@ebs.gr>
Thu, 22 Sep 2011 09:45:59 +0000 (12:45 +0300)
src/gr/grnet/pithos/web/client/FileList.java
src/gr/grnet/pithos/web/client/Pithos.java

index 77b5ceb..72abc2d 100644 (file)
@@ -453,6 +453,7 @@ public class FileList extends Composite {
 
         provider.setList(files);
         selectionModel.clear();
+        app.showFolderStatistics(folderFileCount);
        }
 
        /**
index 6dff284..1618294 100644 (file)
@@ -274,6 +274,8 @@ public class Pithos implements EntryPoint, ResizeHandler {
     private HTML totalBytes;
     
     private HTML usedPercent;
+    
+    private HTML numOfFiles;
 
        @Override
        public void onModuleLoad() {
@@ -303,8 +305,12 @@ public class Pithos implements EntryPoint, ResizeHandler {
         rightside.addStyleName("pithos-rightSide");
         rightside.setSpacing(5);
 
-        HTML folderStatistics = new HTML("5 Files (size: 1.1GB)");
+        HorizontalPanel folderStatistics = new HorizontalPanel();
         folderStatistics.addStyleName("pithos-folderStatistics");
+        numOfFiles = new HTML();
+        folderStatistics.add(numOfFiles);
+        HTML numOfFilesLabel = new HTML("&nbsp;Files");
+        folderStatistics.add(numOfFilesLabel);
         rightside.add(folderStatistics);
         inner.add(rightside);
         inner.setCellHorizontalAlignment(rightside, HasHorizontalAlignment.ALIGN_RIGHT);
@@ -1028,4 +1034,8 @@ public class Pithos implements EntryPoint, ResizeHandler {
        public Folder getSelection() {
                return selectedTree.getSelection();
        }
+
+       public void showFolderStatistics(int folderFileCount) {
+               numOfFiles.setHTML(String.valueOf(folderFileCount));
+       }
 }