X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit-ng%2Fstatic%2Fjs%2Fviews.js;h=b3b8212316d40f5d69a690b4506c136ae1c0dead;hp=bb8f88e69a959f21722f5289c4725c7077b9b24b;hb=ef90d8681366c1eb479bba3f13e37d9b7d5d8cf1;hpb=c2130254167cb73d7841fde1ba8536de3bac469a
diff --git a/webcit-ng/static/js/views.js b/webcit-ng/static/js/views.js
index bb8f88e69..b3b821231 100644
--- a/webcit-ng/static/js/views.js
+++ b/webcit-ng/static/js/views.js
@@ -73,24 +73,13 @@ function forum_readmessages(target_div, min_msg, max_msg)
if ((this.status / 100) == 2)
{
msgs = JSON.parse(this.responseText);
-
document.getElementById(innerdivname).innerHTML = "" ;
- //"Are we logged in? " + logged_in + "
"
- //+ "Last seen: " + last_seen + "
"
- //+ "Number of messages: " + msgs.length + "
"
- //+ "min_msg=" + min_msg + "
"
- //+ "max_msg=" + max_msg + "
" ;
-
- //if (msgs.length == 0)
- //{
- //document.getElementById(innerdivname).innerHTML += "FIXME no msgs" ;
- //}
// If we were given an explicit starting point, by all means start there.
// Note that we don't have to remove them from the array because we did a 'msgs gt|xxx' command to Citadel.
if (min_msg > 0)
{
- msgs = msgs.slice(0, msgs_per_page);
+ msgs = msgs.slice(0, messages_per_page);
}
// show us the last 20 messages and scroll to the bottom (this will become the not-logged-in behavior)
@@ -100,24 +89,37 @@ function forum_readmessages(target_div, min_msg, max_msg)
{
msgs = msgs.slice(msgs.length - messages_per_page);
}
+ new_old_div_name = randomString(5);
document.getElementById(innerdivname).innerHTML +=
- "