X-Git-Url: https://code.grnet.gr/git/pithos/blobdiff_plain/ce98bfc619a13df1884b185f3c9eb066f7738c8f..5b09ea6c7d2b6fcb2cd27c6b8d664f0a962d9b51:/src/gr/ebs/gss/client/AbstractPropertiesDialog.java diff --git a/src/gr/ebs/gss/client/AbstractPropertiesDialog.java b/src/gr/ebs/gss/client/AbstractPropertiesDialog.java index 2f00992..b940e66 100644 --- a/src/gr/ebs/gss/client/AbstractPropertiesDialog.java +++ b/src/gr/ebs/gss/client/AbstractPropertiesDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2007, 2008, 2009 Electronic Business Systems Ltd. + * Copyright 2007, 2008, 2009, 2010 Electronic Business Systems Ltd. * * This file is part of GSS. * @@ -30,9 +30,10 @@ import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.user.client.DeferredCommand; import com.google.gwt.user.client.Event.NativePreviewEvent; +import com.google.gwt.user.client.ui.Anchor; import com.google.gwt.user.client.ui.DialogBox; import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.TabPanel; import com.google.gwt.user.client.ui.TextBox; @@ -85,18 +86,21 @@ public abstract class AbstractPropertiesDialog extends DialogBox { allTagsContent.clear(); TagsResource tagr = getResult(); List userTags = tagr.getTags(); - HTML tag = null; + Anchor tag = null; for(String usrTag : userTags){ - tag = new HTML(usrTag.toString()+" ", true); + tag = new Anchor(usrTag.toString(), false); tag.addStyleName("gss-tag"); allTagsContent.add(tag); + Label separator = new Label(", "); + separator.addStyleName("gss-tag"); + allTagsContent.add(separator); tag.addClickHandler( new ClickHandler() { - + @Override public void onClick(ClickEvent event) { String existing = tags.getText(); if (MULTIPLE_VALUES_TEXT.equals(existing)) existing = ""; - String newTag = ((HTML) event.getSource()).getText().trim(); + String newTag = ((Anchor) event.getSource()).getText().trim(); // insert the new tag only if it is not in the list // already if (existing.indexOf(newTag) == -1 && !existing.trim().endsWith(newTag))