added construtor to no folder selectable
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@174477 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ca4c6e626a
commit
98d96f545c
|
@ -29,6 +29,8 @@ public class WorkspaceExplorerConstants {
|
||||||
|
|
||||||
public static final String WORKSPACE_FOLDER_EMPTY_MESSAGE = "This folder is empty";
|
public static final String WORKSPACE_FOLDER_EMPTY_MESSAGE = "This folder is empty";
|
||||||
|
|
||||||
|
public static final String NO_FOLDER = "No folder";
|
||||||
|
|
||||||
// DIALOGS
|
// DIALOGS
|
||||||
public static final String SAVE = "Save";
|
public static final String SAVE = "Save";
|
||||||
public static final String MAX_HEIGHT_DIALOG = "500px";
|
public static final String MAX_HEIGHT_DIALOG = "500px";
|
||||||
|
|
|
@ -149,6 +149,7 @@ public class WorkspaceResourcesExplorerPanel extends DockPanel implements HasWor
|
||||||
itemsType[2] = ItemType.SHARED_FOLDER;
|
itemsType[2] = ItemType.SHARED_FOLDER;
|
||||||
itemsType[3] = ItemType.VRE_FOLDER;
|
itemsType[3] = ItemType.VRE_FOLDER;
|
||||||
initExplorer(folderId, "", itemsType, itemsType, null, null, false, null);
|
initExplorer(folderId, "", itemsType, itemsType, null, null, false, null);
|
||||||
|
wsExplorer.getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
|
||||||
}else{
|
}else{
|
||||||
initExplorer(folderId, "", ItemType.values(), ItemType.values(), null, null, false, null);
|
initExplorer(folderId, "", ItemType.values(), ItemType.values(), null, null, false, null);
|
||||||
}
|
}
|
||||||
|
@ -172,6 +173,7 @@ public class WorkspaceResourcesExplorerPanel extends DockPanel implements HasWor
|
||||||
itemsType[2] = ItemType.SHARED_FOLDER;
|
itemsType[2] = ItemType.SHARED_FOLDER;
|
||||||
itemsType[3] = ItemType.VRE_FOLDER;
|
itemsType[3] = ItemType.VRE_FOLDER;
|
||||||
initExplorer(folderId, "", itemsType, itemsType, showProperties, filter, false, null);
|
initExplorer(folderId, "", itemsType, itemsType, showProperties, filter, false, null);
|
||||||
|
wsExplorer.getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
|
||||||
}else{
|
}else{
|
||||||
initExplorer(folderId, "", ItemType.values(), ItemType.values(), showProperties, filter, false, null);
|
initExplorer(folderId, "", ItemType.values(), ItemType.values(), showProperties, filter, false, null);
|
||||||
}
|
}
|
||||||
|
@ -197,6 +199,7 @@ public class WorkspaceResourcesExplorerPanel extends DockPanel implements HasWor
|
||||||
itemsType[2] = ItemType.SHARED_FOLDER;
|
itemsType[2] = ItemType.SHARED_FOLDER;
|
||||||
itemsType[3] = ItemType.VRE_FOLDER;
|
itemsType[3] = ItemType.VRE_FOLDER;
|
||||||
initExplorer(folderId, "", itemsType, itemsType, showProperties, filter, showGcubeInfo, sortByColumn);
|
initExplorer(folderId, "", itemsType, itemsType, showProperties, filter, showGcubeInfo, sortByColumn);
|
||||||
|
wsExplorer.getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
|
||||||
}else{
|
}else{
|
||||||
initExplorer(folderId, "", ItemType.values(), ItemType.values(), showProperties, filter, showGcubeInfo, sortByColumn);
|
initExplorer(folderId, "", ItemType.values(), ItemType.values(), showProperties, filter, showGcubeInfo, sortByColumn);
|
||||||
}
|
}
|
||||||
|
@ -224,6 +227,7 @@ public class WorkspaceResourcesExplorerPanel extends DockPanel implements HasWor
|
||||||
itemsType[2] = ItemType.SHARED_FOLDER;
|
itemsType[2] = ItemType.SHARED_FOLDER;
|
||||||
itemsType[3] = ItemType.VRE_FOLDER;
|
itemsType[3] = ItemType.VRE_FOLDER;
|
||||||
initExplorer(folderId, "", itemsType, itemsType, showProperties, filter, showGcubeInfo, sortByColumn, displayFields);
|
initExplorer(folderId, "", itemsType, itemsType, showProperties, filter, showGcubeInfo, sortByColumn, displayFields);
|
||||||
|
wsExplorer.getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
|
||||||
}else{
|
}else{
|
||||||
initExplorer(folderId, "", ItemType.values(), ItemType.values(), showProperties, filter, showGcubeInfo, sortByColumn, displayFields);
|
initExplorer(folderId, "", ItemType.values(), ItemType.values(), showProperties, filter, showGcubeInfo, sortByColumn, displayFields);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,10 @@ import com.google.gwt.user.client.Event;
|
||||||
*/
|
*/
|
||||||
public class WorkspaceExplorerSelectDialog extends Modal implements HasWorskpaceExplorerSelectNotificationListener{
|
public class WorkspaceExplorerSelectDialog extends Modal implements HasWorskpaceExplorerSelectNotificationListener{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
private Button selectButton;
|
private Button selectButton;
|
||||||
private WorkspaceExplorerSelectDialog INSTANCE = this;
|
private WorkspaceExplorerSelectDialog INSTANCE = this;
|
||||||
private boolean isSelect = false;
|
private boolean isSelect = false;
|
||||||
|
@ -265,7 +269,7 @@ public class WorkspaceExplorerSelectDialog extends Modal implements HasWorskpace
|
||||||
private void customizeEmptyMessage(boolean showOnlyFolders){
|
private void customizeEmptyMessage(boolean showOnlyFolders){
|
||||||
//AFTER THE INIT I'M CHANGING THE MESSAGE IN CASE OF ONLY FOLDER ARE SHWOWN
|
//AFTER THE INIT I'M CHANGING THE MESSAGE IN CASE OF ONLY FOLDER ARE SHWOWN
|
||||||
if(showOnlyFolders)
|
if(showOnlyFolders)
|
||||||
controller.getWsExplorer().getItTables().setEmptyTableMessage("No folder selectable here");
|
controller.getWsExplorer().getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -138,6 +138,7 @@ public class WorkspaceExplorerSelectPanel extends ScrollPanel implements HasWors
|
||||||
setSelectableTypes(itemsType);
|
setSelectableTypes(itemsType);
|
||||||
setShowableTypes(itemsType);
|
setShowableTypes(itemsType);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadExplorer(captionTxt, null);
|
loadExplorer(captionTxt, null);
|
||||||
customizeEmptyMessage(showOnlyFolders);
|
customizeEmptyMessage(showOnlyFolders);
|
||||||
}
|
}
|
||||||
|
@ -169,7 +170,7 @@ public class WorkspaceExplorerSelectPanel extends ScrollPanel implements HasWors
|
||||||
private void customizeEmptyMessage(boolean showOnlyFolders){
|
private void customizeEmptyMessage(boolean showOnlyFolders){
|
||||||
//AFTER THE INIT I'M CHANGING THE MESSAGE IN CASE OF ONLY FOLDER ARE SHWOWN
|
//AFTER THE INIT I'M CHANGING THE MESSAGE IN CASE OF ONLY FOLDER ARE SHWOWN
|
||||||
if(showOnlyFolders)
|
if(showOnlyFolders)
|
||||||
controller.getWsExplorer().getItTables().setEmptyTableMessage("No folder selectable here");
|
controller.getWsExplorer().getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -490,7 +490,7 @@ public class ItemsTable<T extends Item> extends AbstractItemsCellTable<T> implem
|
||||||
* @param msg the new empty table message
|
* @param msg the new empty table message
|
||||||
*/
|
*/
|
||||||
public void setEmptyTableMessage(String msg){
|
public void setEmptyTableMessage(String msg){
|
||||||
msg = msg!=null&&!msg.isEmpty()?msg:WorkspaceExplorerConstants.WORKSPACE_FOLDER_EMPTY_MESSAGE;
|
msg = msg!=null?msg:WorkspaceExplorerConstants.WORKSPACE_FOLDER_EMPTY_MESSAGE;
|
||||||
if(sortedCellTable!=null)
|
if(sortedCellTable!=null)
|
||||||
sortedCellTable.setEmptyTableWidget(new Label(msg));
|
sortedCellTable.setEmptyTableWidget(new Label(msg));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue