drop down menu replaced with checkbox for notifications, see Task #9971
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@160171 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e3a7220a95
commit
6f37db7641
|
@ -22,7 +22,6 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
|
@ -34,9 +33,9 @@
|
|||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/share-updates-2.4.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets-user.shareupdates.2-5-0"
|
||||
date="2017-12-07">
|
||||
<Change>drop down menu replaced with checkbox for notifications, see Task #9971</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.shareupdates.2-4-0"
|
||||
date="2017-05-03">
|
||||
<Change>Ported to Java8</Change>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -113,7 +113,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>fileupload-progress-bar</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
<version>[1.5.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -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){
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel ui:field="mainPanel">
|
||||
|
@ -43,12 +50,17 @@
|
|||
</td>
|
||||
<td class="share-updates-cell">
|
||||
<b:Form>
|
||||
|
||||
<b:ListBox styleName="wizardListbox" ui:field="privacyLevel"
|
||||
visible="false" />
|
||||
<b:ListBox styleName="wizardListbox" ui:field="notifyListbox"
|
||||
visible="false" />
|
||||
|
||||
<g:SimplePanel styleName="{style.checkbox-inline}">
|
||||
<g:HTMLPanel styleName="checkboxNotify">
|
||||
<input type="checkbox" id="notifyCheckbox" />
|
||||
<label for="notifyCheckbox">
|
||||
<span></span>
|
||||
Notify members
|
||||
</label>
|
||||
</g:HTMLPanel>
|
||||
</g:SimplePanel>
|
||||
<g:HorizontalPanel styleName="{style.paragraph-inline}">
|
||||
<b:Button ui:field="attachButtonScreen" icon="UPLOAD_ALT"
|
||||
visible="false" />
|
||||
|
@ -62,6 +74,8 @@
|
|||
visible="false" />
|
||||
<b:Button ui:field="submitButtonPhoneTablet" type="PRIMARY"
|
||||
text="Share" visible="false" />
|
||||
<b:CheckBox styleName="wizardListbox" ui:field="notifyViaEmail"
|
||||
visible="false">Notify</b:CheckBox>
|
||||
</b:Form>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -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;
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in New Issue