Changed data catalogue icon
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@129822 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6d4de95867
commit
7e168ce95c
|
@ -433,5 +433,8 @@ public interface Icons extends ClientBundle {
|
||||||
*/
|
*/
|
||||||
@Source("icons/info.png")
|
@Source("icons/info.png")
|
||||||
ImageResource information();
|
ImageResource information();
|
||||||
|
|
||||||
|
@Source("icons/datacataloguepublish.png")
|
||||||
|
ImageResource datacataloguepublish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,19 @@ public class Resources {
|
||||||
return AbstractImagePrototype.create(ICONS.tex());
|
return AbstractImagePrototype.create(ICONS.tex());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the data catalogue publish.
|
||||||
|
*
|
||||||
|
* @return the data catalogue publish
|
||||||
|
*/
|
||||||
|
public static AbstractImagePrototype getIconDataCataloguePublish(){
|
||||||
|
|
||||||
|
return AbstractImagePrototype.create(ICONS.datacataloguepublish());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the icon postscript.
|
* Gets the icon postscript.
|
||||||
*
|
*
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 644 B |
|
@ -68,7 +68,7 @@ public class ContextMenuTree {
|
||||||
* Instantiates a new context menu tree.
|
* Instantiates a new context menu tree.
|
||||||
*/
|
*/
|
||||||
public ContextMenuTree() {
|
public ContextMenuTree() {
|
||||||
this.contextMenu.setWidth(140);
|
this.contextMenu.setWidth(140);
|
||||||
this.listSelectedItems = new ArrayList<FileModel>();
|
this.listSelectedItems = new ArrayList<FileModel>();
|
||||||
createContextMenu();
|
createContextMenu();
|
||||||
|
|
||||||
|
@ -82,13 +82,13 @@ public class ContextMenuTree {
|
||||||
//SPECIFIC OPERATION
|
//SPECIFIC OPERATION
|
||||||
|
|
||||||
//Preview Image
|
//Preview Image
|
||||||
MenuItem previewImage = new MenuItem();
|
MenuItem previewImage = new MenuItem();
|
||||||
previewImage.setId(WorkspaceOperation.PREVIEW.getId());
|
previewImage.setId(WorkspaceOperation.PREVIEW.getId());
|
||||||
previewImage.setText(ConstantsExplorer.MESSAGE_PREVIEW);
|
previewImage.setText(ConstantsExplorer.MESSAGE_PREVIEW);
|
||||||
previewImage.setIcon(Resources.getIconPreview());
|
previewImage.setIcon(Resources.getIconPreview());
|
||||||
|
|
||||||
previewImage.addSelectionListener(new SelectionListener<MenuEvent>() {
|
previewImage.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
// FileModel selected = treePanel.getSelectionModel().getSelectedItem();
|
// FileModel selected = treePanel.getSelectionModel().getSelectedItem();
|
||||||
|
|
||||||
|
@ -100,19 +100,18 @@ public class ContextMenuTree {
|
||||||
|
|
||||||
//clearListSelectedItems();
|
//clearListSelectedItems();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(previewImage);
|
|
||||||
|
|
||||||
|
contextMenu.add(previewImage);
|
||||||
|
|
||||||
//Open Url
|
//Open Url
|
||||||
MenuItem openUrl = new MenuItem();
|
MenuItem openUrl = new MenuItem();
|
||||||
openUrl.setId(WorkspaceOperation.LINK.getId());
|
openUrl.setId(WorkspaceOperation.LINK.getId());
|
||||||
openUrl.setText(ConstantsExplorer.MESSAGE_OPEN_URL);
|
openUrl.setText(ConstantsExplorer.MESSAGE_OPEN_URL);
|
||||||
openUrl.setIcon(Resources.getIconOpenUrl());
|
openUrl.setIcon(Resources.getIconOpenUrl());
|
||||||
|
|
||||||
openUrl.addSelectionListener(new SelectionListener<MenuEvent>() {
|
openUrl.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
FileModel selected = listSelectedItems.get(0);
|
FileModel selected = listSelectedItems.get(0);
|
||||||
|
|
||||||
|
@ -121,37 +120,35 @@ public class ContextMenuTree {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(openUrl);
|
|
||||||
|
|
||||||
|
contextMenu.add(openUrl);
|
||||||
|
|
||||||
//Open Report Template
|
//Open Report Template
|
||||||
MenuItem openReportTemplate = new MenuItem();
|
MenuItem openReportTemplate = new MenuItem();
|
||||||
openReportTemplate.setId(WorkspaceOperation.OPEN_REPORT_TEMPLATE.getId());
|
openReportTemplate.setId(WorkspaceOperation.OPEN_REPORT_TEMPLATE.getId());
|
||||||
openReportTemplate.setText(ConstantsExplorer.MESSAGE_OPEN_REPORT_TEMPLATE);
|
openReportTemplate.setText(ConstantsExplorer.MESSAGE_OPEN_REPORT_TEMPLATE);
|
||||||
openReportTemplate.setIcon(Resources.getIconShow());
|
openReportTemplate.setIcon(Resources.getIconShow());
|
||||||
|
|
||||||
openReportTemplate.addSelectionListener(new SelectionListener<MenuEvent>() {
|
openReportTemplate.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
FileModel selected = listSelectedItems.get(0);
|
FileModel selected = listSelectedItems.get(0);
|
||||||
|
|
||||||
if(selected!=null){
|
if(selected!=null){
|
||||||
eventBus.fireEvent(new OpenReportsEvent(selected));
|
eventBus.fireEvent(new OpenReportsEvent(selected));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(openReportTemplate);
|
|
||||||
|
|
||||||
|
contextMenu.add(openReportTemplate);
|
||||||
|
|
||||||
//Open Report Template
|
//Open Report Template
|
||||||
MenuItem openReport = new MenuItem();
|
MenuItem openReport = new MenuItem();
|
||||||
openReport.setId(WorkspaceOperation.OPEN_REPORT.getId());
|
openReport.setId(WorkspaceOperation.OPEN_REPORT.getId());
|
||||||
openReport.setText(ConstantsExplorer.MESSAGE_OPEN_REPORT);
|
openReport.setText(ConstantsExplorer.MESSAGE_OPEN_REPORT);
|
||||||
openReport.setIcon(Resources.getIconShow());
|
openReport.setIcon(Resources.getIconShow());
|
||||||
|
|
||||||
openReport.addSelectionListener(new SelectionListener<MenuEvent>() {
|
openReport.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
@ -167,67 +164,65 @@ public class ContextMenuTree {
|
||||||
|
|
||||||
contextMenu.add(openReport);
|
contextMenu.add(openReport);
|
||||||
contextMenu.add(new SeparatorMenuItem());
|
contextMenu.add(new SeparatorMenuItem());
|
||||||
|
|
||||||
//END SPECIFIC OPERATION
|
//END SPECIFIC OPERATION
|
||||||
|
|
||||||
|
MenuItem mnGetInfo = new MenuItem();
|
||||||
MenuItem mnGetInfo = new MenuItem();
|
|
||||||
mnGetInfo.setId(WorkspaceOperation.GET_INFO.getId());
|
mnGetInfo.setId(WorkspaceOperation.GET_INFO.getId());
|
||||||
mnGetInfo.setText(ConstantsExplorer.MESSAGE_GET_INFO);
|
mnGetInfo.setText(ConstantsExplorer.MESSAGE_GET_INFO);
|
||||||
mnGetInfo.setIcon(Resources.getIconInfo());
|
mnGetInfo.setIcon(Resources.getIconInfo());
|
||||||
|
|
||||||
mnGetInfo.addSelectionListener(new SelectionListener<MenuEvent>() {
|
mnGetInfo.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel sel : listSelectedItems) {
|
for (FileModel sel : listSelectedItems) {
|
||||||
eventBus.fireEvent(new GetInfoEvent(sel));
|
eventBus.fireEvent(new GetInfoEvent(sel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(mnGetInfo);
|
contextMenu.add(mnGetInfo);
|
||||||
|
|
||||||
|
|
||||||
//SHARE LINK
|
//SHARE LINK
|
||||||
MenuItem mnGetLink = new MenuItem();
|
MenuItem mnGetLink = new MenuItem();
|
||||||
mnGetLink.setId(WorkspaceOperation.SHARE_LINK.getId());
|
mnGetLink.setId(WorkspaceOperation.SHARE_LINK.getId());
|
||||||
mnGetLink.setText(ConstantsExplorer.MESSAGE_SHARE_LINK);
|
mnGetLink.setText(ConstantsExplorer.MESSAGE_SHARE_LINK);
|
||||||
mnGetLink.setIcon(Resources.getIconShareLink());
|
mnGetLink.setIcon(Resources.getIconShareLink());
|
||||||
|
|
||||||
mnGetLink.addSelectionListener(new SelectionListener<MenuEvent>() {
|
mnGetLink.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel sel : listSelectedItems) {
|
for (FileModel sel : listSelectedItems) {
|
||||||
eventBus.fireEvent(new GetShareLinkEvent(sel));
|
eventBus.fireEvent(new GetShareLinkEvent(sel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(mnGetLink);
|
contextMenu.add(mnGetLink);
|
||||||
|
|
||||||
//PUBLIC LINK
|
//PUBLIC LINK
|
||||||
MenuItem mnPublicLink = new MenuItem();
|
MenuItem mnPublicLink = new MenuItem();
|
||||||
mnPublicLink.setId(WorkspaceOperation.PUBLIC_LINK.getId());
|
mnPublicLink.setId(WorkspaceOperation.PUBLIC_LINK.getId());
|
||||||
mnPublicLink.setText(ConstantsExplorer.MESSAGE_PUBLIC_LINK);
|
mnPublicLink.setText(ConstantsExplorer.MESSAGE_PUBLIC_LINK);
|
||||||
mnPublicLink.setIcon(Resources.getIconPublicLink());
|
mnPublicLink.setIcon(Resources.getIconPublicLink());
|
||||||
|
|
||||||
mnPublicLink.addSelectionListener(new SelectionListener<MenuEvent>() {
|
mnPublicLink.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel sel : listSelectedItems) {
|
for (FileModel sel : listSelectedItems) {
|
||||||
eventBus.fireEvent(new GetPublicLinkEvent(sel));
|
eventBus.fireEvent(new GetPublicLinkEvent(sel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(mnPublicLink);
|
contextMenu.add(mnPublicLink);
|
||||||
|
|
||||||
contextMenu.add(new SeparatorMenuItem());
|
contextMenu.add(new SeparatorMenuItem());
|
||||||
|
|
||||||
MenuItem mnHistory = new MenuItem();
|
MenuItem mnHistory = new MenuItem();
|
||||||
mnHistory.setIcon(Resources.getIconHistory());
|
mnHistory.setIcon(Resources.getIconHistory());
|
||||||
mnHistory.setId(WorkspaceOperation.HISTORY.getId());
|
mnHistory.setId(WorkspaceOperation.HISTORY.getId());
|
||||||
mnHistory.setText(ConstantsExplorer.HISTORY);
|
mnHistory.setText(ConstantsExplorer.HISTORY);
|
||||||
|
|
||||||
mnHistory.addSelectionListener(new SelectionListener<MenuEvent>() {
|
mnHistory.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
|
|
||||||
|
@ -242,13 +237,13 @@ public class ContextMenuTree {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
contextMenu.add(mnHistory);
|
contextMenu.add(mnHistory);
|
||||||
|
|
||||||
//ACCOUNTING READ
|
//ACCOUNTING READ
|
||||||
mnRead = new MenuItem();
|
mnRead = new MenuItem();
|
||||||
mnRead.setIcon(Resources.getIconRead());
|
mnRead.setIcon(Resources.getIconRead());
|
||||||
mnRead.setId(WorkspaceOperation.ACCREAD.getId());
|
mnRead.setId(WorkspaceOperation.ACCREAD.getId());
|
||||||
mnRead.setText(ConstantsExplorer.ACCREAD);
|
mnRead.setText(ConstantsExplorer.ACCREAD);
|
||||||
|
|
||||||
mnRead.addSelectionListener(new SelectionListener<MenuEvent>() {
|
mnRead.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
|
|
||||||
|
@ -265,14 +260,14 @@ public class ContextMenuTree {
|
||||||
});
|
});
|
||||||
|
|
||||||
//COMMENTED AT 29/08/2013
|
//COMMENTED AT 29/08/2013
|
||||||
// contextMenu.add(mnRead);
|
// contextMenu.add(mnRead);
|
||||||
|
|
||||||
contextMenu.add(new SeparatorMenuItem());
|
contextMenu.add(new SeparatorMenuItem());
|
||||||
|
|
||||||
MenuItem insertFolder = new MenuItem();
|
MenuItem insertFolder = new MenuItem();
|
||||||
insertFolder.setId(WorkspaceOperation.INSERT_FOLDER.getId());
|
insertFolder.setId(WorkspaceOperation.INSERT_FOLDER.getId());
|
||||||
insertFolder.setText(ConstantsExplorer.MESSAGE_ADD_FOLDER);
|
insertFolder.setText(ConstantsExplorer.MESSAGE_ADD_FOLDER);
|
||||||
insertFolder.setIcon(Resources.getIconAddFolder());
|
insertFolder.setIcon(Resources.getIconAddFolder());
|
||||||
|
|
||||||
insertFolder.addSelectionListener(new SelectionListener<MenuEvent>() {
|
insertFolder.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
@ -286,13 +281,13 @@ public class ContextMenuTree {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(insertFolder);
|
contextMenu.add(insertFolder);
|
||||||
|
|
||||||
|
|
||||||
MenuItem createShareFolder = new MenuItem();
|
MenuItem createShareFolder = new MenuItem();
|
||||||
createShareFolder.setId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId());
|
createShareFolder.setId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId());
|
||||||
createShareFolder.setText(ConstantsExplorer.MESSAGE_ADD_SHARED_FOLDER);
|
createShareFolder.setText(ConstantsExplorer.MESSAGE_ADD_SHARED_FOLDER);
|
||||||
createShareFolder.setIcon(Resources.getIconSharedFolder());
|
createShareFolder.setIcon(Resources.getIconSharedFolder());
|
||||||
|
|
||||||
createShareFolder.addSelectionListener(new SelectionListener<MenuEvent>() {
|
createShareFolder.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
@ -304,19 +299,19 @@ public class ContextMenuTree {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
contextMenu.add(createShareFolder);
|
contextMenu.add(createShareFolder);
|
||||||
|
|
||||||
// publish on data catalogue
|
// publish on data catalogue
|
||||||
MenuItem publishOnDataCatalogue = new MenuItem();
|
MenuItem publishOnDataCatalogue = new MenuItem();
|
||||||
publishOnDataCatalogue.setId(WorkspaceOperation.PUBLISH_ON_DATA_CATALOGUE.getId());
|
publishOnDataCatalogue.setId(WorkspaceOperation.PUBLISH_ON_DATA_CATALOGUE.getId());
|
||||||
publishOnDataCatalogue.setText(ConstantsExplorer.MESSAGE_DATA_CATALOGUE_PUBLISH);
|
publishOnDataCatalogue.setText(ConstantsExplorer.MESSAGE_DATA_CATALOGUE_PUBLISH);
|
||||||
publishOnDataCatalogue.setIcon(Resources.getIconPublicLink()); // TODO change icon
|
publishOnDataCatalogue.setIcon(Resources.getIconDataCataloguePublish()); // TODO change icon
|
||||||
|
|
||||||
publishOnDataCatalogue.addSelectionListener(new SelectionListener<MenuEvent>() {
|
publishOnDataCatalogue.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
FileModel sourceFileModel = listSelectedItems.get(0);
|
FileModel sourceFileModel = listSelectedItems.get(0);
|
||||||
String folderId = sourceFileModel.getIdentifier();
|
String folderId = sourceFileModel.getIdentifier();
|
||||||
|
|
||||||
if (sourceFileModel != null) {
|
if (sourceFileModel != null) {
|
||||||
eventBus.fireEvent(new PublishOnDataCatalogueEvent(folderId));
|
eventBus.fireEvent(new PublishOnDataCatalogueEvent(folderId));
|
||||||
|
@ -324,13 +319,13 @@ public class ContextMenuTree {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
publishOnDataCatalogue.setVisible(false);
|
publishOnDataCatalogue.setVisible(false);
|
||||||
contextMenu.add(publishOnDataCatalogue);
|
contextMenu.add(publishOnDataCatalogue);
|
||||||
|
|
||||||
|
|
||||||
MenuItem editPermissions = new MenuItem();
|
MenuItem editPermissions = new MenuItem();
|
||||||
editPermissions.setId(WorkspaceOperation.EDIT_PERMISSIONS.getId());
|
editPermissions.setId(WorkspaceOperation.EDIT_PERMISSIONS.getId());
|
||||||
editPermissions.setText(ConstantsExplorer.EDIT_PERMISSIONS);
|
editPermissions.setText(ConstantsExplorer.EDIT_PERMISSIONS);
|
||||||
editPermissions.setIcon(Resources.getIconPermissions());
|
editPermissions.setIcon(Resources.getIconPermissions());
|
||||||
|
|
||||||
editPermissions.addSelectionListener(new SelectionListener<MenuEvent>() {
|
editPermissions.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
@ -343,17 +338,16 @@ public class ContextMenuTree {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(editPermissions);
|
contextMenu.add(editPermissions);
|
||||||
|
|
||||||
|
|
||||||
//Add Url
|
//Add Url
|
||||||
MenuItem addUrl = new MenuItem();
|
MenuItem addUrl = new MenuItem();
|
||||||
addUrl.setId(WorkspaceOperation.ADD_URL.getId());
|
addUrl.setId(WorkspaceOperation.ADD_URL.getId());
|
||||||
addUrl.setText(ConstantsExplorer.MESSAGE_ADD_URL);
|
addUrl.setText(ConstantsExplorer.MESSAGE_ADD_URL);
|
||||||
addUrl.setIcon(Resources.getIconAddUrl());
|
addUrl.setIcon(Resources.getIconAddUrl());
|
||||||
|
|
||||||
addUrl.addSelectionListener(new SelectionListener<MenuEvent>() {
|
addUrl.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
FileModel selected = listSelectedItems.get(0);
|
FileModel selected = listSelectedItems.get(0);
|
||||||
|
|
||||||
|
@ -363,28 +357,28 @@ public class ContextMenuTree {
|
||||||
eventBus.fireEvent(new CreateUrlEvent(null, parent));
|
eventBus.fireEvent(new CreateUrlEvent(null, parent));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(addUrl);
|
contextMenu.add(addUrl);
|
||||||
contextMenu.add(new SeparatorMenuItem());
|
contextMenu.add(new SeparatorMenuItem());
|
||||||
|
|
||||||
MenuItem copy = new MenuItem();
|
MenuItem copy = new MenuItem();
|
||||||
copy.setId(WorkspaceOperation.COPY.getId());
|
copy.setId(WorkspaceOperation.COPY.getId());
|
||||||
copy.setText(ConstantsExplorer.COPYITEM);
|
copy.setText(ConstantsExplorer.COPYITEM);
|
||||||
copy.setIcon(Resources.getIconCopy());
|
copy.setIcon(Resources.getIconCopy());
|
||||||
|
|
||||||
copy.addSelectionListener(new SelectionListener<MenuEvent>() {
|
copy.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
// //HERE THE MULTI-SELECTION IS NOT ENABLED
|
// //HERE THE MULTI-SELECTION IS NOT ENABLED
|
||||||
// for (FileModel target : listSelectedItems) {
|
// for (FileModel target : listSelectedItems) {
|
||||||
// if(target.getIdentifier()!=null){
|
// if(target.getIdentifier()!=null){
|
||||||
// CopyAndPaste.copy(target.getIdentifier()));
|
// CopyAndPaste.copy(target.getIdentifier()));
|
||||||
// eventBus.fireEvent(new CopytemEvent(target.getIdentifier()));
|
// eventBus.fireEvent(new CopytemEvent(target.getIdentifier()));
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
List<String> ids = FileModelUtils.convertFileModelsToIds(listSelectedItems);
|
List<String> ids = FileModelUtils.convertFileModelsToIds(listSelectedItems);
|
||||||
|
|
||||||
if(ids.size()>0){
|
if(ids.size()>0){
|
||||||
|
@ -392,20 +386,20 @@ public class ContextMenuTree {
|
||||||
eventBus.fireEvent(new CopytemEvent(ids));
|
eventBus.fireEvent(new CopytemEvent(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(copy);
|
contextMenu.add(copy);
|
||||||
|
|
||||||
MenuItem paste = new MenuItem();
|
MenuItem paste = new MenuItem();
|
||||||
paste.setId(WorkspaceOperation.PASTE.getId());
|
paste.setId(WorkspaceOperation.PASTE.getId());
|
||||||
paste.setText(ConstantsExplorer.PASTEITEM);
|
paste.setText(ConstantsExplorer.PASTEITEM);
|
||||||
paste.setIcon(Resources.getIconPaste());
|
paste.setIcon(Resources.getIconPaste());
|
||||||
|
|
||||||
paste.addSelectionListener(new SelectionListener<MenuEvent>() {
|
paste.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel target : listSelectedItems) {
|
for (FileModel target : listSelectedItems) {
|
||||||
FileModel parentTarget = getDirectoryOrParent(target);
|
FileModel parentTarget = getDirectoryOrParent(target);
|
||||||
if(parentTarget!=null){
|
if(parentTarget!=null){
|
||||||
|
|
||||||
|
@ -416,258 +410,255 @@ public class ContextMenuTree {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(paste);
|
contextMenu.add(paste);
|
||||||
|
|
||||||
MenuItem share = new MenuItem();
|
MenuItem share = new MenuItem();
|
||||||
share.setId(WorkspaceOperation.SHARE.getId());
|
share.setId(WorkspaceOperation.SHARE.getId());
|
||||||
share.setText("Share");
|
share.setText("Share");
|
||||||
share.setIcon(Resources.getIconShareFolder());
|
share.setIcon(Resources.getIconShareFolder());
|
||||||
|
|
||||||
share.addSelectionListener(new SelectionListener<MenuEvent>() {
|
share.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
FileModel sourceFileModel = listSelectedItems.get(0);
|
FileModel sourceFileModel = listSelectedItems.get(0);
|
||||||
|
|
||||||
if (sourceFileModel != null) {
|
if (sourceFileModel != null) {
|
||||||
eventBus.fireEvent(new CreateSharedFolderEvent(sourceFileModel, sourceFileModel.getParentFileModel(),false));
|
eventBus.fireEvent(new CreateSharedFolderEvent(sourceFileModel, sourceFileModel.getParentFileModel(),false));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(share);
|
contextMenu.add(share);
|
||||||
|
|
||||||
MenuItem unShare = new MenuItem();
|
MenuItem unShare = new MenuItem();
|
||||||
unShare.setId(WorkspaceOperation.UNSHARE.getId());
|
unShare.setId(WorkspaceOperation.UNSHARE.getId());
|
||||||
unShare.setText("UnShare");
|
unShare.setText("UnShare");
|
||||||
unShare.setIcon(Resources.getIconUnShareUser());
|
unShare.setIcon(Resources.getIconUnShareUser());
|
||||||
|
|
||||||
unShare.addSelectionListener(new SelectionListener<MenuEvent>() {
|
unShare.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
for (FileModel target : listSelectedItems) {
|
for (FileModel target : listSelectedItems) {
|
||||||
if(target.getIdentifier()!=null){
|
if(target.getIdentifier()!=null){
|
||||||
eventBus.fireEvent( new UnShareFolderEvent(target));
|
eventBus.fireEvent( new UnShareFolderEvent(target));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(unShare);
|
contextMenu.add(unShare);
|
||||||
|
|
||||||
MenuItem rename = new MenuItem();
|
MenuItem rename = new MenuItem();
|
||||||
rename.setId(WorkspaceOperation.RENAME.getId());
|
rename.setId(WorkspaceOperation.RENAME.getId());
|
||||||
rename.setText("Rename Item");
|
rename.setText("Rename Item");
|
||||||
rename.setIcon(Resources.getIconRenameItem());
|
rename.setIcon(Resources.getIconRenameItem());
|
||||||
|
|
||||||
rename.addSelectionListener(new SelectionListener<MenuEvent>() {
|
rename.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel target : listSelectedItems) {
|
for (FileModel target : listSelectedItems) {
|
||||||
if(target.getIdentifier()!=null){
|
if(target.getIdentifier()!=null){
|
||||||
eventBus.fireEvent(new RenameItemEvent(target));
|
eventBus.fireEvent(new RenameItemEvent(target));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(rename);
|
contextMenu.add(rename);
|
||||||
|
|
||||||
MenuItem remove = new MenuItem();
|
MenuItem remove = new MenuItem();
|
||||||
remove.setId(WorkspaceOperation.REMOVE.getId());
|
remove.setId(WorkspaceOperation.REMOVE.getId());
|
||||||
remove.setText(ConstantsExplorer.MESSAGE_DELETE_ITEM);
|
remove.setText(ConstantsExplorer.MESSAGE_DELETE_ITEM);
|
||||||
remove.setIcon(Resources.getIconDeleteItem());
|
remove.setIcon(Resources.getIconDeleteItem());
|
||||||
|
|
||||||
remove.addSelectionListener(new SelectionListener<MenuEvent>() {
|
remove.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel sel : listSelectedItems) {
|
for (FileModel sel : listSelectedItems) {
|
||||||
eventBus.fireEvent(new DeleteItemEvent(sel));
|
eventBus.fireEvent(new DeleteItemEvent(sel));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(remove);
|
contextMenu.add(remove);
|
||||||
|
|
||||||
contextMenu.add(new SeparatorMenuItem());
|
contextMenu.add(new SeparatorMenuItem());
|
||||||
|
MenuItem show = new MenuItem();
|
||||||
MenuItem show = new MenuItem();
|
|
||||||
show.setId(WorkspaceOperation.SHOW.getId());
|
show.setId(WorkspaceOperation.SHOW.getId());
|
||||||
show.setText(ConstantsExplorer.MESSAGE_SHOW);
|
show.setText(ConstantsExplorer.MESSAGE_SHOW);
|
||||||
show.setIcon(Resources.getIconShow());
|
show.setIcon(Resources.getIconShow());
|
||||||
|
|
||||||
show.addSelectionListener(new SelectionListener<MenuEvent>() {
|
show.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
|
|
||||||
for (final FileModel sel : listSelectedItems) {
|
for (final FileModel sel : listSelectedItems) {
|
||||||
eventBus.fireEvent(new FileDownloadEvent(sel.getIdentifier(), sel.getName(), DownloadType.SHOW));
|
eventBus.fireEvent(new FileDownloadEvent(sel.getIdentifier(), sel.getName(), DownloadType.SHOW));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
contextMenu.add(show);
|
contextMenu.add(show);
|
||||||
|
|
||||||
|
MenuItem viewWebDav = new MenuItem();
|
||||||
|
|
||||||
MenuItem viewWebDav = new MenuItem();
|
|
||||||
viewWebDav.setId(WorkspaceOperation.WEBDAV_URL.getId());
|
viewWebDav.setId(WorkspaceOperation.WEBDAV_URL.getId());
|
||||||
viewWebDav.setText(ConstantsExplorer.MESSAGE_WEBDAV_URL);
|
viewWebDav.setText(ConstantsExplorer.MESSAGE_WEBDAV_URL);
|
||||||
viewWebDav.setIcon(Resources.getIconUrlWebDav());
|
viewWebDav.setIcon(Resources.getIconUrlWebDav());
|
||||||
|
|
||||||
viewWebDav.addSelectionListener(new SelectionListener<MenuEvent>() {
|
viewWebDav.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
|
|
||||||
for (final FileModel sel : listSelectedItems)
|
for (final FileModel sel : listSelectedItems)
|
||||||
eventBus.fireEvent(new WebDavUrlEvent(sel.getIdentifier()));
|
eventBus.fireEvent(new WebDavUrlEvent(sel.getIdentifier()));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
contextMenu.add(viewWebDav);
|
contextMenu.add(viewWebDav);
|
||||||
|
|
||||||
|
|
||||||
MenuItem sendTo = new MenuItem();
|
MenuItem sendTo = new MenuItem();
|
||||||
sendTo.setId(WorkspaceOperation.SENDTO.getId());
|
sendTo.setId(WorkspaceOperation.SENDTO.getId());
|
||||||
sendTo.setText(ConstantsExplorer.MESSAGE_SEND_TO);
|
sendTo.setText(ConstantsExplorer.MESSAGE_SEND_TO);
|
||||||
sendTo.setIcon(Resources.getIconSendTo());
|
sendTo.setIcon(Resources.getIconSendTo());
|
||||||
|
|
||||||
sendTo.addSelectionListener(new SelectionListener<MenuEvent>() {
|
sendTo.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
if(listSelectedItems!=null && listSelectedItems.size()>0)
|
if(listSelectedItems!=null && listSelectedItems.size()>0)
|
||||||
eventBus.fireEvent(new SendMessageEvent(listSelectedItems));
|
eventBus.fireEvent(new SendMessageEvent(listSelectedItems));
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
contextMenu.add(sendTo);
|
contextMenu.add(sendTo);
|
||||||
|
|
||||||
MenuItem upload = new MenuItem();
|
MenuItem upload = new MenuItem();
|
||||||
upload.setId(WorkspaceOperation.UPLOAD_FILE.getId());
|
upload.setId(WorkspaceOperation.UPLOAD_FILE.getId());
|
||||||
upload.setText(ConstantsExplorer.MESSAGE_UPLOAD_FILE);
|
upload.setText(ConstantsExplorer.MESSAGE_UPLOAD_FILE);
|
||||||
upload.setIcon(Resources.getIconFileUpload());
|
upload.setIcon(Resources.getIconFileUpload());
|
||||||
|
|
||||||
upload.addSelectionListener(new SelectionListener<MenuEvent>() {
|
upload.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (final FileModel sel : listSelectedItems) {
|
for (final FileModel sel : listSelectedItems) {
|
||||||
|
|
||||||
FileModel parent = getDirectoryOrParent(sel);
|
FileModel parent = getDirectoryOrParent(sel);
|
||||||
eventBus.fireEvent(new FileUploadEvent(parent, WS_UPLOAD_TYPE.File));
|
eventBus.fireEvent(new FileUploadEvent(parent, WS_UPLOAD_TYPE.File));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
contextMenu.add(upload);
|
contextMenu.add(upload);
|
||||||
|
|
||||||
|
|
||||||
MenuItem uploadArchive = new MenuItem();
|
MenuItem uploadArchive = new MenuItem();
|
||||||
uploadArchive.setId(WorkspaceOperation.UPLOAD_ARCHIVE.getId());
|
uploadArchive.setId(WorkspaceOperation.UPLOAD_ARCHIVE.getId());
|
||||||
uploadArchive.setText(ConstantsExplorer.MESSAGE_UPLOAD_ARCHIVE);
|
uploadArchive.setText(ConstantsExplorer.MESSAGE_UPLOAD_ARCHIVE);
|
||||||
uploadArchive.setToolTip("Upload a zip archive into workspace");
|
uploadArchive.setToolTip("Upload a zip archive into workspace");
|
||||||
uploadArchive.setIcon(Resources.getIconArchiveUpload());
|
uploadArchive.setIcon(Resources.getIconArchiveUpload());
|
||||||
|
|
||||||
uploadArchive.addSelectionListener(new SelectionListener<MenuEvent>() {
|
uploadArchive.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel sel : listSelectedItems) {
|
for (FileModel sel : listSelectedItems) {
|
||||||
|
|
||||||
FileModel parent = getDirectoryOrParent(sel);
|
FileModel parent = getDirectoryOrParent(sel);
|
||||||
|
|
||||||
eventBus.fireEvent(new FileUploadEvent(parent, WS_UPLOAD_TYPE.Archive));
|
eventBus.fireEvent(new FileUploadEvent(parent, WS_UPLOAD_TYPE.Archive));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(uploadArchive);
|
contextMenu.add(uploadArchive);
|
||||||
|
|
||||||
|
|
||||||
MenuItem downloadArchive = new MenuItem();
|
MenuItem downloadArchive = new MenuItem();
|
||||||
downloadArchive.setId(WorkspaceOperation.DOWNLOAD.getId());
|
downloadArchive.setId(WorkspaceOperation.DOWNLOAD.getId());
|
||||||
downloadArchive.setText(ConstantsExplorer.MESSAGE_DOWNLOAD_ITEM);
|
downloadArchive.setText(ConstantsExplorer.MESSAGE_DOWNLOAD_ITEM);
|
||||||
downloadArchive.setIcon(Resources.getIconDownload());
|
downloadArchive.setIcon(Resources.getIconDownload());
|
||||||
|
|
||||||
downloadArchive.addSelectionListener(new SelectionListener<MenuEvent>() {
|
downloadArchive.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel sel : listSelectedItems) {
|
for (FileModel sel : listSelectedItems) {
|
||||||
eventBus.fireEvent(new FileDownloadEvent(sel.getIdentifier(), sel.getName(), DownloadType.DOWNLOAD));
|
eventBus.fireEvent(new FileDownloadEvent(sel.getIdentifier(), sel.getName(), DownloadType.DOWNLOAD));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(downloadArchive);
|
contextMenu.add(downloadArchive);
|
||||||
contextMenu.add(new SeparatorMenuItem());
|
contextMenu.add(new SeparatorMenuItem());
|
||||||
|
|
||||||
MenuItem changePermission = new MenuItem();
|
MenuItem changePermission = new MenuItem();
|
||||||
changePermission.setId(WorkspaceOperation.VRE_CHANGE_PERIMISSIONS.getId());
|
changePermission.setId(WorkspaceOperation.VRE_CHANGE_PERIMISSIONS.getId());
|
||||||
changePermission.setText("Change Permission");
|
changePermission.setText("Change Permission");
|
||||||
changePermission.setIcon(Resources.getIconWriteAll());
|
changePermission.setIcon(Resources.getIconWriteAll());
|
||||||
|
|
||||||
changePermission.addSelectionListener(new SelectionListener<MenuEvent>() {
|
changePermission.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
for (FileModel target : listSelectedItems) {
|
for (FileModel target : listSelectedItems) {
|
||||||
if(target.getIdentifier()!=null){
|
if(target.getIdentifier()!=null){
|
||||||
eventBus.fireEvent(new VRESettingPermissionEvent(target));
|
eventBus.fireEvent(new VRESettingPermissionEvent(target));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(changePermission);
|
contextMenu.add(changePermission);
|
||||||
|
|
||||||
contextMenu.add(new SeparatorMenuItem());
|
contextMenu.add(new SeparatorMenuItem());
|
||||||
|
|
||||||
|
|
||||||
MenuItem addAdministrator = new MenuItem();
|
MenuItem addAdministrator = new MenuItem();
|
||||||
// addAdministrator.setId(WorkspaceOperation.ADD_ADMINISTRATOR.getId());
|
// addAdministrator.setId(WorkspaceOperation.ADD_ADMINISTRATOR.getId());
|
||||||
addAdministrator.setText("Manage Administrator/s");
|
addAdministrator.setText("Manage Administrator/s");
|
||||||
addAdministrator.setIcon(Resources.getIconManageAdministrator());
|
addAdministrator.setIcon(Resources.getIconManageAdministrator());
|
||||||
|
|
||||||
addAdministrator.addSelectionListener(new SelectionListener<MenuEvent>() {
|
addAdministrator.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel sel : listSelectedItems) {
|
for (FileModel sel : listSelectedItems) {
|
||||||
eventBus.fireEvent(new AddAdministratorEvent(sel));
|
eventBus.fireEvent(new AddAdministratorEvent(sel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// contextMenu.add(addAdministrator);
|
// contextMenu.add(addAdministrator);
|
||||||
|
|
||||||
MenuItem refreshItem = new MenuItem();
|
MenuItem refreshItem = new MenuItem();
|
||||||
refreshItem.setId(WorkspaceOperation.REFRESH_FOLDER.getId());
|
refreshItem.setId(WorkspaceOperation.REFRESH_FOLDER.getId());
|
||||||
refreshItem.setText(ConstantsExplorer.MESSAGE_REFRESH_FOLDER);
|
refreshItem.setText(ConstantsExplorer.MESSAGE_REFRESH_FOLDER);
|
||||||
refreshItem.setIcon(Resources.getIconRefresh());
|
refreshItem.setIcon(Resources.getIconRefresh());
|
||||||
|
|
||||||
refreshItem.addSelectionListener(new SelectionListener<MenuEvent>() {
|
refreshItem.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel sel : listSelectedItems) {
|
for (FileModel sel : listSelectedItems) {
|
||||||
eventBus.fireEvent(new RefreshFolderEvent(sel, true, false, false));
|
eventBus.fireEvent(new RefreshFolderEvent(sel, true, false, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu.add(refreshItem);
|
contextMenu.add(refreshItem);
|
||||||
contextMenu.add(new SeparatorMenuItem());
|
contextMenu.add(new SeparatorMenuItem());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -677,14 +668,14 @@ public class ContextMenuTree {
|
||||||
*/
|
*/
|
||||||
public void clearListSelectedItems() {
|
public void clearListSelectedItems() {
|
||||||
listSelectedItems.clear();
|
listSelectedItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the hide sharing.
|
* Sets the hide sharing.
|
||||||
*/
|
*/
|
||||||
public void setHideSharing() {
|
public void setHideSharing() {
|
||||||
hideSharing = true;
|
hideSharing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -748,7 +739,7 @@ public class ContextMenuTree {
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_FOLDER.getId()).setVisible(false); //set invisible create folder
|
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_FOLDER.getId()).setVisible(false); //set invisible create folder
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId()).setVisible(false); //set invisible create shared folder
|
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId()).setVisible(false); //set invisible create shared folder
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.WEBDAV_URL.getId()).setVisible(false); //set invisible webdav url
|
contextMenu.getItemByItemId(WorkspaceOperation.WEBDAV_URL.getId()).setVisible(false); //set invisible webdav url
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_FILE.getId()).setVisible(false); //set invisible upload file
|
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_FILE.getId()).setVisible(false); //set invisible upload file
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_ARCHIVE.getId()).setVisible(false); //set invisible upload archive
|
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_ARCHIVE.getId()).setVisible(false); //set invisible upload archive
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.ADD_URL.getId()).setVisible(false); //set invisible add url
|
contextMenu.getItemByItemId(WorkspaceOperation.ADD_URL.getId()).setVisible(false); //set invisible add url
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.REFRESH_FOLDER.getId()).setVisible(false); //set invisible refresh
|
contextMenu.getItemByItemId(WorkspaceOperation.REFRESH_FOLDER.getId()).setVisible(false); //set invisible refresh
|
||||||
|
@ -782,8 +773,8 @@ public class ContextMenuTree {
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_FOLDER.getId()).setVisible(true); //insert folder
|
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_FOLDER.getId()).setVisible(true); //insert folder
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId()).setVisible(true); //insert shared folder
|
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId()).setVisible(true); //insert shared folder
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_FILE.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_FILE.getId()).setVisible(true);
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_ARCHIVE.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_ARCHIVE.getId()).setVisible(true);
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.ADD_URL.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.ADD_URL.getId()).setVisible(true);
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.SENDTO.getId()).setVisible(true); //send to
|
contextMenu.getItemByItemId(WorkspaceOperation.SENDTO.getId()).setVisible(true); //send to
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.DOWNLOAD.getId()).setVisible(true); //DOWNLOAD
|
contextMenu.getItemByItemId(WorkspaceOperation.DOWNLOAD.getId()).setVisible(true); //DOWNLOAD
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.COPY.getId()).setEnabled(true); //DOWNLOAD
|
contextMenu.getItemByItemId(WorkspaceOperation.COPY.getId()).setEnabled(true); //DOWNLOAD
|
||||||
|
@ -807,7 +798,7 @@ public class ContextMenuTree {
|
||||||
|
|
||||||
if(selectedItem.isShared()){ //SHARE LINK ON SHARED ITEM
|
if(selectedItem.isShared()){ //SHARE LINK ON SHARED ITEM
|
||||||
|
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.SHARE_LINK.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.SHARE_LINK.getId()).setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//IS VRE FOLDER or SPECIAL FOLDER?
|
//IS VRE FOLDER or SPECIAL FOLDER?
|
||||||
|
@ -820,7 +811,7 @@ public class ContextMenuTree {
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.REMOVE.getId()).setVisible(false); //REMOVE
|
contextMenu.getItemByItemId(WorkspaceOperation.REMOVE.getId()).setVisible(false); //REMOVE
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.REFRESH_FOLDER.getId()).setVisible(true); //REFRESH_FOLDER
|
contextMenu.getItemByItemId(WorkspaceOperation.REFRESH_FOLDER.getId()).setVisible(true); //REFRESH_FOLDER
|
||||||
|
|
||||||
//ADDED 14/03/2014
|
//ADDED 14/03/2014
|
||||||
if(selectedItem.isVreFolder()){
|
if(selectedItem.isVreFolder()){
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.VRE_CHANGE_PERIMISSIONS.getId()).setVisible(true); //REFRESH_FOLDER
|
contextMenu.getItemByItemId(WorkspaceOperation.VRE_CHANGE_PERIMISSIONS.getId()).setVisible(true); //REFRESH_FOLDER
|
||||||
if(CutCopyAndPaste.getCopiedIdsFilesModel()!=null)
|
if(CutCopyAndPaste.getCopiedIdsFilesModel()!=null)
|
||||||
|
@ -830,14 +821,14 @@ public class ContextMenuTree {
|
||||||
// if(selectedItem.isVreFolder() && CutCopyAndPaste.getCopiedIdsFilesModel()!=null)
|
// if(selectedItem.isVreFolder() && CutCopyAndPaste.getCopiedIdsFilesModel()!=null)
|
||||||
// contextMenu.getItemByItemId(WorkspaceOperation.PASTE.getId()).setEnabled(true); //enable paste button
|
// contextMenu.getItemByItemId(WorkspaceOperation.PASTE.getId()).setEnabled(true); //enable paste button
|
||||||
else if(selectedItem.isSpecialFolder()){
|
else if(selectedItem.isSpecialFolder()){
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.COPY.getId()).setEnabled(false);
|
contextMenu.getItemByItemId(WorkspaceOperation.COPY.getId()).setEnabled(false);
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.PASTE.getId()).setEnabled(false);
|
contextMenu.getItemByItemId(WorkspaceOperation.PASTE.getId()).setEnabled(false);
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_FILE.getId()).setVisible(false);
|
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_FILE.getId()).setVisible(false);
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_ARCHIVE.getId()).setVisible(false);
|
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_ARCHIVE.getId()).setVisible(false);
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.ADD_URL.getId()).setVisible(false);
|
contextMenu.getItemByItemId(WorkspaceOperation.ADD_URL.getId()).setVisible(false);
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.SENDTO.getId()).setVisible(false);
|
contextMenu.getItemByItemId(WorkspaceOperation.SENDTO.getId()).setVisible(false);
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_FOLDER.getId()).setVisible(false); //insert folder
|
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_FOLDER.getId()).setVisible(false); //insert folder
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.DOWNLOAD.getId()).setVisible(false);
|
contextMenu.getItemByItemId(WorkspaceOperation.DOWNLOAD.getId()).setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -871,7 +862,7 @@ public class ContextMenuTree {
|
||||||
|
|
||||||
GWT.log("HideSharing = " + hideSharing);
|
GWT.log("HideSharing = " + hideSharing);
|
||||||
//not supported in tree Reports
|
//not supported in tree Reports
|
||||||
if (hideSharing) {
|
if (hideSharing) {
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.SHARE.getId()).setVisible(false); //SHARE
|
contextMenu.getItemByItemId(WorkspaceOperation.SHARE.getId()).setVisible(false); //SHARE
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId()).setVisible(false); //insert shared folder
|
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId()).setVisible(false); //insert shared folder
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.UNSHARE.getId()).setVisible(false); //UNSHARE
|
contextMenu.getItemByItemId(WorkspaceOperation.UNSHARE.getId()).setVisible(false); //UNSHARE
|
||||||
|
@ -882,48 +873,48 @@ public class ContextMenuTree {
|
||||||
|
|
||||||
switch(selectedItem.getGXTFolderItemType()){
|
switch(selectedItem.getGXTFolderItemType()){
|
||||||
|
|
||||||
case EXTERNAL_IMAGE:
|
case EXTERNAL_IMAGE:
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.PREVIEW.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.PREVIEW.getId()).setVisible(true);
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.PUBLIC_LINK.getId()).setVisible(true); //public link
|
contextMenu.getItemByItemId(WorkspaceOperation.PUBLIC_LINK.getId()).setVisible(true); //public link
|
||||||
break;
|
break;
|
||||||
case EXTERNAL_FILE:
|
case EXTERNAL_FILE:
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.PUBLIC_LINK.getId()).setVisible(true); //public link
|
contextMenu.getItemByItemId(WorkspaceOperation.PUBLIC_LINK.getId()).setVisible(true); //public link
|
||||||
break;
|
break;
|
||||||
case EXTERNAL_PDF_FILE:
|
case EXTERNAL_PDF_FILE:
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.PUBLIC_LINK.getId()).setVisible(true); //public link
|
contextMenu.getItemByItemId(WorkspaceOperation.PUBLIC_LINK.getId()).setVisible(true); //public link
|
||||||
break;
|
break;
|
||||||
case EXTERNAL_URL:
|
case EXTERNAL_URL:
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.LINK.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.LINK.getId()).setVisible(true);
|
||||||
break;
|
break;
|
||||||
case REPORT_TEMPLATE:
|
case REPORT_TEMPLATE:
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.OPEN_REPORT_TEMPLATE.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.OPEN_REPORT_TEMPLATE.getId()).setVisible(true);
|
||||||
break;
|
break;
|
||||||
case REPORT:
|
case REPORT:
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.OPEN_REPORT.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.OPEN_REPORT.getId()).setVisible(true);
|
||||||
break;
|
break;
|
||||||
case QUERY:
|
case QUERY:
|
||||||
break;
|
break;
|
||||||
case TIME_SERIES:
|
case TIME_SERIES:
|
||||||
break;
|
break;
|
||||||
// case AQUAMAPS_ITEM:
|
// case AQUAMAPS_ITEM:
|
||||||
// break;
|
// break;
|
||||||
case PDF_DOCUMENT:
|
case PDF_DOCUMENT:
|
||||||
break;
|
break;
|
||||||
case IMAGE_DOCUMENT:
|
case IMAGE_DOCUMENT:
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.PREVIEW.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.PREVIEW.getId()).setVisible(true);
|
||||||
break;
|
break;
|
||||||
case DOCUMENT:
|
case DOCUMENT:
|
||||||
break;
|
break;
|
||||||
case URL_DOCUMENT:
|
case URL_DOCUMENT:
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.LINK.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.LINK.getId()).setVisible(true);
|
||||||
break;
|
break;
|
||||||
case METADATA:
|
case METADATA:
|
||||||
break;
|
break;
|
||||||
case WORKFLOW_REPORT:
|
case WORKFLOW_REPORT:
|
||||||
break;
|
break;
|
||||||
case WORKFLOW_TEMPLATE:
|
case WORKFLOW_TEMPLATE:
|
||||||
break;
|
break;
|
||||||
case EXTERNAL_RESOURCE_LINK:
|
case EXTERNAL_RESOURCE_LINK:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue