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()) { while (itr.hasNext()) {
String hashtagName = itr.next(); String hashtagName = itr.next();
html.openSpan() html.openSpan()
.setAttribute("role", "listitem")
.setAttribute(DATA_ID, hashtagName) .setAttribute(DATA_ID, hashtagName)
.setStyleName(style.hashtagName()) .setStyleName(style.hashtagName())
.openAnchor()
.setAttribute("href", "#" + PageLinks.toChangeQuery("hashtag:" + hashtagName))
.setAttribute("role", "listitem")
.append(hashtagName) .append(hashtagName)
.closeAnchor()
.openElement("button") .openElement("button")
.setAttribute("title", "Remove hashtag") .setAttribute("title", "Remove hashtag")
.setAttribute("onclick", REMOVE + "(event)") .setAttribute("onclick", REMOVE + "(event)")
.append( .append(
new ImageResourceRenderer().render(Resources.I.remove_reviewer())) new ImageResourceRenderer().render(Resources.I.remove_reviewer()))
.closeElement("button"); .closeElement("button")
html.closeSpan(); .closeSpan();
if (itr.hasNext()) { if (itr.hasNext()) {
html.append(' '); html.append(' ');
} }