From 9484a8fa6f8991ddc7d56c528d10fe80f628456b Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Mon, 9 Sep 2013 14:13:34 +0200 Subject: [PATCH] add heading 'Kommentieren' etc. --- isso/client/app/isso.js | 10 +++++++--- isso/static/style.css | 8 +++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/isso/client/app/isso.js b/isso/client/app/isso.js index 4463080..cf2aa20 100644 --- a/isso/client/app/isso.js +++ b/isso/client/app/isso.js @@ -165,6 +165,7 @@ define(["lib/q", "lib/HTML", "helper/utils", "helper/identicons", "./api", "./fo var init = function() { var rootmsgbox = forms.msgbox({}); + var h4 = HTML.query("#isso-thread").add("h4") HTML.query("#isso-thread").add("div#isso-root").add(rootmsgbox); rootmsgbox.query("input[type=submit]").addEventListener("click", function(event) { forms.validate(rootmsgbox) && api.create({ @@ -183,11 +184,14 @@ define(["lib/q", "lib/HTML", "helper/utils", "helper/identicons", "./api", "./fo event.preventDefault() }); - api.fetchall() - .then(function(comments) { + api.fetchall().then(function(comments) { + h4.textContent = comments.length + " Kommentare zu \"" + utils.heading() + "\""; for (var i in comments) { insert(comments[i]) - }}) + } + }).fail(function(rv) { + h4.textContent = "Kommentiere \"" + utils.heading() + "\""; + }) } return { diff --git a/isso/static/style.css b/isso/static/style.css index c3960f1..57db242 100644 --- a/isso/static/style.css +++ b/isso/static/style.css @@ -8,11 +8,17 @@ margin-top: 18px; } +#isso-thread > h4 { + color: #555; + font-weight: bold; + font-family: "Helvetica", Arial, sans-serif; + margin: 0; +} + #isso-root > .isso-comment > .isso-follow-up { margin-left: 64px; } - .isso-comment footer a, .isso-comment header a { color: #111111; font-weight: bold;