Revision f55cf326 web_client/src/gr/grnet/pithos/web/client/FileList.java
b/web_client/src/gr/grnet/pithos/web/client/FileList.java | ||
---|---|---|
278 | 278 |
} |
279 | 279 |
}; |
280 | 280 |
|
281 |
celltable = new DragAndDropCellTable<File>(GSS.VISIBLE_FILE_COUNT, resources, keyProvider);
|
|
281 |
celltable = new DragAndDropCellTable<File>(Pithos.VISIBLE_FILE_COUNT, resources, keyProvider);
|
|
282 | 282 |
celltable.setWidth("100%"); |
283 | 283 |
celltable.setStyleName("pithos-List"); |
284 | 284 |
|
... | ... | |
465 | 465 |
@Override |
466 | 466 |
public void onSelectionChange(SelectionChangeEvent event) { |
467 | 467 |
if(getSelectedFiles().size() == 1) |
468 |
GSS.get().setCurrentSelection(getSelectedFiles().get(0));
|
|
468 |
Pithos.get().setCurrentSelection(getSelectedFiles().get(0));
|
|
469 | 469 |
else |
470 |
GSS.get().setCurrentSelection(getSelectedFiles());
|
|
470 |
Pithos.get().setCurrentSelection(getSelectedFiles());
|
|
471 | 471 |
} |
472 | 472 |
}; |
473 | 473 |
selectionModel.addSelectionChangeHandler(selectionHandler); |
474 | 474 |
|
475 | 475 |
celltable.setSelectionModel(selectionModel, GSSSelectionEventManager.<File> createDefaultManager()); |
476 |
celltable.setPageSize(GSS.VISIBLE_FILE_COUNT);
|
|
476 |
celltable.setPageSize(Pithos.VISIBLE_FILE_COUNT);
|
|
477 | 477 |
|
478 | 478 |
sinkEvents(Event.ONCONTEXTMENU); |
479 | 479 |
// sinkEvents(Event.ONMOUSEUP); |
... | ... | |
481 | 481 |
// sinkEvents(Event.ONCLICK); |
482 | 482 |
// sinkEvents(Event.ONKEYDOWN); |
483 | 483 |
// sinkEvents(Event.ONDBLCLICK); |
484 |
GSS.preventIESelection();
|
|
484 |
Pithos.preventIESelection();
|
|
485 | 485 |
} |
486 | 486 |
|
487 | 487 |
public List<File> getSelectedFiles() { |
... | ... | |
541 | 541 |
// event.preventDefault(); |
542 | 542 |
// } else if (DOM.eventGetType(event) == Event.ONDBLCLICK) |
543 | 543 |
// if (getSelectedFiles().size() == 1) { |
544 |
// GSS app = GSS.get();
|
|
544 |
// Pithos app = Pithos.get();
|
|
545 | 545 |
// File file = getSelectedFiles().get(0); |
546 | 546 |
// Window.open(file.getUri(), "_blank", ""); |
547 | 547 |
// event.preventDefault(); |
... | ... | |
555 | 555 |
*/ |
556 | 556 |
void update(boolean sort) { |
557 | 557 |
int count = folderFileCount; |
558 |
int max = startIndex + GSS.VISIBLE_FILE_COUNT;
|
|
558 |
int max = startIndex + Pithos.VISIBLE_FILE_COUNT;
|
|
559 | 559 |
if (max > count) |
560 | 560 |
max = count; |
561 | 561 |
folderTotalSize = 0; |
... | ... | |
565 | 565 |
} |
566 | 566 |
if (folderFileCount == 0) { |
567 | 567 |
showingStats = "no files"; |
568 |
} else if (folderFileCount < GSS.VISIBLE_FILE_COUNT) {
|
|
568 |
} else if (folderFileCount < Pithos.VISIBLE_FILE_COUNT) {
|
|
569 | 569 |
if (folderFileCount == 1) |
570 | 570 |
showingStats = "1 file"; |
571 | 571 |
else |
... | ... | |
622 | 622 |
* Update status panel with currently showing file stats. |
623 | 623 |
*/ |
624 | 624 |
public void updateCurrentlyShowingStats() { |
625 |
GSS.get().getStatusPanel().updateCurrentlyShowing(showingStats);
|
|
625 |
Pithos.get().getStatusPanel().updateCurrentlyShowing(showingStats);
|
|
626 | 626 |
} |
627 | 627 |
|
628 | 628 |
/** |
... | ... | |
652 | 652 |
} |
653 | 653 |
} |
654 | 654 |
|
655 |
if(files.size() > GSS.VISIBLE_FILE_COUNT){
|
|
655 |
if(files.size() > Pithos.VISIBLE_FILE_COUNT){
|
|
656 | 656 |
pagerBottom.setVisible(true); |
657 | 657 |
pagerTop.setVisible(true); |
658 | 658 |
} |
... | ... | |
781 | 781 |
* Shows the files in the cellTable |
782 | 782 |
*/ |
783 | 783 |
private void showCellTable(){ |
784 |
if(files.size()>GSS.VISIBLE_FILE_COUNT){
|
|
784 |
if(files.size()> Pithos.VISIBLE_FILE_COUNT){
|
|
785 | 785 |
pagerBottom.setVisible(true); |
786 | 786 |
pagerTop.setVisible(true); |
787 | 787 |
} |
Also available in: Unified diff