|
|
|
@ -66,7 +66,7 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
private ToolBar toolBar = new ToolBar();
|
|
|
|
|
private Button btnPreview;
|
|
|
|
|
private ToggleButton btnGridView;
|
|
|
|
|
// private Button btnGetInfo;
|
|
|
|
|
// private Button btnGetInfo;
|
|
|
|
|
private Button btnGetSharedLink;
|
|
|
|
|
private Button btnPublicLink;
|
|
|
|
|
private Button btnFolderLink;
|
|
|
|
@ -98,13 +98,13 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
*/
|
|
|
|
|
private void initToolBar() {
|
|
|
|
|
|
|
|
|
|
btnGridView = new ToggleButton(ConstantsPortlet.CATEGORIZE, Resources.getIconGridView());
|
|
|
|
|
btnGridView.setToolTip("Categorize");
|
|
|
|
|
btnGridView.setScale(ButtonScale.SMALL);
|
|
|
|
|
btnGridView.setIconAlign(IconAlign.TOP);
|
|
|
|
|
btnGridView.toggle(true);
|
|
|
|
|
btnGridView.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
toolBar.add(btnGridView);
|
|
|
|
|
btnGridView = new ToggleButton(ConstantsPortlet.CATEGORIZE, Resources.getIconGridView());
|
|
|
|
|
btnGridView.setToolTip("Categorize");
|
|
|
|
|
btnGridView.setScale(ButtonScale.SMALL);
|
|
|
|
|
btnGridView.setIconAlign(IconAlign.TOP);
|
|
|
|
|
btnGridView.toggle(true);
|
|
|
|
|
btnGridView.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
toolBar.add(btnGridView);
|
|
|
|
|
|
|
|
|
|
toolBar.add(new SeparatorToolItem());
|
|
|
|
|
|
|
|
|
@ -123,6 +123,14 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
|
|
|
|
|
toolBar.add(btnUploadFile);
|
|
|
|
|
|
|
|
|
|
//DOWNLOAD
|
|
|
|
|
btnDownloadFile = new Button(ConstantsPortlet.DOWNLOADITEM,Resources.getIconDownload());
|
|
|
|
|
btnDownloadFile.setScale(ButtonScale.SMALL);
|
|
|
|
|
btnDownloadFile.setIconAlign(IconAlign.TOP);
|
|
|
|
|
btnDownloadFile.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
|
|
|
|
|
toolBar.add(btnDownloadFile);
|
|
|
|
|
|
|
|
|
|
btnRefreshFolder = new Button(ConstantsPortlet.REFRESH, Resources.getIconRefresh());
|
|
|
|
|
btnRefreshFolder.setScale(ButtonScale.SMALL);
|
|
|
|
|
btnRefreshFolder.setIconAlign(IconAlign.TOP);
|
|
|
|
@ -131,13 +139,13 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
toolBar.add(btnRefreshFolder);
|
|
|
|
|
|
|
|
|
|
toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// btnGetInfo = new Button("Info", Resources.getIconInfo());
|
|
|
|
|
// btnGetInfo.setScale(ButtonScale.SMALL);
|
|
|
|
|
// btnGetInfo.setIconAlign(IconAlign.TOP);
|
|
|
|
|
// btnGetInfo.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
//
|
|
|
|
|
// toolBar.add(btnGetInfo);
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// btnGetInfo = new Button("Info", Resources.getIconInfo());
|
|
|
|
|
// btnGetInfo.setScale(ButtonScale.SMALL);
|
|
|
|
|
// btnGetInfo.setIconAlign(IconAlign.TOP);
|
|
|
|
|
// btnGetInfo.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
//
|
|
|
|
|
// toolBar.add(btnGetInfo);
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
|
|
|
|
|
btnRemoveItem = new Button(ConstantsPortlet.DELETEITEM,
|
|
|
|
|
Resources.getIconDeleteItem());
|
|
|
|
@ -146,8 +154,8 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
btnRemoveItem.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
|
|
|
|
|
toolBar.add(btnRemoveItem);
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
|
|
|
|
|
btnRenameItem = new Button(ConstantsPortlet.RENAMEITEM, Resources.getIconRenameItem());
|
|
|
|
|
btnRenameItem.setScale(ButtonScale.SMALL);
|
|
|
|
@ -167,7 +175,7 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
btnCutItem = new Button("Cut", Resources.getIconCut());
|
|
|
|
|
btnCutItem.setScale(ButtonScale.SMALL);
|
|
|
|
|
btnCutItem.setIconAlign(IconAlign.TOP);
|
|
|
|
|
// toolBar.add(btnCutItem);
|
|
|
|
|
// toolBar.add(btnCutItem);
|
|
|
|
|
|
|
|
|
|
//PASTE
|
|
|
|
|
btnPasteItem = new Button("Paste", Resources.getIconPaste());
|
|
|
|
@ -177,14 +185,6 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
|
|
|
|
|
toolBar.add(btnPasteItem);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
btnDownloadFile = new Button(ConstantsPortlet.DOWNLOADITEM,Resources.getIconDownload());
|
|
|
|
|
btnDownloadFile.setScale(ButtonScale.SMALL);
|
|
|
|
|
btnDownloadFile.setIconAlign(IconAlign.TOP);
|
|
|
|
|
btnDownloadFile.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
|
|
|
|
|
toolBar.add(btnDownloadFile);
|
|
|
|
|
|
|
|
|
|
btnPreview = new Button(ConstantsPortlet.PREVIEW ,Resources.getIconPreview());
|
|
|
|
|
btnPreview.setScale(ButtonScale.SMALL);
|
|
|
|
|
btnPreview.setIconAlign(IconAlign.TOP);
|
|
|
|
@ -198,7 +198,7 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
toolBar.add(btnOpen);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
toolBar.add(new SeparatorToolItem());
|
|
|
|
|
|
|
|
|
|
btnGetSharedLink = new Button("Get Link", Resources.getIconShareLink());
|
|
|
|
@ -214,7 +214,7 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
btnPublicLink.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
|
|
|
|
|
toolBar.add(btnPublicLink);
|
|
|
|
|
toolBar.add(new SeparatorToolItem());
|
|
|
|
|
toolBar.add(new SeparatorToolItem());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
btnFolderLink = new Button("Folder Link", Resources.getIconFolderPublic());
|
|
|
|
@ -223,18 +223,18 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
btnFolderLink.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
|
|
|
|
|
toolBar.add(btnFolderLink);
|
|
|
|
|
toolBar.add(new SeparatorToolItem());
|
|
|
|
|
toolBar.add(new SeparatorToolItem());
|
|
|
|
|
|
|
|
|
|
btnAccessFromDesktop = new Button(ConstantsPortlet.TITLEACCESSWEBDAV, Resources.getIconWebDav());
|
|
|
|
|
btnAccessFromDesktop.setScale(ButtonScale.SMALL);
|
|
|
|
|
btnAccessFromDesktop.setIconAlign(IconAlign.TOP);
|
|
|
|
|
btnAccessFromDesktop.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
btnAccessFromDesktop = new Button(ConstantsPortlet.TITLEACCESSWEBDAV, Resources.getIconWebDav());
|
|
|
|
|
btnAccessFromDesktop.setScale(ButtonScale.SMALL);
|
|
|
|
|
btnAccessFromDesktop.setIconAlign(IconAlign.TOP);
|
|
|
|
|
btnAccessFromDesktop.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
|
|
|
|
|
// toolBar.add(btnAccessFromDesktop);
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(btnAccessFromDesktop);
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
|
|
|
|
|
btnUploadArchive = new Button(ConstantsPortlet.UPLOADARCHIVE, Resources.getIconArchiveUpload());
|
|
|
|
|
btnUploadArchive.setScale(ButtonScale.SMALL);
|
|
|
|
@ -242,8 +242,8 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
btnUploadArchive.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
|
|
|
|
|
|
|
|
toolBar.add(btnUploadArchive);
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
// toolBar.add(new SeparatorToolItem());
|
|
|
|
|
|
|
|
|
|
btnSetPermission= new Button(ConstantsPortlet.CHANGEPERMISSION,Resources.getIconWriteAll());
|
|
|
|
|
btnSetPermission.setScale(ButtonScale.SMALL);
|
|
|
|
@ -253,7 +253,7 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
toolBar.add(btnSetPermission);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO OLD CODE
|
|
|
|
|
//TODO OLD CODE
|
|
|
|
|
toggleGroup = new ToggleButton();
|
|
|
|
|
toggleGroup.setIcon(Resources.getIconToggleGroup());
|
|
|
|
|
toggleGroup.setToggleGroup("viewgrid");
|
|
|
|
@ -269,7 +269,7 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
|
|
|
|
|
switchView(ViewSwitchTypeInResult.Group);
|
|
|
|
|
|
|
|
|
|
// toolBar.add(new FillToolItem());
|
|
|
|
|
// toolBar.add(new FillToolItem());
|
|
|
|
|
|
|
|
|
|
this.activeButtonsOnSelectForOperation(null, false);
|
|
|
|
|
}
|
|
|
|
@ -354,12 +354,12 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
btnPasteItem.setEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
|
|
|
|
//
|
|
|
|
|
// if(fileGridModel.getIdentifier()!=null){
|
|
|
|
|
// CopyAndPaste.copy(fileGridModel.getIdentifier());
|
|
|
|
|
// btnPasteItem.setEnabled(true);
|
|
|
|
|
// }
|
|
|
|
|
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
|
|
|
|
//
|
|
|
|
|
// if(fileGridModel.getIdentifier()!=null){
|
|
|
|
|
// CopyAndPaste.copy(fileGridModel.getIdentifier());
|
|
|
|
|
// btnPasteItem.setEnabled(true);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -374,12 +374,12 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
btnPasteItem.setEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
|
|
|
|
//
|
|
|
|
|
// if(fileGridModel.getIdentifier()!=null){
|
|
|
|
|
// CopyAndPaste.copy(fileGridModel.getIdentifier());
|
|
|
|
|
// btnPasteItem.setEnabled(true);
|
|
|
|
|
// }
|
|
|
|
|
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
|
|
|
|
//
|
|
|
|
|
// if(fileGridModel.getIdentifier()!=null){
|
|
|
|
|
// CopyAndPaste.copy(fileGridModel.getIdentifier());
|
|
|
|
|
// btnPasteItem.setEnabled(true);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -447,17 +447,17 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// btnGetInfo.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void componentSelected(ButtonEvent ce) {
|
|
|
|
|
//
|
|
|
|
|
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
|
|
|
|
//
|
|
|
|
|
// AppController.getEventBus().fireEvent(new GetInfoEvent(fileGridModel));
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// btnGetInfo.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void componentSelected(ButtonEvent ce) {
|
|
|
|
|
//
|
|
|
|
|
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
|
|
|
|
//
|
|
|
|
|
// AppController.getEventBus().fireEvent(new GetInfoEvent(fileGridModel));
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
btnRenameItem.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
|
|
|
|
|
|
|
|
@ -510,8 +510,8 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
if(fileGridModel!=null && fileGridModel.isVreFolder()){
|
|
|
|
|
|
|
|
|
|
AppController.getEventBus().fireEvent(new VREChangePermissionsEvent(fileGridModel));
|
|
|
|
|
// DialogPermission dialog = new DialogPermission(fileGridModel);
|
|
|
|
|
// dialog.show();
|
|
|
|
|
// DialogPermission dialog = new DialogPermission(fileGridModel);
|
|
|
|
|
// dialog.show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -550,19 +550,19 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
if(fileGridModel!=null){
|
|
|
|
|
if(fileGridModel.isDirectory())
|
|
|
|
|
AppController.getEventBus().fireEvent(new DoubleClickElementSelectedEvent(fileGridModel));
|
|
|
|
|
// else if(fileGridModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.REPORT) || fileGridModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.REPORT_TEMPLATE))
|
|
|
|
|
// AppController.getEventBus().fireEvent(new OpenReportsEvent(fileGridModel));
|
|
|
|
|
// else if(fileGridModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.REPORT) || fileGridModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.REPORT_TEMPLATE))
|
|
|
|
|
// AppController.getEventBus().fireEvent(new OpenReportsEvent(fileGridModel));
|
|
|
|
|
else if(fileGridModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.EXTERNAL_URL)){
|
|
|
|
|
AppController.getEventBus().fireEvent(new ShowUrlEvent(fileGridModel));
|
|
|
|
|
|
|
|
|
|
}else
|
|
|
|
|
AppController.getEventBus().fireEvent(new FileDownloadEvent(fileGridModel.getIdentifier(), fileGridModel.getName(), DownloadType.SHOW,fileGridModel.isDirectory() || fileGridModel.isVreFolder(), null));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
btnAccessFromDesktop.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
|
|
|
|
btnAccessFromDesktop.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void componentSelected(ButtonEvent ce) {
|
|
|
|
@ -677,7 +677,7 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
switch(target.getGXTFolderItemType()){
|
|
|
|
|
|
|
|
|
|
case EXTERNAL_IMAGE:
|
|
|
|
|
// contextMenu.getItemByItemId(ConstantsExplorer.PRW).setVisible(true);
|
|
|
|
|
// contextMenu.getItemByItemId(ConstantsExplorer.PRW).setVisible(true);
|
|
|
|
|
this.btnPreview.enable();
|
|
|
|
|
this.btnPublicLink.enable();
|
|
|
|
|
break;
|
|
|
|
@ -688,10 +688,10 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
this.btnPublicLink.enable();
|
|
|
|
|
break;
|
|
|
|
|
case EXTERNAL_URL:
|
|
|
|
|
// contextMenu.getItemByItemId(ConstantsExplorer.LNK).setVisible(true);
|
|
|
|
|
// contextMenu.getItemByItemId(ConstantsExplorer.LNK).setVisible(true);
|
|
|
|
|
break;
|
|
|
|
|
case REPORT_TEMPLATE:
|
|
|
|
|
// contextMenu.getItemByItemId(ConstantsExplorer.ORT).setVisible(true);
|
|
|
|
|
// contextMenu.getItemByItemId(ConstantsExplorer.ORT).setVisible(true);
|
|
|
|
|
break;
|
|
|
|
|
case REPORT:
|
|
|
|
|
break;
|
|
|
|
@ -707,7 +707,7 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
case DOCUMENT:
|
|
|
|
|
break;
|
|
|
|
|
case URL_DOCUMENT:
|
|
|
|
|
// contextMenu.getItemByItemId(ConstantsExplorer.LNK).setVisible(true);
|
|
|
|
|
// contextMenu.getItemByItemId(ConstantsExplorer.LNK).setVisible(true);
|
|
|
|
|
break;
|
|
|
|
|
case METADATA:
|
|
|
|
|
break;
|
|
|
|
@ -803,15 +803,15 @@ public class GxtToolBarItemFunctionality {
|
|
|
|
|
*/
|
|
|
|
|
public void activeAllButtonWithoutGroupView(boolean active){
|
|
|
|
|
|
|
|
|
|
btnRemoveItem.setEnabled(active);
|
|
|
|
|
btnRenameItem.setEnabled(active);
|
|
|
|
|
btnGetSharedLink.setEnabled(active);
|
|
|
|
|
// btnGetInfo.setEnabled(active);
|
|
|
|
|
btnDownloadFile.setEnabled(active);
|
|
|
|
|
btnPreview.setEnabled(active);
|
|
|
|
|
btnOpen.setEnabled(active);
|
|
|
|
|
btnPublicLink.setEnabled(active);
|
|
|
|
|
btnFolderLink.setEnabled(active);
|
|
|
|
|
btnRemoveItem.setEnabled(active);
|
|
|
|
|
btnRenameItem.setEnabled(active);
|
|
|
|
|
btnGetSharedLink.setEnabled(active);
|
|
|
|
|
// btnGetInfo.setEnabled(active);
|
|
|
|
|
btnDownloadFile.setEnabled(active);
|
|
|
|
|
btnPreview.setEnabled(active);
|
|
|
|
|
btnOpen.setEnabled(active);
|
|
|
|
|
btnPublicLink.setEnabled(active);
|
|
|
|
|
btnFolderLink.setEnabled(active);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|