Minor glitch fixed to Liferay 6.2
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@128955 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
916c472009
commit
9aa990a944
|
@ -48,11 +48,28 @@ import com.extjs.gxt.ui.client.widget.layout.RowLayout;
|
||||||
import com.extjs.gxt.ui.client.widget.tips.QuickTip;
|
import com.extjs.gxt.ui.client.widget.tips.QuickTip;
|
||||||
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class MultiDragContact.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* Jun 1, 2016
|
||||||
|
*/
|
||||||
public class MultiDragContact extends Dialog {
|
public class MultiDragContact extends Dialog {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final int HEIGHT_CONTAINER_GRID = 395;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final int HEIGHT_CONTAINER_TEXT_AREA = 72;
|
||||||
|
private static final int HEIGHT_TEXT_AREA = 55;
|
||||||
private static final int WIDTH_CP = 597;
|
private static final int WIDTH_CP = 597;
|
||||||
private static final int HEIGHT_DIALOG = 542;
|
// private static final int HEIGHT_DIALOG = 542;
|
||||||
private static final int WIDTH_DIALOG = 625;
|
private static final int HEIGHT_DIALOG = 580;
|
||||||
|
private static final int WIDTH_DIALOG = 630;
|
||||||
|
// private static final int WIDTH_DIALOG = 625;
|
||||||
private static final int HEIGHT_GRID = 310;
|
private static final int HEIGHT_GRID = 310;
|
||||||
|
|
||||||
private GridDropTarget dropSource;
|
private GridDropTarget dropSource;
|
||||||
|
@ -68,6 +85,9 @@ public class MultiDragContact extends Dialog {
|
||||||
private Button buttonAllRight;
|
private Button buttonAllRight;
|
||||||
private Button buttonAllLeft;
|
private Button buttonAllLeft;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new multi drag contact.
|
||||||
|
*/
|
||||||
public MultiDragContact() {
|
public MultiDragContact() {
|
||||||
setStyleAttribute("margin", "10px");
|
setStyleAttribute("margin", "10px");
|
||||||
setSize(WIDTH_DIALOG, HEIGHT_DIALOG);
|
setSize(WIDTH_DIALOG, HEIGHT_DIALOG);
|
||||||
|
@ -87,7 +107,7 @@ public class MultiDragContact extends Dialog {
|
||||||
|
|
||||||
|
|
||||||
ContentPanel cpAlreadyShared = new ContentPanel();
|
ContentPanel cpAlreadyShared = new ContentPanel();
|
||||||
cpAlreadyShared.setSize(WIDTH_CP, 60);
|
cpAlreadyShared.setSize(WIDTH_CP, HEIGHT_CONTAINER_TEXT_AREA);
|
||||||
cpAlreadyShared.setHeaderVisible(false);
|
cpAlreadyShared.setHeaderVisible(false);
|
||||||
|
|
||||||
cpAlreadyShared.setLayout(new FitLayout());
|
cpAlreadyShared.setLayout(new FitLayout());
|
||||||
|
@ -104,13 +124,14 @@ public class MultiDragContact extends Dialog {
|
||||||
// textField.setFieldLabel("Already shared with");
|
// textField.setFieldLabel("Already shared with");
|
||||||
// textField.setHeight(30);
|
// textField.setHeight(30);
|
||||||
textAreaAlreadyShared.setWidth(501);
|
textAreaAlreadyShared.setWidth(501);
|
||||||
textAreaAlreadyShared.setHeight(43);
|
textAreaAlreadyShared.setHeight(HEIGHT_TEXT_AREA);
|
||||||
cpAlreadyShared.setStyleAttribute("padding-bottom", "5px");
|
cpAlreadyShared.setStyleAttribute("padding-bottom", "5px");
|
||||||
textAreaAlreadyShared.setReadOnly(true);
|
textAreaAlreadyShared.setReadOnly(true);
|
||||||
cpAlreadyShared.add(textAreaAlreadyShared);
|
cpAlreadyShared.add(textAreaAlreadyShared);
|
||||||
|
|
||||||
Label label = new Label("Already shared with");
|
Label label = new Label("Already shared with");
|
||||||
label.setStyleAttribute("padding-right", "10px");
|
label.setStyleAttribute("padding-right", "10px");
|
||||||
|
label.setStyleAttribute("font-size", "12px");
|
||||||
|
|
||||||
hpSharedContacts.add(label);
|
hpSharedContacts.add(label);
|
||||||
hpSharedContacts.add(textAreaAlreadyShared);
|
hpSharedContacts.add(textAreaAlreadyShared);
|
||||||
|
@ -120,7 +141,7 @@ public class MultiDragContact extends Dialog {
|
||||||
|
|
||||||
|
|
||||||
final ContentPanel cp = new ContentPanel();
|
final ContentPanel cp = new ContentPanel();
|
||||||
cp.setSize(WIDTH_CP, 370);
|
cp.setSize(WIDTH_CP, HEIGHT_CONTAINER_GRID);
|
||||||
cp.setHeaderVisible(false);
|
cp.setHeaderVisible(false);
|
||||||
cp.setLayout(new RowLayout(Orientation.HORIZONTAL));
|
cp.setLayout(new RowLayout(Orientation.HORIZONTAL));
|
||||||
|
|
||||||
|
@ -323,6 +344,11 @@ public class MultiDragContact extends Dialog {
|
||||||
new QuickTip(gridAllContacts);
|
new QuickTip(gridAllContacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the move contacts container.
|
||||||
|
*
|
||||||
|
* @return the layout container
|
||||||
|
*/
|
||||||
private LayoutContainer createMoveContactsContainer() {
|
private LayoutContainer createMoveContactsContainer() {
|
||||||
|
|
||||||
LayoutContainer lc = new LayoutContainer();
|
LayoutContainer lc = new LayoutContainer();
|
||||||
|
@ -444,6 +470,11 @@ public class MultiDragContact extends Dialog {
|
||||||
return lc;
|
return lc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the column model.
|
||||||
|
*
|
||||||
|
* @return the column model
|
||||||
|
*/
|
||||||
private ColumnModel createColumnModel() {
|
private ColumnModel createColumnModel() {
|
||||||
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
|
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
|
||||||
|
|
||||||
|
@ -478,6 +509,11 @@ public class MultiDragContact extends Dialog {
|
||||||
return new ColumnModel(configs);
|
return new ColumnModel(configs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the source contacts.
|
||||||
|
*
|
||||||
|
* @param listContact the list contact
|
||||||
|
*/
|
||||||
public void addSourceContacts(List<InfoContactModel> listContact){
|
public void addSourceContacts(List<InfoContactModel> listContact){
|
||||||
|
|
||||||
gridAllContacts.mask("", ConstantsExplorer.LOADINGSTYLE);
|
gridAllContacts.mask("", ConstantsExplorer.LOADINGSTYLE);
|
||||||
|
@ -498,6 +534,11 @@ public class MultiDragContact extends Dialog {
|
||||||
gridAllContacts.repaint();
|
gridAllContacts.repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the already shared contacts.
|
||||||
|
*
|
||||||
|
* @param listContact the list contact
|
||||||
|
*/
|
||||||
public void addAlreadySharedContacts(List<InfoContactModel> listContact){
|
public void addAlreadySharedContacts(List<InfoContactModel> listContact){
|
||||||
|
|
||||||
gridShareWith.mask("", ConstantsExplorer.LOADINGSTYLE);
|
gridShareWith.mask("", ConstantsExplorer.LOADINGSTYLE);
|
||||||
|
@ -515,12 +556,23 @@ public class MultiDragContact extends Dialog {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the target contacts.
|
||||||
|
*
|
||||||
|
* @param listContact the list contact
|
||||||
|
*/
|
||||||
public void addTargetContacts(List<InfoContactModel> listContact){
|
public void addTargetContacts(List<InfoContactModel> listContact){
|
||||||
if(listContact!=null && listContact.size()>0){
|
if(listContact!=null && listContact.size()>0){
|
||||||
storeTarget.add(convertFromInfoContactModel(listContact));
|
storeTarget.add(convertFromInfoContactModel(listContact));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert from info contact model.
|
||||||
|
*
|
||||||
|
* @param listContact the list contact
|
||||||
|
* @return the list
|
||||||
|
*/
|
||||||
private List<ExtendedInfoContactModel> convertFromInfoContactModel(List<InfoContactModel> listContact){
|
private List<ExtendedInfoContactModel> convertFromInfoContactModel(List<InfoContactModel> listContact){
|
||||||
|
|
||||||
if(listContact!=null){
|
if(listContact!=null){
|
||||||
|
@ -534,6 +586,12 @@ public class MultiDragContact extends Dialog {
|
||||||
return new ArrayList<ExtendedInfoContactModel>();
|
return new ArrayList<ExtendedInfoContactModel>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert from info contact model.
|
||||||
|
*
|
||||||
|
* @param infoContactModel the info contact model
|
||||||
|
* @return the extended info contact model
|
||||||
|
*/
|
||||||
private ExtendedInfoContactModel convertFromInfoContactModel(InfoContactModel infoContactModel){
|
private ExtendedInfoContactModel convertFromInfoContactModel(InfoContactModel infoContactModel){
|
||||||
if(infoContactModel!=null){
|
if(infoContactModel!=null){
|
||||||
String fullName = infoContactModel.getName();
|
String fullName = infoContactModel.getName();
|
||||||
|
@ -547,11 +605,21 @@ public class MultiDragContact extends Dialog {
|
||||||
return new ExtendedInfoContactModel();
|
return new ExtendedInfoContactModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the target contact.
|
||||||
|
*
|
||||||
|
* @param contact the contact
|
||||||
|
*/
|
||||||
public void addTargetContact(InfoContactModel contact){
|
public void addTargetContact(InfoContactModel contact){
|
||||||
if(contact!=null)
|
if(contact!=null)
|
||||||
storeTarget.add(convertFromInfoContactModel(contact));
|
storeTarget.add(convertFromInfoContactModel(contact));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the target list contact.
|
||||||
|
*
|
||||||
|
* @return the target list contact
|
||||||
|
*/
|
||||||
public List<InfoContactModel> getTargetListContact(){
|
public List<InfoContactModel> getTargetListContact(){
|
||||||
|
|
||||||
List<? extends InfoContactModel> infoContacts = storeTarget.getModels();
|
List<? extends InfoContactModel> infoContacts = storeTarget.getModels();
|
||||||
|
@ -559,6 +627,11 @@ public class MultiDragContact extends Dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the grop user store sorter.
|
||||||
|
*
|
||||||
|
* @param store the new grop user store sorter
|
||||||
|
*/
|
||||||
private void setGropUserStoreSorter(ListStore<ExtendedInfoContactModel> store){
|
private void setGropUserStoreSorter(ListStore<ExtendedInfoContactModel> store){
|
||||||
|
|
||||||
// Sorting files
|
// Sorting files
|
||||||
|
|
Loading…
Reference in New Issue