diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs index 2bfb926..d7bcb6b 100644 --- a/.settings/com.google.gdt.eclipse.core.prefs +++ b/.settings/com.google.gdt.eclipse.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 jarsExcludedFromWebInfLib= -lastWarOutDir=/home/francesco-mangiacrapa/wseclipse/speciesdiscovery(trunk)/target/species-discovery-3.3.0-SNAPSHOT +lastWarOutDir=/home/francesco-mangiacrapa/wseclipse/speciesdiscovery/target/species-discovery-3.3.0-SNAPSHOT warSrcDir=src/main/webapp warSrcDirIsOutput=false diff --git a/pom.xml b/pom.xml index bf2b1af..b060fca 100644 --- a/pom.xml +++ b/pom.xml @@ -51,21 +51,20 @@ [3.0.0-SNAPSHOT, 4.0.0-SNAPSHOT) provided - - - xerces - xercesImpl - 2.9.1 - provided - + + + + + + + - - com.googlecode.gwtquery - gwtquery - 1.3.3 - provided - + + + + + + diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/job/SpeciesJobPanel.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/job/SpeciesJobPanel.java index ecf4da3..4a4f4ec 100644 --- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/job/SpeciesJobPanel.java +++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/job/SpeciesJobPanel.java @@ -22,7 +22,7 @@ import com.google.gwt.user.client.ui.AbstractImagePrototype; public class SpeciesJobPanel extends ContentPanel{ protected static final String EMPTY = "Empty"; - protected static final String LAST_QUERY = "Last query: "; + protected static final String CURRENT_QUERY = "Current query: "; private ToolBar toolbar = new ToolBar(); @@ -33,7 +33,7 @@ public class SpeciesJobPanel extends ContentPanel{ private int jobOccurrenceCount = 0; private int jobTaxonomyCount = 0; - private TextField lastQuery; + private TextField currentQuery; public SpeciesJobPanel(EventBus eventBus) { this.setTopComponent(toolbar); @@ -50,20 +50,20 @@ public class SpeciesJobPanel extends ContentPanel{ createTaxonomyToolBar(); - Text txtLastQuery = new Text(LAST_QUERY); + Text txtLastQuery = new Text(CURRENT_QUERY); txtLastQuery.setStyleAttribute("padding-right", "2px"); txtLastQuery.setStyleAttribute("color", "gray"); - lastQuery = new TextField(); + currentQuery = new TextField(); - lastQuery.setReadOnly(true); - lastQuery.setWidth(400); - lastQuery.setValue(EMPTY); + currentQuery.setReadOnly(true); + currentQuery.setWidth(400); + currentQuery.setValue(EMPTY); toolbar.add(new FillToolItem()); toolbar.add(txtLastQuery); - toolbar.add(lastQuery); + toolbar.add(currentQuery); - RenderTextFieldUtil.setTextFieldAttr(lastQuery, "background", "none"); + RenderTextFieldUtil.setTextFieldAttr(currentQuery, "background", "none"); // RenderTextFieldUtil.setTextFieldAttr(lastQuery, "text-align", "right"); } @@ -112,11 +112,11 @@ public class SpeciesJobPanel extends ContentPanel{ } public void setLastQuery(String query){ - this.lastQuery.setValue(query); + this.currentQuery.setValue(query); } public void setLastQueryAsEmpty(){ - this.lastQuery.setValue(EMPTY); + this.currentQuery.setValue(EMPTY); } private void resetOccurrenceCounter(){ diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/switchbutton/SwitchButton.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/switchbutton/SwitchButton.java deleted file mode 100644 index ea5c51e..0000000 --- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/switchbutton/SwitchButton.java +++ /dev/null @@ -1,132 +0,0 @@ -package org.gcube.portlets.user.speciesdiscovery.client.switchbutton; - -import static com.google.gwt.query.client.GQuery.$; - -import org.gcube.portlets.user.gcubewidgets.client.elements.Div; -import org.gcube.portlets.user.gcubewidgets.client.elements.Span; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.logical.shared.ValueChangeEvent; -import com.google.gwt.event.logical.shared.ValueChangeHandler; -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.query.client.css.CSS; -import com.google.gwt.query.client.css.Length; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FocusPanel; -import com.google.gwt.user.client.ui.HasName; -import com.google.gwt.user.client.ui.HasValue; -import com.google.gwt.user.client.ui.Widget; - -public class SwitchButton extends Composite implements HasName, HasValue{ - - private static SwitchButtonUiBinder uiBinder = GWT - .create(SwitchButtonUiBinder.class); - - interface SwitchButtonUiBinder extends UiBinder { - } - @UiField FocusPanel switchContainer; - @UiField Div switcherButton; - @UiField Span labelOff; - @UiField Span labelOn; - private String name; - private Boolean value; - private Boolean valueChangeHandlerInitialized = Boolean.FALSE; - - public SwitchButton() { - name = DOM.createUniqueId(); - initWidget(uiBinder.createAndBindUi(this)); - value = false; - $(switcherButton).css(CSS.LEFT.with(Length.px(-1))); - ensureDomEventHandlers(); - } - - public SwitchButton(boolean initialValue) { - this(); - setValue(initialValue); - } - - @Override - public HandlerRegistration addValueChangeHandler(ValueChangeHandler handler) { - // Is this the first value change handler? If so, time to add handlers - if (!valueChangeHandlerInitialized) { - valueChangeHandlerInitialized = true; - } - return addHandler(handler, ValueChangeEvent.getType()); - } - - @Override - public Boolean getValue() { - return value; - } - /** - * Checks or unchecks the switch button box, firing {@link ValueChangeEvent} if - * appropriate. - *

- * Note that this does not set the value property of the checkbox - * input element wrapped by this widget. For access to that property, see - * {@link #setFormValue(String)} - * - * @param value true to set on, false to set off; null value implies false - */ - @Override - public void setValue(Boolean value) { - if (value == null) { - value = Boolean.FALSE; - } - - Boolean oldValue = getValue(); - if (value.equals(oldValue)) { - return; - } - this.value = value; - if (!value) { - $(switcherButton).animate("left: -1", 250); - labelOff.setStyleName("switch-button-label on"); - labelOn.setStyleName("switch-button-label off"); - } else { - $(switcherButton).animate("left: 12", 250); - labelOff.setStyleName("switch-button-label off"); - labelOn.setStyleName("switch-button-label on"); - } - } - /** - * Checks or unchecks the switch button box, firing {@link ValueChangeEvent} if - * appropriate. - *

- * - * @param value true to set on, false to set off; null value implies false - * @param fireEvents If true, and value has changed, fire a - * {@link ValueChangeEvent} - */ - @Override - public void setValue(Boolean value, boolean fireEvents) { - setValue(value); - if (fireEvents) { - ValueChangeEvent.fire(this, value); - } - } - - protected void ensureDomEventHandlers() { - switchContainer.addClickHandler(new ClickHandler() { - public void onClick(ClickEvent event) { - setValue(!value); - ValueChangeEvent.fire(SwitchButton.this, getValue()); - } - }); - } - - @Override - public void setName(String name) { - this.name = name; - } - - @Override - public String getName() { - return name; - } -} diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/switchbutton/SwitchButton.ui.xml b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/switchbutton/SwitchButton.ui.xml deleted file mode 100644 index 0f7241f..0000000 --- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/switchbutton/SwitchButton.ui.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - OFF - - - - ON -

- - \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/asl/SessionUtil.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/asl/SessionUtil.java index d6d3e67..d91e4fe 100644 --- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/asl/SessionUtil.java +++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/asl/SessionUtil.java @@ -101,10 +101,10 @@ public class SessionUtil { if (user == null) { //for test only -// user = "test.user"; + user = "test.user"; // user = "lucio.lelii"; // user = "pasquale.pagano"; - user = "francesco.mangiacrapa"; +// user = "francesco.mangiacrapa"; String scope = "/gcube/devsec"; //Development // String scope = "/d4science.research-infrastructures.eu/gCubeApps/BiodiversityResearchEnvironment"; //Production diff --git a/src/main/resources/org/gcube/portlets/user/speciesdiscovery/SpeciesDiscovery.gwt.xml b/src/main/resources/org/gcube/portlets/user/speciesdiscovery/SpeciesDiscovery.gwt.xml index b9ef89f..6921145 100644 --- a/src/main/resources/org/gcube/portlets/user/speciesdiscovery/SpeciesDiscovery.gwt.xml +++ b/src/main/resources/org/gcube/portlets/user/speciesdiscovery/SpeciesDiscovery.gwt.xml @@ -11,7 +11,7 @@ - +