fixed context-menu

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@173246 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2018-10-11 13:35:26 +00:00
parent 16e797df31
commit 8b00a4d36f
1 changed files with 30 additions and 25 deletions

View File

@ -86,7 +86,7 @@ public class GxtToolBarItemFunctionality {
* Instantiates a new gxt tool bar item functionality.
*
* @param gridFilterGroupContainer the grid filter group container
* @param breadcrumbPanel
* @param breadcrumbPanel the breadcrumb panel
*/
public GxtToolBarItemFunctionality(GxtGridFilterGroupPanel gridFilterGroupContainer, GxtBreadcrumbPathPanel breadcrumbPanel) {
this();
@ -200,8 +200,6 @@ public class GxtToolBarItemFunctionality {
toolBar.add(btnFolderLink);
//CUT
btnCutItem = new Button("Cut", Resources.getIconCut());
btnCutItem.setScale(ButtonScale.SMALL);
@ -603,10 +601,11 @@ public class GxtToolBarItemFunctionality {
this.btnPublicLink.disable();
this.btnFolderLink.disable();
this.btnGetSharedLink.disable();
this.btnOpen.enable();
this.btnSetPermission.disable();
this.btnMoveItems.disable();
//ADDED 07/03/2014
this.btnOpen.enable();
this.btnAddFolder.enable();
this.btnUploadArchive.enable();
this.btnUploadFile.enable();
@ -670,7 +669,7 @@ public class GxtToolBarItemFunctionality {
}
//TARGET (SELECTED ITEM) CAN BE NULL, HIS PARENT IS NOT NULL ACTIVING BUTTONS
activeButtons(active);
enableButtons(active);
if(target!=null){
@ -699,27 +698,34 @@ public class GxtToolBarItemFunctionality {
/**
* Active buttons.
* Enable buttons.
*
* @param active the active
*/
private void activeButtons(boolean active){
private void enableButtons(boolean active){
if (!active) {
this.btnRemoveItem.disable();
this.btnRenameItem.disable();
this.btnDownloadFile.disable();
this.btnOpen.disable();
this.btnMoveItems.disable();
this.btnCutItem.disable();
} else {
this.btnRemoveItem.enable();
this.btnRenameItem.enable();
this.btnDownloadFile.enable();
this.btnOpen.enable();
this.btnMoveItems.enable();
this.btnCutItem.enable();
}
// if (!active) {
// this.btnRemoveItem.disable();
// this.btnRenameItem.disable();
// this.btnDownloadFile.disable();
// this.btnOpen.disable();
// this.btnMoveItems.disable();
// this.btnCutItem.disable();
// } else {
// this.btnRemoveItem.enable();
// this.btnRenameItem.enable();
// this.btnDownloadFile.enable();
// this.btnOpen.enable();
// this.btnMoveItems.enable();
// this.btnCutItem.enable();
// }
this.btnRemoveItem.setEnabled(active);
this.btnRenameItem.setEnabled(active);
this.btnDownloadFile.setEnabled(active);
this.btnOpen.setEnabled(active);
this.btnMoveItems.setEnabled(active);
this.btnCutItem.setEnabled(active);
}
@ -743,12 +749,12 @@ public class GxtToolBarItemFunctionality {
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);
btnMoveItems.setEnabled(active);
}
/**
@ -810,8 +816,7 @@ public class GxtToolBarItemFunctionality {
public void enableButtonForActiveBreadcrumb(FileModel parent){
if(parent!=null){
this.btnMoveItems.enable();
//this.btnMoveItems.enable();
this.btnAddFolder.enable();
this.btnUploadArchive.enable();
this.btnUploadFile.enable();