update multi drag hide event

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@100109 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2014-09-22 14:58:57 +00:00
parent 5d8962efec
commit c4c1cd5623
4 changed files with 13 additions and 7 deletions

View File

@ -26,7 +26,7 @@ public class SimpleMultiDragContact {
private UserStore userStore = new UserStore();
private LOAD_CONTACTS_AS loadContactAs;
public static enum LOAD_CONTACTS_AS{SHARED_USER, ADMINISTRATOR}
private MultiDragContact multiDragContact = new MultiDragContact(false);
private MultiDragContact multiDragContact = new MultiDragContact(false, false);
private List<InfoContactModel> targets = new ArrayList<InfoContactModel>();
private boolean readGroupsFromPortal;
private boolean readGroupsFromHL;

View File

@ -340,7 +340,7 @@ public class DialogShareWItem extends Dialog {
@Override
public void onClick(ClickEvent event) {
final MultiDragContact multiDrag = new MultiDragContact(true);
final MultiDragContact multiDrag = new MultiDragContact(true,true);
multiDrag.show();
List<InfoContactModel> exclusiveContacts = userStore.getExclusiveContactsFromAllContact(suggestPanel.getSelectedUser());

View File

@ -295,7 +295,7 @@ public class SmartShare extends Dialog implements SmartDialogInterface{
@Override
public void onClick(ClickEvent event) {
final MultiDragContact multiDrag = new MultiDragContact(true);
final MultiDragContact multiDrag = new MultiDragContact(true,true);
multiDrag.show();
List<InfoContactModel> exclusiveContacts = userStore.getExclusiveContactsFromAllContact(suggestPanel.getSelectedUser());

View File

@ -18,7 +18,6 @@ import com.extjs.gxt.ui.client.event.BaseEvent;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.event.MessageBoxEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.store.Store;
@ -65,8 +64,15 @@ public class MultiDragContact extends Dialog {
private Button buttonSelectedRight;
private Button buttonAllRight;
private Button buttonAllLeft;
private boolean hideOnPressOkButton;
public MultiDragContact(boolean visibleAlreadyShared) {
/**
*
* @param visibleAlreadyShared
* @param hideOnPressOk
*/
public MultiDragContact(boolean visibleAlreadyShared, boolean hideOnPressOk) {
this.hideOnPressOkButton = hideOnPressOk;
setStyleAttribute("margin", "10px");
setSize(WIDTH_DIALOG, HEIGHT_DIALOG);
setHeading("Group dragging contacts");
@ -291,8 +297,8 @@ public class MultiDragContact extends Dialog {
} else
hide();
*/
hide();
if(hideOnPressOkButton)
hide();
}
});