ref 17169: Selection of users in the Sharing panel
https://support.d4science.org/issues/17169 Updated support to VREs discovery git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@181380 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e0f0e913ce
commit
234bb80439
|
@ -142,16 +142,31 @@ public class PanelMultiDragWorkspaceContact extends ContentPanel {
|
||||||
|
|
||||||
if (targetContact != null && targetContact.size() > 0) {
|
if (targetContact != null && targetContact.size() > 0) {
|
||||||
if (owner != null) {
|
if (owner != null) {
|
||||||
alreadyShared = owner.getName() + ", ";
|
|
||||||
if (targetContact.contains(owner)) {
|
if (targetContact.contains(owner)) {
|
||||||
targetContact.remove(owner);
|
targetContact.remove(owner);
|
||||||
}
|
}
|
||||||
}
|
if (targetContact.size() > 0) {
|
||||||
for (int i = 0; i < targetContact.size() - 1; i++)
|
alreadyShared = owner.getName() + ", ";
|
||||||
|
for (int i = 0; i < targetContact.size(); i++) {
|
||||||
|
if ((i + 1) == targetContact.size()) {
|
||||||
|
alreadyShared += targetContact.get(i).getName();
|
||||||
|
} else {
|
||||||
alreadyShared += targetContact.get(i).getName() + ", ";
|
alreadyShared += targetContact.get(i).getName() + ", ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
alreadyShared = owner.getName();
|
||||||
|
}
|
||||||
|
|
||||||
alreadyShared += targetContact.get(targetContact.size() - 1).getName();
|
} else {
|
||||||
|
for (int i = 0; i < targetContact.size(); i++) {
|
||||||
|
if ((i + 1) == targetContact.size()) {
|
||||||
|
alreadyShared += targetContact.get(i).getName();
|
||||||
|
} else {
|
||||||
|
alreadyShared += targetContact.get(i).getName() + ", ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (owner != null) {
|
if (owner != null) {
|
||||||
alreadyShared = owner.getName();
|
alreadyShared = owner.getName();
|
||||||
|
@ -265,7 +280,6 @@ public class PanelMultiDragWorkspaceContact extends ContentPanel {
|
||||||
vreListCombo.setTypeAhead(true);
|
vreListCombo.setTypeAhead(true);
|
||||||
vreListCombo.setTriggerAction(TriggerAction.ALL);
|
vreListCombo.setTriggerAction(TriggerAction.ALL);
|
||||||
|
|
||||||
|
|
||||||
vreListCombo.addSelectionChangedListener(new SelectionChangedListener<UserVRE>() {
|
vreListCombo.addSelectionChangedListener(new SelectionChangedListener<UserVRE>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue