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"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
|
||||||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<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"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</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>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="owner.project.facets" value="java"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/share-updates-2.4.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/share-updates-2.4.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
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.compliance=1.7
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<ReleaseNotes>
|
<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"
|
<Changeset component="org.gcube.portlets-user.shareupdates.2-4-0"
|
||||||
date="2017-05-03">
|
date="2017-05-03">
|
||||||
<Change>Ported to Java8</Change>
|
<Change>Ported to Java8</Change>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -113,7 +113,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
<artifactId>fileupload-progress-bar</artifactId>
|
<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>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -3,9 +3,6 @@ import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
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;
|
||||||
import org.gcube.portal.databook.shared.ClientFeed.ClientFeedJsonizer;
|
import org.gcube.portal.databook.shared.ClientFeed.ClientFeedJsonizer;
|
||||||
import org.gcube.portal.databook.shared.FeedType;
|
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.Image;
|
||||||
import com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment;
|
import com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment;
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
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.
|
* The main share update class.
|
||||||
* @author Massimiliano Assante at ISTI CNR
|
* @author Massimiliano Assante at ISTI CNR
|
||||||
|
@ -150,10 +150,6 @@ public class ShareUpdateForm extends Composite {
|
||||||
|
|
||||||
@UiField
|
@UiField
|
||||||
ListBox privacyLevel = new ListBox();
|
ListBox privacyLevel = new ListBox();
|
||||||
|
|
||||||
@UiField
|
|
||||||
ListBox notifyListbox = new ListBox();
|
|
||||||
|
|
||||||
@UiField
|
@UiField
|
||||||
SaveInWorkspaceBox saveInWorkspaceCheckbox;
|
SaveInWorkspaceBox saveInWorkspaceCheckbox;
|
||||||
|
|
||||||
|
@ -217,12 +213,7 @@ public class ShareUpdateForm extends Composite {
|
||||||
|
|
||||||
//change css if deployed in VRE scope
|
//change css if deployed in VRE scope
|
||||||
if (!userSettings.isInfrastructure()) {
|
if (!userSettings.isInfrastructure()) {
|
||||||
notifyListbox.addItem("Share with: " + singleVREName);
|
setNotifyCheckboxValue(notificationEmail);
|
||||||
notifyListbox.addItem("Share with: " + singleVREName+" + Notification to members");
|
|
||||||
if (notificationEmail) {
|
|
||||||
notifyListbox.setSelectedIndex(1);
|
|
||||||
}
|
|
||||||
notifyListbox.setVisible(true);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
privacyLevel.setVisible(true);
|
privacyLevel.setVisible(true);
|
||||||
|
@ -480,7 +471,13 @@ public class ShareUpdateForm extends Composite {
|
||||||
onSubmitClickHandlerBody(e);
|
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.
|
* Publish a post.
|
||||||
|
@ -508,8 +505,7 @@ public class ShareUpdateForm extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
// notify group information
|
// 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
|
// case in which there are no attachments but there could be a link preview
|
||||||
if(postContent == PostContent.ONLY_TEXT || postContent == PostContent.TEXT_AND_LINK){
|
if(postContent == PostContent.ONLY_TEXT || postContent == PostContent.TEXT_AND_LINK){
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,17 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.checkbox-inline {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
.paragraph-inline {
|
.paragraph-inline {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 25%;
|
width: 25%;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
</ui:style>
|
</ui:style>
|
||||||
<g:HTMLPanel ui:field="mainPanel">
|
<g:HTMLPanel ui:field="mainPanel">
|
||||||
|
@ -43,12 +50,17 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="share-updates-cell">
|
<td class="share-updates-cell">
|
||||||
<b:Form>
|
<b:Form>
|
||||||
|
|
||||||
<b:ListBox styleName="wizardListbox" ui:field="privacyLevel"
|
<b:ListBox styleName="wizardListbox" ui:field="privacyLevel"
|
||||||
visible="false" />
|
visible="false" />
|
||||||
<b:ListBox styleName="wizardListbox" ui:field="notifyListbox"
|
<g:SimplePanel styleName="{style.checkbox-inline}">
|
||||||
visible="false" />
|
<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}">
|
<g:HorizontalPanel styleName="{style.paragraph-inline}">
|
||||||
<b:Button ui:field="attachButtonScreen" icon="UPLOAD_ALT"
|
<b:Button ui:field="attachButtonScreen" icon="UPLOAD_ALT"
|
||||||
visible="false" />
|
visible="false" />
|
||||||
|
@ -62,6 +74,8 @@
|
||||||
visible="false" />
|
visible="false" />
|
||||||
<b:Button ui:field="submitButtonPhoneTablet" type="PRIMARY"
|
<b:Button ui:field="submitButtonPhoneTablet" type="PRIMARY"
|
||||||
text="Share" visible="false" />
|
text="Share" visible="false" />
|
||||||
|
<b:CheckBox styleName="wizardListbox" ui:field="notifyViaEmail"
|
||||||
|
visible="false">Notify</b:CheckBox>
|
||||||
</b:Form>
|
</b:Form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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) {
|
@media screen and (max-width: 1050px) {
|
||||||
select.wizardListbox {
|
label.wizardListbox {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
.attachment-container-full-width {
|
.attachment-container-full-width {
|
||||||
|
@ -332,14 +348,11 @@ a.link:hover {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
select.wizardListbox {
|
label.wizardListbox {
|
||||||
|
display: inline;
|
||||||
width: 65%;
|
width: 65%;
|
||||||
background: #F2F2F2 url(images/white-grad.png) repeat-x scroll left top;
|
|
||||||
border-color: #BBB;
|
|
||||||
color: #444;
|
color: #444;
|
||||||
font-size: 12px;
|
font-size: 16px;
|
||||||
border-width: 1px;
|
|
||||||
border-style: solid;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
cursor: hand;
|
cursor: hand;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in New Issue