From a37a2f04719d21aec5cd2e84d8aa8b46bb73d730 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Sun, 1 Dec 2019 21:02:12 +0100 Subject: Generate entry number in the index of all entries. --- org/madore/damlengine/TodoWeblogIndexSelectElement.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/org/madore/damlengine/TodoWeblogIndexSelectElement.java b/org/madore/damlengine/TodoWeblogIndexSelectElement.java index cf326d8..b39b8da 100644 --- a/org/madore/damlengine/TodoWeblogIndexSelectElement.java +++ b/org/madore/damlengine/TodoWeblogIndexSelectElement.java @@ -86,15 +86,13 @@ public final class TodoWeblogIndexSelectElement extends TodoDefaultElement { li.setAttributeNS(null, "id", lk.getFragment()); li.setAttributeNS(null, "class", "weblog-index-entry"); LangHelper.setLangRec(li, ent.lang); - Element link; + li.appendChild(ctx.doc.createTextNode(ent.date+": ")); + Element link = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "a"); + li.appendChild(link); if ( ent.titleXml == null ) { - link = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "a"); - li.appendChild(link); - link.appendChild(ctx.doc.createTextNode(ent.date)); + link.appendChild(ctx.doc.createTextNode("#"+numberStr)); } else { - li.appendChild(ctx.doc.createTextNode(ent.date+": ")); - link = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "a"); - li.appendChild(link); + link.appendChild(ctx.doc.createTextNode("#"+numberStr+": ")); LSInput input = domi.createLSInput(); input.setStringData(ent.titleXml); Document temp = par.parse(input); -- cgit v1.2.3