[Task #17552] Workspace: reconsider the actions Private Link, Folder Link and Get Link

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@181719 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2019-09-18 10:39:11 +00:00
parent e15c1d8ebe
commit 35ff7512b1
5 changed files with 24 additions and 12 deletions

View File

@ -2,9 +2,15 @@
<Changeset
component="org.gcube.portlets-user.workspace-portlet-tree.6-27-0"
date="${buildDate}">
<Change>[Task #17226] Workspace and Workspace Tree: migrate HL remaining methods to SHUB
<Change>[Task #17226] Workspace and Workspace Tree: migrate HL
remaining methods to SHUB
</Change>
<Change>Updated the list of classes shared with sharing widget
component
</Change>
<Change>[Task #17552] Workspace: reconsider the actions Private Link,
Folder Link and Get Link
</Change>
<Change>Updated the list of classes shared with sharing widget component</Change>
</Changeset>
<Changeset
component="org.gcube.portlets-user.workspace-portlet-tree.6-26-0"

View File

@ -500,7 +500,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
// TODO Auto-generated method stub
if (getFolderLinkEvent.getSourceFile() != null) {
GWT.log("getFolderLinkEvent.getSourceFile() " + getFolderLinkEvent.getSourceFile());
DialogGetLink dialog = new DialogGetLink("Copy to clipboard Folder Link: Ctrl+C",
DialogGetLink dialog = new DialogGetLink("Copy to clipboard Public Link to folder: Ctrl+C",
getFolderLinkEvent.getSourceFile(), null, Link_Type.FOLDER_LINK,
getFolderLinkEvent.isSetPublic());
dialog.show();

View File

@ -82,7 +82,7 @@ public class ConstantsExplorer {
public static final String MESSAGE_ERROR_OCCURED = "Sorry an error has occurred while processing your request";
public static final String INFO = "Info";
public static final String MESSAGE_SEND_TO_OK = "Your message has been successfully delivered";
public static final String MESSAGE_SHARE_LINK = "Get Link";
public static final String MESSAGE_SHARE_LINK = "Get Share Link";
public static final String MOVE = "Move";
public static final String COPY = "Make a Copy";
//public static final String PASTEITEM = "Paste";
@ -90,8 +90,8 @@ public class ConstantsExplorer {
public static final String MESSAGE_GET_INFO = "Get Info";
public static final String FILE_VERSIONS = "Versions";
public static final String MESSAGE_PUBLIC_LINK = "Get Public Link";
public static final String MESSAGE_FOLDER_LINK = "Get Folder Link";
public static final String MESSAGE_FOLDER_LINK_REMOVE = "Remove Folder Link";
public static final String MESSAGE_FOLDER_LINK = "Get Public Link";
public static final String MESSAGE_FOLDER_LINK_REMOVE = "Remove Public Link";
public static final String LISTATTACHMENTSNAMES = "Attachments Names";
public static final String LISTCONTACTSTOSTRING = "ListContactToString";
public static final String STATUS = "Status";

View File

@ -196,7 +196,12 @@ public class ContextMenuTree {
public void componentSelected(MenuEvent ce) {
for (FileModel sel : listSelectedItems) {
eventBus.fireEvent(new GetPublicLinkEvent(sel, null));
//see Task #17552
if(sel.isDirectory()) {
eventBus.fireEvent(new GetFolderLinkEvent(sel, true));
}else {
eventBus.fireEvent(new GetPublicLinkEvent(sel, null));
}
}
}
});
@ -219,7 +224,8 @@ public class ContextMenuTree {
}
}
});
//see Task #17552
contextMenu.add(mnFolderLink);

View File

@ -168,7 +168,7 @@ public class DialogGetLink extends Dialog {
case FOLDER_LINK:
vp.mask("Updating Folder Link... checking permissions");
vp.mask("Updating Public Link to folder... checking permissions");
if (item.isShared()) {
setIcon(Resources.getIconFolderSharedPublic());
} else
@ -198,7 +198,7 @@ public class DialogGetLink extends Dialog {
vp.unmask();
if (result.getAccessGranted()) {
String msg = DialogGetLink.this.setAsPublic ? "Getting" : "Removing";
msg = msg + " Folder Link... permissions granted";
msg = msg + " Public Link... permissions granted";
vp.mask(msg);
allowAccessToFolderLink(item.getIdentifier(), DialogGetLink.this.setAsPublic);
} else
@ -250,8 +250,8 @@ public class DialogGetLink extends Dialog {
if (!setIsPublic && publicLink == null) {
DialogGetLink.this.hide();
MessageBox.info("Folder Link Removed",
"Folder Link to the folder: " + item.getName() + " removed correctly", null);
MessageBox.info("Public Link to folder removed",
"Public Link to the folder: " + item.getName() + " removed correctly", null);
AppControllerExplorer.getEventBus()
.fireEvent(new RefreshFolderEvent(item.getParentFileModel(), true, false, false));
return;