[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> <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"> date="2016-11-25">
<Change>Removed ASL Session dependency <Change>Removed ASL Session dependency
</Change> </Change>

View File

@ -14,7 +14,7 @@
<groupId>org.gcube.portlets.widgets</groupId> <groupId>org.gcube.portlets.widgets</groupId>
<artifactId>workspace-sharing-widget</artifactId> <artifactId>workspace-sharing-widget</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.8.1-SNAPSHOT</version> <version>1.8.2-SNAPSHOT</version>
<name>gCube Workspace Sharing Widget</name> <name>gCube Workspace Sharing Widget</name>
<description> <description>
gCube Workspace Sharing Widget allows users to share gCube Workspace items 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; 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{ public class DialogMultiDragContact extends Dialog{
private static final String GROUP_DRAGGING_CONTACTS = "Group dragging contacts"; private static final String GROUP_DRAGGING_CONTACTS = "Group dragging contacts";
private static final int HEIGHT_DIALOG = 542; private static final int HEIGHT_DIALOG = 542;
private static final int WIDTH_DIALOG = 620; 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 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 String titleHelp = "Group dragging action";
private boolean hideOnPressOkButton; private boolean hideOnPressOkButton;
private MultiDragContact multiDragContact; private MultiDragContact multiDragContact;
@ -43,7 +43,7 @@ public class DialogMultiDragContact extends Dialog{
private LayoutContainer lcMiddle = new LayoutContainer(); private LayoutContainer lcMiddle = new LayoutContainer();
private LayoutContainer lcBottom = new LayoutContainer(); private LayoutContainer lcBottom = new LayoutContainer();
/** /**
* *
* @param headTitle * @param headTitle
* @param leftListContactsTitle * @param leftListContactsTitle
* @param rightListContactsTitle * @param rightListContactsTitle
@ -58,9 +58,9 @@ public class DialogMultiDragContact extends Dialog{
setHeadTitle(headTitle); setHeadTitle(headTitle);
// add(multiDragContact); // add(multiDragContact);
} }
/** /**
* *
* @param visibleAlreadyShared * @param visibleAlreadyShared
* @param hideOnPressOk * @param hideOnPressOk
*/ */
@ -71,27 +71,27 @@ public class DialogMultiDragContact extends Dialog{
init(); init();
// add(multiDragContact); // add(multiDragContact);
} }
public void setHeadTitle(String headTitle){ public void setHeadTitle(String headTitle){
this.headTitle = headTitle; this.headTitle = headTitle;
if(headTitle==null) if(headTitle==null)
this.setHeading(GROUP_DRAGGING_CONTACTS); this.setHeading(GROUP_DRAGGING_CONTACTS);
else else
this.setHeading(headTitle); this.setHeading(headTitle);
} }
/** /**
* *
* @param bool * @param bool
*/ */
public void showToolBar(boolean bool){ public void showToolBar(boolean bool){
this.toolBar.setVisible(bool); this.toolBar.setVisible(bool);
} }
/** /**
* *
*/ */
private void init() { private void init() {
@ -105,10 +105,10 @@ public class DialogMultiDragContact extends Dialog{
// setResizable(true); // setResizable(true);
setButtonAlign(HorizontalAlignment.CENTER); setButtonAlign(HorizontalAlignment.CENTER);
setButtons(Dialog.OKCANCEL); setButtons(Dialog.OKCANCEL);
if(!visibleTextArea) if(!visibleTextArea)
setHeight(HEIGHT_DIALOG-60); setHeight(HEIGHT_DIALOG-MultiDragContact.ALREADY_SHARED_HEIGHT);
toolBar = new ToolBar(); toolBar = new ToolBar();
Button buttonHelp = new Button(); Button buttonHelp = new Button();
buttonHelp.setIcon(Resources.getIconInfo()); buttonHelp.setIcon(Resources.getIconInfo());
@ -125,7 +125,7 @@ public class DialogMultiDragContact extends Dialog{
toolBar.add(buttonHelp); toolBar.add(buttonHelp);
setTopComponent(toolBar); setTopComponent(toolBar);
this.getButtonById(Dialog.CANCEL).addSelectionListener( this.getButtonById(Dialog.CANCEL).addSelectionListener(
new SelectionListener<ButtonEvent>() { new SelectionListener<ButtonEvent>() {
@ -142,7 +142,7 @@ public class DialogMultiDragContact extends Dialog{
public void componentSelected(ButtonEvent ce) { public void componentSelected(ButtonEvent ce) {
if(hideOnPressOkButton){ if(hideOnPressOkButton){
List<InfoContactModel> shareContacts = multiDragContact.getTargetListContact(); List<InfoContactModel> shareContacts = multiDragContact.getTargetListContact();
if (shareContacts == null || shareContacts.isEmpty()) { if (shareContacts == null || shareContacts.isEmpty()) {
@ -166,16 +166,16 @@ public class DialogMultiDragContact extends Dialog{
} }
} }
}); });
lcMiddle.add(multiDragContact); lcMiddle.add(multiDragContact);
add(lcTop); add(lcTop);
add(lcMiddle); add(lcMiddle);
add(lcBottom); add(lcBottom);
} }
/** /**
* *
*/ */
public MultiDragContact getMultiDrag() { public MultiDragContact getMultiDrag() {
return multiDragContact; 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; import com.extjs.gxt.ui.client.widget.tips.QuickTip;
/** /**
* *
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* @Jan 27, 2015 * @Jan 27, 2015
* *
@ -51,13 +51,15 @@ public class MultiDragContact extends ContentPanel {
private static final String ALL_CONTACTS = "All Contacts"; private static final String ALL_CONTACTS = "All Contacts";
private static final String SHARE_WITH = "Share with..."; private static final String SHARE_WITH = "Share with...";
public static final int WIDTH_CP = 597; public static final int WIDTH_CP = 597;
// private static final int HEIGHT_DIALOG = 542; // private static final int HEIGHT_DIALOG = 542;
public static final int HEIGHT_GRID = 310; public static final int HEIGHT_GRID = 310;
public static final int PADDING = 5; public static final int PADDING = 5;
public static final int ALREADY_SHARED_HEIGHT = 60;
private GridDropTarget dropSource; private GridDropTarget dropSource;
private GridDropTarget dropTarget; private GridDropTarget dropTarget;
private ListStore<InfoContactModel> storeSource = new ListStore<InfoContactModel>(); private ListStore<InfoContactModel> storeSource = new ListStore<InfoContactModel>();
@ -85,7 +87,7 @@ public class MultiDragContact extends ContentPanel {
} }
/** /**
* *
* @param headTitle * @param headTitle
* @param leftListContactsTitle * @param leftListContactsTitle
* @param rightListContactsTitle * @param rightListContactsTitle
@ -96,7 +98,7 @@ public class MultiDragContact extends ContentPanel {
this.setHeaderVisible(false); this.setHeaderVisible(false);
this.setBodyBorder(false); this.setBodyBorder(false);
this.setBorders(false); this.setBorders(false);
// setStyleAttribute("margin", "10px"); // setStyleAttribute("margin", "10px");
setBodyStyle("padding: "+PADDING+"px; background: none"); setBodyStyle("padding: "+PADDING+"px; background: none");
// SORTING STORE // SORTING STORE
@ -104,11 +106,13 @@ public class MultiDragContact extends ContentPanel {
setGropUserStoreSorter(storeTarget); setGropUserStoreSorter(storeTarget);
ContentPanel cpAlreadyShared = new ContentPanel(); 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.setHeaderVisible(false);
cpAlreadyShared.setVisible(visibleAlreadyShared); cpAlreadyShared.setVisible(visibleAlreadyShared);
cpAlreadyShared.setLayout(new FitLayout()); cpAlreadyShared.setLayout(new FitLayout());
//cpAlreadyShared.setScrollMode(Scroll.AUTOY);
VerticalPanel vpShared = new VerticalPanel(); VerticalPanel vpShared = new VerticalPanel();
vpShared.setVerticalAlign(VerticalAlignment.MIDDLE); vpShared.setVerticalAlign(VerticalAlignment.MIDDLE);
@ -128,7 +132,8 @@ public class MultiDragContact extends ContentPanel {
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", "5px");
label.setStyleAttribute("font-size", "13px !important");
hpSharedContacts.add(label); hpSharedContacts.add(label);
hpSharedContacts.add(textAreaAlreadyShared); hpSharedContacts.add(textAreaAlreadyShared);
@ -137,16 +142,17 @@ public class MultiDragContact extends ContentPanel {
add(cpAlreadyShared); add(cpAlreadyShared);
final ContentPanel cp = new ContentPanel(); final ContentPanel cp = new ContentPanel();
cp.setSize(WIDTH_CP, 370); cp.setWidth(WIDTH_CP);
cp.setStyleAttribute("height", "373px !important");
cp.setHeaderVisible(false); cp.setHeaderVisible(false);
cp.setLayout(new RowLayout(Orientation.HORIZONTAL)); cp.setLayout(new RowLayout(Orientation.HORIZONTAL));
final VerticalPanel vpAllContacts = new VerticalPanel(); final VerticalPanel vpAllContacts = new VerticalPanel();
vpAllContacts.setHorizontalAlign(HorizontalAlignment.CENTER); vpAllContacts.setHorizontalAlign(HorizontalAlignment.CENTER);
allContacts = new Label(ALL_CONTACTS); allContacts = new Label(ALL_CONTACTS);
vpAllContacts.add(allContacts); vpAllContacts.add(allContacts);
gridAllContacts = new Grid<InfoContactModel>(storeSource, gridAllContacts = new Grid<InfoContactModel>(storeSource,
createColumnModel()); createColumnModel());
@ -205,10 +211,10 @@ public class MultiDragContact extends ContentPanel {
final VerticalPanel vpShareWith = new VerticalPanel(); final VerticalPanel vpShareWith = new VerticalPanel();
vpShareWith.setHorizontalAlign(HorizontalAlignment.CENTER); vpShareWith.setHorizontalAlign(HorizontalAlignment.CENTER);
shareWith = new Label(SHARE_WITH); shareWith = new Label(SHARE_WITH);
vpShareWith.add(shareWith); vpShareWith.add(shareWith);
gridShareWith = new Grid<InfoContactModel>(storeTarget,createColumnModel()); gridShareWith = new Grid<InfoContactModel>(storeTarget,createColumnModel());
final StoreFilterField<InfoContactModel> filter2 = new StoreFilterField<InfoContactModel>() { final StoreFilterField<InfoContactModel> filter2 = new StoreFilterField<InfoContactModel>() {
@ -523,7 +529,7 @@ public class MultiDragContact extends ContentPanel {
if (contact != null) if (contact != null)
storeSource.add(contact); storeSource.add(contact);
} }
public void addTargetContact(InfoContactModel contact) { public void addTargetContact(InfoContactModel contact) {
if (contact != null) if (contact != null)
storeTarget.add(contact); storeTarget.add(contact);
@ -554,28 +560,28 @@ public class MultiDragContact extends ContentPanel {
} }
}); });
} }
// public void setHeadTitle(String headTitle){ // public void setHeadTitle(String headTitle){
// this.headTitle = headTitle; // this.headTitle = headTitle;
// //
// if(headTitle==null) // if(headTitle==null)
// this.setHeading(GROUP_DRAGGING_CONTACTS); // this.setHeading(GROUP_DRAGGING_CONTACTS);
// else // else
// this.setHeading(headTitle); // this.setHeading(headTitle);
// } // }
public void setLeftListContactsTitle(String leftListContactsTitle) { public void setLeftListContactsTitle(String leftListContactsTitle) {
this.leftListContactsTitle = leftListContactsTitle; this.leftListContactsTitle = leftListContactsTitle;
if(leftListContactsTitle==null) if(leftListContactsTitle==null)
allContacts.setText(ALL_CONTACTS); allContacts.setText(ALL_CONTACTS);
else else
allContacts.setText(leftListContactsTitle); allContacts.setText(leftListContactsTitle);
} }
public void setRightListContactsTitle(String rightListContactsTitle) { public void setRightListContactsTitle(String rightListContactsTitle) {
this.rightListContactsTitle = rightListContactsTitle; this.rightListContactsTitle = rightListContactsTitle;
if(rightListContactsTitle==null) if(rightListContactsTitle==null)
shareWith.setText(SHARE_WITH); shareWith.setText(SHARE_WITH);
else else