From ca73112dda74b03eedc37ac5f9b19b27f16830b6 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Wed, 30 Dec 2015 13:19:18 +0000 Subject: [PATCH] updated select and buttons layout git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@122094 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/view/ShareUpdateForm.java | 13 +++---- .../client/view/ShareUpdateForm.ui.xml | 36 +++++++++---------- src/main/webapp/ShareUpdates.css | 23 +++++++++++- .../WEB-INF/liferay-plugin-package.properties | 8 ++--- 4 files changed, 50 insertions(+), 30 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.java b/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.java index 9088cc3..f826a4a 100644 --- a/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.java +++ b/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.java @@ -34,7 +34,7 @@ import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiHandler; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.Button; +import com.github.gwtbootstrap.client.ui.Button; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.FileUpload; import com.google.gwt.user.client.ui.HTML; @@ -102,7 +102,7 @@ public class ShareUpdateForm extends Composite { Button submitButton; @UiField - HTML attachButton; + Button attachButton; @UiField Image avatarImage; @@ -140,9 +140,9 @@ public class ShareUpdateForm extends Composite { shareTextArea.setText(SHARE_UPDATE_TEXT); attachButton.getElement().getStyle().setDisplay(Display.INLINE); - attachButton.setHTML("    "); - - + // attachButton.setHTML("    "); + attachButton.addStyleName("upload-btn-m"); + shareupdateService.getUserSettings(new AsyncCallback() { public void onFailure(Throwable caught) { avatarImage.setUrl(avatar_default); @@ -182,6 +182,8 @@ public class ShareUpdateForm extends Composite { } else privacyLevel.setVisible(true); + attachButton.setVisible(true); + submitButton.setVisible(true); } }); } @@ -398,7 +400,6 @@ public class ShareUpdateForm extends Composite { GWT.log("Failed"); uploadProgress.showRegisteringResult(false); preview.clear(); - attachButton.getElement().getStyle().setVisibility(Visibility.VISIBLE); //beacuse otherwise it looses the other properties setting submitButton.setEnabled(true); final HorizontalPanel hp = new HorizontalPanel(); final Button close = new Button("Try Again"); diff --git a/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.ui.xml b/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.ui.xml index 793009c..041f7cb 100644 --- a/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.ui.xml +++ b/src/main/java/org/gcube/portlets/user/shareupdates/client/view/ShareUpdateForm.ui.xml @@ -1,7 +1,7 @@ + xmlns:b="urn:import:com.github.gwtbootstrap.client.ui" xmlns:j="urn:import:org.gcube.portlets.widgets.fileupload.client.view"> @@ -25,29 +25,27 @@ - - +
- - + -
\ No newline at end of file diff --git a/src/main/webapp/ShareUpdates.css b/src/main/webapp/ShareUpdates.css index c881b3e..fbfcff6 100644 --- a/src/main/webapp/ShareUpdates.css +++ b/src/main/webapp/ShareUpdates.css @@ -1,8 +1,30 @@ +form { + margin-top: 5px !important; + margin-bottom: 0px !important; +} + +fieldset { + padding-bottom: 0px !important; + padding-left: 0px !important; +} + +fieldset .control-group { + margin-bottom: 0px; +} + +fieldset select { + margin-bottom: 0px; +} + .share-updates-table { border-collapse: collapse; width: 100%; } +.upload-btn-m { + margin: 0 13px; +} + .share-updates-table .share-updates-cell { padding-left: 3px; } @@ -85,7 +107,6 @@ } /* DIV trick ends here */ - .gwt-Button { text-shadow: none; font-weight: normal; diff --git a/src/main/webapp/WEB-INF/liferay-plugin-package.properties b/src/main/webapp/WEB-INF/liferay-plugin-package.properties index 6b3b338..6f212c2 100644 --- a/src/main/webapp/WEB-INF/liferay-plugin-package.properties +++ b/src/main/webapp/WEB-INF/liferay-plugin-package.properties @@ -1,9 +1,9 @@ name=ShareUpdates module-group-id=liferay -module-incremental-version=1 +module-incremental-version=2 tags= short-description= change-log= -page-url=http://www.liferay.com -author=Liferay, Inc. -licenses=LGPL \ No newline at end of file +page-url=http://www.gcube-system.com +author=Massimiliano Assante +licenses=EUPL