[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:
parent
e15c1d8ebe
commit
35ff7512b1
|
@ -2,9 +2,15 @@
|
||||||
<Changeset
|
<Changeset
|
||||||
component="org.gcube.portlets-user.workspace-portlet-tree.6-27-0"
|
component="org.gcube.portlets-user.workspace-portlet-tree.6-27-0"
|
||||||
date="${buildDate}">
|
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>
|
||||||
<Change>Updated the list of classes shared with sharing widget component</Change>
|
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset
|
<Changeset
|
||||||
component="org.gcube.portlets-user.workspace-portlet-tree.6-26-0"
|
component="org.gcube.portlets-user.workspace-portlet-tree.6-26-0"
|
||||||
|
|
|
@ -500,7 +500,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
if (getFolderLinkEvent.getSourceFile() != null) {
|
if (getFolderLinkEvent.getSourceFile() != null) {
|
||||||
GWT.log("getFolderLinkEvent.getSourceFile() " + getFolderLinkEvent.getSourceFile());
|
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.getSourceFile(), null, Link_Type.FOLDER_LINK,
|
||||||
getFolderLinkEvent.isSetPublic());
|
getFolderLinkEvent.isSetPublic());
|
||||||
dialog.show();
|
dialog.show();
|
||||||
|
|
|
@ -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 MESSAGE_ERROR_OCCURED = "Sorry an error has occurred while processing your request";
|
||||||
public static final String INFO = "Info";
|
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_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 MOVE = "Move";
|
||||||
public static final String COPY = "Make a Copy";
|
public static final String COPY = "Make a Copy";
|
||||||
//public static final String PASTEITEM = "Paste";
|
//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 MESSAGE_GET_INFO = "Get Info";
|
||||||
public static final String FILE_VERSIONS = "Versions";
|
public static final String FILE_VERSIONS = "Versions";
|
||||||
public static final String MESSAGE_PUBLIC_LINK = "Get Public Link";
|
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 = "Get Public Link";
|
||||||
public static final String MESSAGE_FOLDER_LINK_REMOVE = "Remove Folder Link";
|
public static final String MESSAGE_FOLDER_LINK_REMOVE = "Remove Public Link";
|
||||||
public static final String LISTATTACHMENTSNAMES = "Attachments Names";
|
public static final String LISTATTACHMENTSNAMES = "Attachments Names";
|
||||||
public static final String LISTCONTACTSTOSTRING = "ListContactToString";
|
public static final String LISTCONTACTSTOSTRING = "ListContactToString";
|
||||||
public static final String STATUS = "Status";
|
public static final String STATUS = "Status";
|
||||||
|
|
|
@ -196,7 +196,12 @@ public class ContextMenuTree {
|
||||||
public void componentSelected(MenuEvent ce) {
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
for (FileModel sel : listSelectedItems) {
|
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);
|
contextMenu.add(mnFolderLink);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ public class DialogGetLink extends Dialog {
|
||||||
|
|
||||||
case FOLDER_LINK:
|
case FOLDER_LINK:
|
||||||
|
|
||||||
vp.mask("Updating Folder Link... checking permissions");
|
vp.mask("Updating Public Link to folder... checking permissions");
|
||||||
if (item.isShared()) {
|
if (item.isShared()) {
|
||||||
setIcon(Resources.getIconFolderSharedPublic());
|
setIcon(Resources.getIconFolderSharedPublic());
|
||||||
} else
|
} else
|
||||||
|
@ -198,7 +198,7 @@ public class DialogGetLink extends Dialog {
|
||||||
vp.unmask();
|
vp.unmask();
|
||||||
if (result.getAccessGranted()) {
|
if (result.getAccessGranted()) {
|
||||||
String msg = DialogGetLink.this.setAsPublic ? "Getting" : "Removing";
|
String msg = DialogGetLink.this.setAsPublic ? "Getting" : "Removing";
|
||||||
msg = msg + " Folder Link... permissions granted";
|
msg = msg + " Public Link... permissions granted";
|
||||||
vp.mask(msg);
|
vp.mask(msg);
|
||||||
allowAccessToFolderLink(item.getIdentifier(), DialogGetLink.this.setAsPublic);
|
allowAccessToFolderLink(item.getIdentifier(), DialogGetLink.this.setAsPublic);
|
||||||
} else
|
} else
|
||||||
|
@ -250,8 +250,8 @@ public class DialogGetLink extends Dialog {
|
||||||
|
|
||||||
if (!setIsPublic && publicLink == null) {
|
if (!setIsPublic && publicLink == null) {
|
||||||
DialogGetLink.this.hide();
|
DialogGetLink.this.hide();
|
||||||
MessageBox.info("Folder Link Removed",
|
MessageBox.info("Public Link to folder removed",
|
||||||
"Folder Link to the folder: " + item.getName() + " removed correctly", null);
|
"Public Link to the folder: " + item.getName() + " removed correctly", null);
|
||||||
AppControllerExplorer.getEventBus()
|
AppControllerExplorer.getEventBus()
|
||||||
.fireEvent(new RefreshFolderEvent(item.getParentFileModel(), true, false, false));
|
.fireEvent(new RefreshFolderEvent(item.getParentFileModel(), true, false, false));
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue