diff --git a/pom.xml b/pom.xml
index 5e321bd..546b655 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
org.gcube.portlets.user
workspace
war
- 6.9.0-SNAPSHOT
+ 6.10.0-SNAPSHOT
gCube Workspace Portlet
gcube Workspace Portlet is a portlet for users workspace management
diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/WorkspaceFeatures.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/WorkspaceFeatures.java
index 43dbe26..145ea4a 100644
--- a/src/main/java/org/gcube/portlets/user/workspace/client/view/WorkspaceFeatures.java
+++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/WorkspaceFeatures.java
@@ -3,6 +3,8 @@
*/
package org.gcube.portlets.user.workspace.client.view;
+import org.gcube.portlets.user.workspace.client.resources.Resources;
+
import com.github.gwtbootstrap.client.ui.Label;
import com.github.gwtbootstrap.client.ui.Popover;
import com.github.gwtbootstrap.client.ui.constants.Placement;
@@ -12,6 +14,7 @@ import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Widget;
@@ -23,24 +26,33 @@ import com.google.gwt.user.client.ui.Widget;
public class WorkspaceFeatures extends Composite {
@UiField
- Label ws_quote_alert;
-
- @UiField
- FlowPanel ws_features;
+ HorizontalPanel ws_features;
@UiField
HorizontalPanel hp_feautures;
@UiField
- Label dnd;
+ com.google.gwt.user.client.ui.Label how_to;
@UiField
- Label plk;
-
- private Popover overDnD = new Popover();
+ Label ws_quote;
+ @UiField
+ Label shf; //Share Folders & Files
+
+ private Popover overShF= new Popover();
+
+ @UiField
+ Label upl; //DRAG & DROP
+
+ private Popover overUpload = new Popover();
+
+ @UiField
+ Label plk; //PUBLIC LINK
+
private Popover overPlk = new Popover();
+
@UiField
FlowPanel fp1;
@@ -59,7 +71,7 @@ public class WorkspaceFeatures extends Composite {
* 2015
*/
interface WorkspaceFeaturesUiBinder extends
- UiBinder {
+ UiBinder {
}
/**
@@ -68,34 +80,64 @@ public class WorkspaceFeatures extends Composite {
public WorkspaceFeatures() {
initWidget(uiBinder.createAndBindUi(this));
+ hp_feautures.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
+ ws_features.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
hp_feautures.setCellWidth(fp1, "33%");
hp_feautures.setCellWidth(fp2, "33%");
hp_feautures.setCellWidth(fp3, "33%");
- fp3.getElement().getStyle().setTextAlign(com.google.gwt.dom.client.Style.TextAlign.RIGHT);
- initPopupDndFeature();
+ how_to.addStyleName("margin-right-10");
+ shf.addStyleName("margin-right-10");
+ upl.addStyleName("margin-right-10");
+ plk.addStyleName("margin-right-10");
+ initPopupShareFeature();
+ initPopupUploadFeature();
initPopupPlkFeature();
- // ws_features.add
+ }
+
+ /**
+ *
+ */
+ private void initPopupShareFeature() {
+ overShF.setAnimation(false);
+ overShF.setWidget(shf);
+ overShF.setHeading("Workspace Share Folders and Files");
+ String icon = ""+Resources.getIconShareFolder().getSafeHtml().asString()+"";
+ overShF.setText(icon+"The quickest way to share something is using the Share Folder. Locate the folder with the files you want to share and then click 'Share'");
+ overShF.setHtml(true);
+ overShF.setPlacement(Placement.TOP);
+ overShF.setTrigger(Trigger.HOVER);
+ overShF.reconfigure();
}
/**
*
*/
- private void initPopupDndFeature() {
- overDnD.setAnimation(true);
- overDnD.setWidget(dnd);
- overDnD.setHeading("Workspace DnD");
- overDnD.setText("Drag & Drop your files from Desktop to upload to Workspace");
- overDnD.setPlacement(Placement.TOP);
- overDnD.setTrigger(Trigger.HOVER);
- overDnD.reconfigure();
+ private void initPopupUploadFeature() {
+ overUpload.setAnimation(false);
+ overUpload.setWidget(upl);
+ overUpload.setHeading("Workspace Upload Files and Archives");
+ String iconUploadDND = ""+Resources.getIconHand().getSafeHtml().asString()+"";
+ String iconUploadFile = ""+Resources.getIconFileUpload().getSafeHtml().asString()+"";
+ String iconUploadArchive = ""+Resources.getIconArchiveUpload().getSafeHtml().asString()+"";
+ overUpload.setText("You can upload files in the Workspace in several ways:
"
+ +iconUploadDND+ "1 - Drop your files from Desktop;
"
+ +iconUploadFile+ "2 - Click 'Upload' and Browse Files;
"
+ +iconUploadArchive+ "3 - Upload a zip file to unzip directly its content in the Workspace.
");
+
+ overUpload.setHtml(true);
+ overUpload.setPlacement(Placement.TOP);
+ overUpload.setTrigger(Trigger.HOVER);
+ overUpload.reconfigure();
// overImgUpload.show();
}
private void initPopupPlkFeature() {
- overPlk.setAnimation(true);
+ overPlk.setAnimation(false);
overPlk.setWidget(plk);
overPlk.setHeading("Workspace Public Link");
- overPlk.setText("Create links to files in your Workspace to download them. You can send the links to anyone by pasting them into Workspace Message, your emails, instant messages, etc.");
+ String icon = ""+Resources.getIconPublicLink().getSafeHtml().asString()+"";
+ overPlk.setText(icon+"Create links to files in your Workspace to download them. You can send the links to anyone by pasting them into Workspace Message, your emails, instant messages, etc.");
+ overPlk.setHtml(true);
overPlk.setPlacement(Placement.TOP);
overPlk.setTrigger(Trigger.HOVER);
overPlk.reconfigure();
@@ -106,28 +148,21 @@ public class WorkspaceFeatures extends Composite {
* @param html
*/
public void updateQuotes(String html) {
- ws_quote_alert.setText(html);
+ ws_quote.setText(html);
}
-
-// public void showImgUploadDnD(boolean show) {
-// if (show)
-// overImgUpload.show();
-// else
-// overImgUpload.hide();
-// }
-
+
/**
* @param bool
*/
public void setQuoteVisible(boolean bool) {
- ws_quote_alert.setVisible(bool);
+ ws_quote.setVisible(bool);
}
/**
* @param bool
*/
public void setDndFeatureVisible(boolean bool) {
- dnd.setVisible(bool);
+ upl.setVisible(bool);
}
}
diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/WorkspaceFeatures.ui.xml b/src/main/java/org/gcube/portlets/user/workspace/client/view/WorkspaceFeatures.ui.xml
index 836eca3..e8c5407 100644
--- a/src/main/java/org/gcube/portlets/user/workspace/client/view/WorkspaceFeatures.ui.xml
+++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/WorkspaceFeatures.ui.xml
@@ -5,15 +5,18 @@
-
+
-
-
-
-
+
+ How-to:
+
+
+
+
+
diff --git a/src/main/webapp/workspaceportlet.css b/src/main/webapp/workspaceportlet.css
index 4226cc6..310803c 100644
--- a/src/main/webapp/workspaceportlet.css
+++ b/src/main/webapp/workspaceportlet.css
@@ -391,6 +391,6 @@
width: 33%;
}
-.margin-right-5{
- margin-right: 5px;
+.margin-right-10{
+ margin-right: 10px;
}
\ No newline at end of file