diff --git a/.classpath b/.classpath index fc9be77..b6ef958 100644 --- a/.classpath +++ b/.classpath @@ -22,7 +22,6 @@ - @@ -34,9 +33,9 @@ - + - + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index b257af7..443e085 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,6 +1,6 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error diff --git a/distro/changelog.xml b/distro/changelog.xml index 184b634..587fcc6 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,8 @@ + + drop down menu replaced with checkbox for notifications, see Task #9971 + Ported to Java8 diff --git a/pom.xml b/pom.xml index 190ff4c..560f538 100644 --- a/pom.xml +++ b/pom.xml @@ -113,7 +113,7 @@ org.gcube.portlets.widgets fileupload-progress-bar - [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT) + [1.5.0-SNAPSHOT, 2.0.0-SNAPSHOT) compile 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 64ce409..1e01393 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 @@ -3,9 +3,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import net.eliasbalasis.tibcopagebus4gwt.client.PageBusAdapter; -import net.eliasbalasis.tibcopagebus4gwt.client.PageBusAdapterException; - import org.gcube.portal.databook.shared.ClientFeed; import org.gcube.portal.databook.shared.ClientFeed.ClientFeedJsonizer; import org.gcube.portal.databook.shared.FeedType; @@ -54,6 +51,9 @@ import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment; import com.google.gwt.user.client.ui.Widget; + +import net.eliasbalasis.tibcopagebus4gwt.client.PageBusAdapter; +import net.eliasbalasis.tibcopagebus4gwt.client.PageBusAdapterException; /** * The main share update class. * @author Massimiliano Assante at ISTI CNR @@ -150,10 +150,6 @@ public class ShareUpdateForm extends Composite { @UiField ListBox privacyLevel = new ListBox(); - - @UiField - ListBox notifyListbox = new ListBox(); - @UiField SaveInWorkspaceBox saveInWorkspaceCheckbox; @@ -217,12 +213,7 @@ public class ShareUpdateForm extends Composite { //change css if deployed in VRE scope if (!userSettings.isInfrastructure()) { - notifyListbox.addItem("Share with: " + singleVREName); - notifyListbox.addItem("Share with: " + singleVREName+" + Notification to members"); - if (notificationEmail) { - notifyListbox.setSelectedIndex(1); - } - notifyListbox.setVisible(true); + setNotifyCheckboxValue(notificationEmail); } else privacyLevel.setVisible(true); @@ -480,7 +471,13 @@ public class ShareUpdateForm extends Composite { onSubmitClickHandlerBody(e); } + public final native boolean getNotifyCheckboxValue() /*-{ + return $doc.getElementById("notifyCheckbox").checked; + }-*/; + public final native void setNotifyCheckboxValue(boolean value) /*-{ + $doc.getElementById("notifyCheckbox").checked = value; + }-*/; /** * Publish a post. @@ -508,8 +505,7 @@ public class ShareUpdateForm extends Composite { } // notify group information - boolean notifyGroup = notifyListbox.getSelectedIndex() > 0; - + boolean notifyGroup = getNotifyCheckboxValue(); // case in which there are no attachments but there could be a link preview if(postContent == PostContent.ONLY_TEXT || postContent == PostContent.TEXT_AND_LINK){ 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 df46767..eeab662 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 @@ -7,10 +7,17 @@ width: 100%; } + .checkbox-inline { + display: inline-block; + vertical-align: middle; + float: left; + } + .paragraph-inline { display: inline-block; width: 25%; vertical-align: middle; + float: right; } @@ -43,12 +50,17 @@ - - - + + + + + + @@ -62,6 +74,8 @@ visible="false" /> + Notify diff --git a/src/main/webapp/ShareUpdates.css b/src/main/webapp/ShareUpdates.css index 590920c..2d3c561 100644 --- a/src/main/webapp/ShareUpdates.css +++ b/src/main/webapp/ShareUpdates.css @@ -1,5 +1,21 @@ +input#notifyCheckbox[type="checkbox"] { + display:none; +} +input#notifyCheckbox[type="checkbox"] + label span { + display:inline-block; + width:19px; + height:19px; + margin:-2px 10px 0 0; + vertical-align:middle; + background:url(images/check_radio_sheet.png) left top no-repeat; + cursor:pointer; +} +input#notifyCheckbox[type="checkbox"]:checked + label span { + background:url(images/check_radio_sheet.png) -19px top no-repeat; +} + @media screen and (max-width: 1050px) { - select.wizardListbox { + label.wizardListbox { width: 100% !important; } .attachment-container-full-width { @@ -332,14 +348,11 @@ a.link:hover { background-image: none; } -select.wizardListbox { +label.wizardListbox { + display: inline; width: 65%; - background: #F2F2F2 url(images/white-grad.png) repeat-x scroll left top; - border-color: #BBB; color: #444; - font-size: 12px; - border-width: 1px; - border-style: solid; + font-size: 16px; cursor: pointer; cursor: hand; margin-left: 0px; diff --git a/src/main/webapp/images/check_radio_sheet.png b/src/main/webapp/images/check_radio_sheet.png new file mode 100644 index 0000000..65f51cc Binary files /dev/null and b/src/main/webapp/images/check_radio_sheet.png differ