Updated pom version at 6.15.2
Updated Share and UserStore behaviours git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@141488 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4b6648616c
commit
8d128da470
|
@ -1,4 +1,12 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-15-2"
|
||||||
|
date="2016-01-09">
|
||||||
|
<Change>Added a loader on share window when contacts are loading from server</Change>
|
||||||
|
</Changeset>
|
||||||
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-15-1"
|
||||||
|
date="2016-01-05">
|
||||||
|
<Change>Removed message box shown in case of failure on getAllContatcs</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-15-0"
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-15-0"
|
||||||
date="2016-11-29">
|
date="2016-11-29">
|
||||||
<Change>[Feature #5873] Remove ASL Session from the Workspace and its components</Change>
|
<Change>[Feature #5873] Remove ASL Session from the Workspace and its components</Change>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>workspace-tree-widget</artifactId>
|
<artifactId>workspace-tree-widget</artifactId>
|
||||||
<version>6.15.1-SNAPSHOT</version>
|
<version>6.15.2-SNAPSHOT</version>
|
||||||
<name>gCube Workspace Tree Widget</name>
|
<name>gCube Workspace Tree Widget</name>
|
||||||
<description>
|
<description>
|
||||||
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.portlets.user.workspace.client.util;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||||
|
|
||||||
|
import com.github.gwtbootstrap.client.ui.Label;
|
||||||
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
|
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||||
|
import com.google.gwt.user.client.ui.Image;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* Jan 9, 2017
|
||||||
|
*/
|
||||||
|
public class MaskPanel extends FlowPanel{
|
||||||
|
|
||||||
|
private HorizontalPanel hp = new HorizontalPanel();
|
||||||
|
private Image loading = Resources.getIconLoading().createImage();
|
||||||
|
private Label label = new Label();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public MaskPanel(String msg) {
|
||||||
|
msg = msg!=null &&!msg.isEmpty()?msg:"Loading...";
|
||||||
|
label.setText(msg);
|
||||||
|
//label.getElement().getStyle().setMarginRight(2.0, Unit.PX);
|
||||||
|
hp.add(label);
|
||||||
|
hp.add(loading);
|
||||||
|
add(hp);
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||||
|
import org.gcube.portlets.user.workspace.client.util.MaskPanel;
|
||||||
import org.gcube.portlets.user.workspace.client.view.sharing.ContactFetcher;
|
import org.gcube.portlets.user.workspace.client.view.sharing.ContactFetcher;
|
||||||
|
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
|
@ -15,6 +16,7 @@ import com.google.gwt.event.dom.client.KeyDownEvent;
|
||||||
import com.google.gwt.event.dom.client.KeyDownHandler;
|
import com.google.gwt.event.dom.client.KeyDownHandler;
|
||||||
import com.google.gwt.event.logical.shared.SelectionEvent;
|
import com.google.gwt.event.logical.shared.SelectionEvent;
|
||||||
import com.google.gwt.event.logical.shared.SelectionHandler;
|
import com.google.gwt.event.logical.shared.SelectionHandler;
|
||||||
|
import com.google.gwt.user.client.Random;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
import com.google.gwt.user.client.ui.Composite;
|
import com.google.gwt.user.client.ui.Composite;
|
||||||
import com.google.gwt.user.client.ui.FlowPanel;
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
|
@ -28,6 +30,7 @@ import com.google.gwt.user.client.ui.TextBox;
|
||||||
*
|
*
|
||||||
* @author Massimiliano Assante, ISTI-CNR
|
* @author Massimiliano Assante, ISTI-CNR
|
||||||
* @version 0.2 Gen 2013 modified by Francesco Mangiacrapa
|
* @version 0.2 Gen 2013 modified by Francesco Mangiacrapa
|
||||||
|
* @version 0.3 Gen 2017 modified by Francesco Mangiacrapa
|
||||||
* Facebook style autocompleter
|
* Facebook style autocompleter
|
||||||
*/
|
*/
|
||||||
public class MultiValuePanel extends Composite {
|
public class MultiValuePanel extends Composite {
|
||||||
|
@ -41,6 +44,7 @@ public class MultiValuePanel extends Composite {
|
||||||
private SuggestBox box;
|
private SuggestBox box;
|
||||||
private ContactFetcher userFetch;
|
private ContactFetcher userFetch;
|
||||||
private MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
|
private MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
|
||||||
|
private MaskPanel mask = new MaskPanel("Loading Contacts...");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new multi value panel.
|
* Instantiates a new multi value panel.
|
||||||
|
@ -50,6 +54,7 @@ public class MultiValuePanel extends Composite {
|
||||||
public MultiValuePanel(ContactFetcher userFetch) {
|
public MultiValuePanel(ContactFetcher userFetch) {
|
||||||
this.userFetch = userFetch;
|
this.userFetch = userFetch;
|
||||||
initWidget(panel);
|
initWidget(panel);
|
||||||
|
this.getElement().setId("MultiValuePanel_"+Random.nextInt());
|
||||||
panel.setWidth("100%");
|
panel.setWidth("100%");
|
||||||
listBullet.setStyleName("multivalue-panel-suggest");
|
listBullet.setStyleName("multivalue-panel-suggest");
|
||||||
final ListItem item = new ListItem();
|
final ListItem item = new ListItem();
|
||||||
|
@ -57,6 +62,7 @@ public class MultiValuePanel extends Composite {
|
||||||
itemBox.getElement().setAttribute("autocomplete", "off");
|
itemBox.getElement().setAttribute("autocomplete", "off");
|
||||||
itemBox.getElement().setAttribute("style", "outline-color: -moz-use-text-color; outline-style: none; outline-width: medium; border: none;");
|
itemBox.getElement().setAttribute("style", "outline-color: -moz-use-text-color; outline-style: none; outline-width: medium; border: none;");
|
||||||
|
|
||||||
|
maskSuggestionPanel(true);
|
||||||
box = new SuggestBox(getSuggestions(), itemBox);
|
box = new SuggestBox(getSuggestions(), itemBox);
|
||||||
item.add(box);
|
item.add(box);
|
||||||
listBullet.add(item);
|
listBullet.add(item);
|
||||||
|
@ -97,6 +103,7 @@ public class MultiValuePanel extends Composite {
|
||||||
panel.add(listBullet);
|
panel.add(listBullet);
|
||||||
box.getElement().setId("suggestion_box"); //needed for the focus on click
|
box.getElement().setId("suggestion_box"); //needed for the focus on click
|
||||||
panel.getElement().setAttribute("onclick", "document.getElementById('suggestion_box').focus()");
|
panel.getElement().setAttribute("onclick", "document.getElementById('suggestion_box').focus()");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,6 +123,23 @@ public class MultiValuePanel extends Composite {
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void maskSuggestionPanel(boolean bool){
|
||||||
|
|
||||||
|
try{
|
||||||
|
if(bool){
|
||||||
|
GWT.log("Disabling panel suggestion");
|
||||||
|
this.getElement().addClassName("disabledDIV");
|
||||||
|
panel.add(mask);
|
||||||
|
}else{
|
||||||
|
GWT.log("Enabling panel suggestion");
|
||||||
|
this.getElement().removeClassName("disabledDIV");
|
||||||
|
panel.remove(mask);
|
||||||
|
}
|
||||||
|
}catch(Exception e){
|
||||||
|
GWT.log("error: "+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* actually insert the contact in the flow panel.
|
* actually insert the contact in the flow panel.
|
||||||
*
|
*
|
||||||
|
@ -212,18 +236,16 @@ public class MultiValuePanel extends Composite {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
maskSuggestionPanel(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<InfoContactModel> result) {
|
public void onSuccess(List<InfoContactModel> result) {
|
||||||
|
maskSuggestionPanel(false);
|
||||||
users.clear();
|
users.clear();
|
||||||
|
|
||||||
for (InfoContactModel wsUser : result) {
|
for (InfoContactModel wsUser : result) {
|
||||||
oracle.add(wsUser.getName());
|
oracle.add(wsUser.getName());
|
||||||
users.put(wsUser.getName(), wsUser);
|
users.put(wsUser.getName(), wsUser);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -253,6 +253,11 @@ table.userssuggest th {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.disabledDIV{
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
/** For the data catalogue modal **/
|
/** For the data catalogue modal **/
|
||||||
.insert-metadata-modal-style {
|
.insert-metadata-modal-style {
|
||||||
width: 1200px !important;
|
width: 1200px !important;
|
||||||
|
|
|
@ -127,6 +127,13 @@ public class GWTWorkspaceBuilder {
|
||||||
hashTestUser.put("francesco.mangiacrapa", new InfoContactModel("francesco.mangiacrapa", "francesco.mangiacrapa", "Francesco Mangiacrapa",false));
|
hashTestUser.put("francesco.mangiacrapa", new InfoContactModel("francesco.mangiacrapa", "francesco.mangiacrapa", "Francesco Mangiacrapa",false));
|
||||||
hashTestUser.put("massimiliano.assante", new InfoContactModel("massimiliano.assante", "massimiliano.assante", "Massimiliano Assante",false));
|
hashTestUser.put("massimiliano.assante", new InfoContactModel("massimiliano.assante", "massimiliano.assante", "Massimiliano Assante",false));
|
||||||
|
|
||||||
|
// try{
|
||||||
|
// logger.info("Sleeping for testing...");
|
||||||
|
// Thread.sleep(30000);
|
||||||
|
// logger.info("Alive again");
|
||||||
|
// }catch(Exception e){
|
||||||
|
//
|
||||||
|
// }
|
||||||
//GROUPS
|
//GROUPS
|
||||||
// hashTestUser.put("/gcube/devsec/devVRE", new InfoContactModel("/gcube/devsec/devVRE", "/gcube/devsec/devVRE", "",true));
|
// hashTestUser.put("/gcube/devsec/devVRE", new InfoContactModel("/gcube/devsec/devVRE", "/gcube/devsec/devVRE", "",true));
|
||||||
// hashTestUser.put("/gcube/devsec/gcube-test-test", new InfoContactModel("/gcube/devsec/gcube-test-test", "/gcube/gcube-test-test", "",true));
|
// hashTestUser.put("/gcube/devsec/gcube-test-test", new InfoContactModel("/gcube/devsec/gcube-test-test", "/gcube/gcube-test-test", "",true));
|
||||||
|
|
Loading…
Reference in New Issue