Make hashtags clickable

Change-Id: I802c8a0e0bcdb0b3dce69b6ea4e68b9a36660e8a
This commit is contained in:
Gustaf Lundh
2014-09-11 17:56:37 +02:00
committed by David Pursehouse
parent 28ecae5234
commit 49fc8fe7d2

View File

@@ -159,17 +159,20 @@ public class Hashtags extends Composite {
while (itr.hasNext()) {
String hashtagName = itr.next();
html.openSpan()
.setAttribute("role", "listitem")
.setAttribute(DATA_ID, hashtagName)
.setStyleName(style.hashtagName())
.openAnchor()
.setAttribute("href", "#" + PageLinks.toChangeQuery("hashtag:" + hashtagName))
.setAttribute("role", "listitem")
.append(hashtagName)
.closeAnchor()
.openElement("button")
.setAttribute("title", "Remove hashtag")
.setAttribute("onclick", REMOVE + "(event)")
.append(
new ImageResourceRenderer().render(Resources.I.remove_reviewer()))
.closeElement("button");
html.closeSpan();
.closeElement("button")
.closeSpan();
if (itr.hasNext()) {
html.append(' ');
}