enhancements on "MultiDragContact"
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@100163 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5287af25b5
commit
5f7865cc30
|
@ -18,6 +18,7 @@ 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;
|
||||
|
@ -301,30 +302,30 @@ public class MultiDragContact extends Dialog {
|
|||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
/*
|
||||
List<InfoContactModel> shareContacts = storeTarget.getModels();
|
||||
if (shareContacts == null || shareContacts.isEmpty()) {
|
||||
|
||||
MessageBox mbc = MessageBox.confirm(
|
||||
"Confirm exit?",
|
||||
"You have not selected any contact to share, confirm exit?",
|
||||
null);
|
||||
if(hideOnPressOkButton){
|
||||
|
||||
List<InfoContactModel> shareContacts = storeTarget.getModels();
|
||||
if (shareContacts == null || shareContacts.isEmpty()) {
|
||||
|
||||
mbc.addCallback(new Listener<MessageBoxEvent>() {
|
||||
MessageBox mbc = MessageBox.confirm(
|
||||
"Confirm exit?",
|
||||
"You have not selected any contact to share, confirm exit?",
|
||||
null);
|
||||
|
||||
@Override
|
||||
public void handleEvent(MessageBoxEvent be) {
|
||||
String clickedButton = be.getButtonClicked().getItemId();
|
||||
if (clickedButton.equals(Dialog.YES)) {
|
||||
hide();
|
||||
mbc.addCallback(new Listener<MessageBoxEvent>() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(MessageBoxEvent be) {
|
||||
String clickedButton = be.getButtonClicked().getItemId();
|
||||
if (clickedButton.equals(Dialog.YES)) {
|
||||
hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} else
|
||||
hide();
|
||||
*/
|
||||
if(hideOnPressOkButton)
|
||||
hide();
|
||||
});
|
||||
} else
|
||||
hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue