[Task 3236] Done stylesheet fix

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@144229 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2017-02-24 09:00:52 +00:00
parent 98b3097607
commit 116d497741
4 changed files with 55 additions and 44 deletions

View File

@ -1,5 +1,10 @@
<ReleaseNotes>
<Changeset component="portlets-widgets.workspace-sharing-widget.1-8-0"
<Changeset component="portlets-widgets.workspace-sharing-widget.1-8-2"
date="2017-02-24">
<Change>[Task 3236] Done stylesheet fix
</Change>
</Changeset>
<Changeset component="portlets-widgets.workspace-sharing-widget.1-8-1"
date="2016-11-25">
<Change>Removed ASL Session dependency
</Change>

View File

@ -14,7 +14,7 @@
<groupId>org.gcube.portlets.widgets</groupId>
<artifactId>workspace-sharing-widget</artifactId>
<packaging>jar</packaging>
<version>1.8.1-SNAPSHOT</version>
<version>1.8.2-SNAPSHOT</version>
<name>gCube Workspace Sharing Widget</name>
<description>
gCube Workspace Sharing Widget allows users to share gCube Workspace items

View File

@ -1,5 +1,5 @@
/**
*
*
*/
package org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing.multisuggest;
@ -25,14 +25,14 @@ import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
*
*/
public class DialogMultiDragContact extends Dialog{
private static final String GROUP_DRAGGING_CONTACTS = "Group dragging contacts";
private static final int HEIGHT_DIALOG = 542;
private static final int WIDTH_DIALOG = 620;
private String txtHelp = "Drag one or more contacts from the left (All Contacts) to the right (Share with) to add users in your sharing list.";
private String titleHelp = "Group dragging action";
private boolean hideOnPressOkButton;
private MultiDragContact multiDragContact;
@ -43,7 +43,7 @@ public class DialogMultiDragContact extends Dialog{
private LayoutContainer lcMiddle = new LayoutContainer();
private LayoutContainer lcBottom = new LayoutContainer();
/**
*
*
* @param headTitle
* @param leftListContactsTitle
* @param rightListContactsTitle
@ -58,9 +58,9 @@ public class DialogMultiDragContact extends Dialog{
setHeadTitle(headTitle);
// add(multiDragContact);
}
/**
*
*
* @param visibleAlreadyShared
* @param hideOnPressOk
*/
@ -71,27 +71,27 @@ public class DialogMultiDragContact extends Dialog{
init();
// add(multiDragContact);
}
public void setHeadTitle(String headTitle){
this.headTitle = headTitle;
if(headTitle==null)
this.setHeading(GROUP_DRAGGING_CONTACTS);
else
this.setHeading(headTitle);
}
/**
*
*
* @param bool
*/
public void showToolBar(boolean bool){
this.toolBar.setVisible(bool);
}
/**
*
*
*/
private void init() {
@ -105,10 +105,10 @@ public class DialogMultiDragContact extends Dialog{
// setResizable(true);
setButtonAlign(HorizontalAlignment.CENTER);
setButtons(Dialog.OKCANCEL);
if(!visibleTextArea)
setHeight(HEIGHT_DIALOG-60);
setHeight(HEIGHT_DIALOG-MultiDragContact.ALREADY_SHARED_HEIGHT);
toolBar = new ToolBar();
Button buttonHelp = new Button();
buttonHelp.setIcon(Resources.getIconInfo());
@ -125,7 +125,7 @@ public class DialogMultiDragContact extends Dialog{
toolBar.add(buttonHelp);
setTopComponent(toolBar);
this.getButtonById(Dialog.CANCEL).addSelectionListener(
new SelectionListener<ButtonEvent>() {
@ -142,7 +142,7 @@ public class DialogMultiDragContact extends Dialog{
public void componentSelected(ButtonEvent ce) {
if(hideOnPressOkButton){
List<InfoContactModel> shareContacts = multiDragContact.getTargetListContact();
if (shareContacts == null || shareContacts.isEmpty()) {
@ -166,16 +166,16 @@ public class DialogMultiDragContact extends Dialog{
}
}
});
lcMiddle.add(multiDragContact);
add(lcTop);
add(lcMiddle);
add(lcBottom);
}
/**
*
*
*/
public MultiDragContact getMultiDrag() {
return multiDragContact;

View File

@ -42,7 +42,7 @@ import com.extjs.gxt.ui.client.widget.layout.RowLayout;
import com.extjs.gxt.ui.client.widget.tips.QuickTip;
/**
*
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* @Jan 27, 2015
*
@ -51,13 +51,15 @@ public class MultiDragContact extends ContentPanel {
private static final String ALL_CONTACTS = "All Contacts";
private static final String SHARE_WITH = "Share with...";
public static final int WIDTH_CP = 597;
// private static final int HEIGHT_DIALOG = 542;
public static final int HEIGHT_GRID = 310;
public static final int PADDING = 5;
public static final int ALREADY_SHARED_HEIGHT = 60;
private GridDropTarget dropSource;
private GridDropTarget dropTarget;
private ListStore<InfoContactModel> storeSource = new ListStore<InfoContactModel>();
@ -85,7 +87,7 @@ public class MultiDragContact extends ContentPanel {
}
/**
*
*
* @param headTitle
* @param leftListContactsTitle
* @param rightListContactsTitle
@ -96,7 +98,7 @@ public class MultiDragContact extends ContentPanel {
this.setHeaderVisible(false);
this.setBodyBorder(false);
this.setBorders(false);
// setStyleAttribute("margin", "10px");
setBodyStyle("padding: "+PADDING+"px; background: none");
// SORTING STORE
@ -104,11 +106,13 @@ public class MultiDragContact extends ContentPanel {
setGropUserStoreSorter(storeTarget);
ContentPanel cpAlreadyShared = new ContentPanel();
cpAlreadyShared.setSize(WIDTH_CP, 60);
cpAlreadyShared.setWidth(WIDTH_CP);
cpAlreadyShared.setStyleAttribute("height", ALREADY_SHARED_HEIGHT+"px important!");
cpAlreadyShared.setHeaderVisible(false);
cpAlreadyShared.setVisible(visibleAlreadyShared);
cpAlreadyShared.setLayout(new FitLayout());
//cpAlreadyShared.setScrollMode(Scroll.AUTOY);
VerticalPanel vpShared = new VerticalPanel();
vpShared.setVerticalAlign(VerticalAlignment.MIDDLE);
@ -128,7 +132,8 @@ public class MultiDragContact extends ContentPanel {
cpAlreadyShared.add(textAreaAlreadyShared);
Label label = new Label("Already shared with");
label.setStyleAttribute("padding-right", "10px");
label.setStyleAttribute("padding-right", "5px");
label.setStyleAttribute("font-size", "13px !important");
hpSharedContacts.add(label);
hpSharedContacts.add(textAreaAlreadyShared);
@ -137,16 +142,17 @@ public class MultiDragContact extends ContentPanel {
add(cpAlreadyShared);
final ContentPanel cp = new ContentPanel();
cp.setSize(WIDTH_CP, 370);
cp.setWidth(WIDTH_CP);
cp.setStyleAttribute("height", "373px !important");
cp.setHeaderVisible(false);
cp.setLayout(new RowLayout(Orientation.HORIZONTAL));
final VerticalPanel vpAllContacts = new VerticalPanel();
vpAllContacts.setHorizontalAlign(HorizontalAlignment.CENTER);
allContacts = new Label(ALL_CONTACTS);
vpAllContacts.add(allContacts);
gridAllContacts = new Grid<InfoContactModel>(storeSource,
createColumnModel());
@ -205,10 +211,10 @@ public class MultiDragContact extends ContentPanel {
final VerticalPanel vpShareWith = new VerticalPanel();
vpShareWith.setHorizontalAlign(HorizontalAlignment.CENTER);
shareWith = new Label(SHARE_WITH);
vpShareWith.add(shareWith);
gridShareWith = new Grid<InfoContactModel>(storeTarget,createColumnModel());
final StoreFilterField<InfoContactModel> filter2 = new StoreFilterField<InfoContactModel>() {
@ -523,7 +529,7 @@ public class MultiDragContact extends ContentPanel {
if (contact != null)
storeSource.add(contact);
}
public void addTargetContact(InfoContactModel contact) {
if (contact != null)
storeTarget.add(contact);
@ -554,28 +560,28 @@ public class MultiDragContact extends ContentPanel {
}
});
}
// public void setHeadTitle(String headTitle){
// this.headTitle = headTitle;
//
//
// if(headTitle==null)
// this.setHeading(GROUP_DRAGGING_CONTACTS);
// else
// this.setHeading(headTitle);
// }
public void setLeftListContactsTitle(String leftListContactsTitle) {
this.leftListContactsTitle = leftListContactsTitle;
if(leftListContactsTitle==null)
allContacts.setText(ALL_CONTACTS);
else
allContacts.setText(leftListContactsTitle);
}
public void setRightListContactsTitle(String rightListContactsTitle) {
this.rightListContactsTitle = rightListContactsTitle;
if(rightListContactsTitle==null)
shareWith.setText(SHARE_WITH);
else