fixed bug on removing single administrator
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@100282 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7b7af0e7e8
commit
e73a8c4365
|
@ -2120,10 +2120,10 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
|
||||
@Override
|
||||
public void handleEvent(BaseEvent be) {
|
||||
List<org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel> targets = multiDragContact.getTargetContactsWithMyLogin();
|
||||
final List<org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel> targets = multiDragContact.getTargetContactsWithMyLogin();
|
||||
|
||||
if(targets.size()==1){
|
||||
MessageBox info = MessageBox.info("Any Administrator/s?", "You have not selected any Administrator, confirm exit?", null);
|
||||
MessageBox info = MessageBox.info("Any Administrator/s?", "You have not selected any Administrator, confirm only you as Administrator and exit?", null);
|
||||
|
||||
info.addCallback(new Listener<MessageBoxEvent>() {
|
||||
|
||||
|
@ -2131,6 +2131,11 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
//IF NOT CANCELLED
|
||||
String clickedButton = be.getButtonClicked().getItemId();
|
||||
if(clickedButton.equals(Dialog.OK)){
|
||||
List<String> logins = new ArrayList<String>(targets.size());
|
||||
for (org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel infoContactModel : targets) {
|
||||
logins.add(infoContactModel.getLogin());
|
||||
doAddAdministratorToFolderId(file, logins);
|
||||
}
|
||||
multidrag.hide();
|
||||
}
|
||||
}
|
||||
|
@ -2190,15 +2195,6 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
|
||||
@Override
|
||||
public void onSuccess(Boolean arg0) {
|
||||
/*
|
||||
String title = "Added";
|
||||
|
||||
String admin = logins.size()>1?"administrators":"administrator";
|
||||
title += " "+admin;
|
||||
|
||||
String msg = logins.size() + " "+admin +" added correctly to "+file.getName();
|
||||
*/
|
||||
|
||||
String msg = "Adding administrator/s completed successfully";
|
||||
MessageBox.info("Operation completed", msg, null);
|
||||
|
||||
|
|
Loading…
Reference in New Issue