X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit-ng%2Fstatic%2Fjs%2Fviews.js;h=7ad2a6b921600ef2d12cd44d3f4337bd75584b26;hp=d62af2cb83b1be2312ce5afc28c7670f58456747;hb=d62e89645b97e92bfec2bc71995530ac732ebd63;hpb=a31e747f369e87522b74e867262b7929de4897f9
diff --git a/webcit-ng/static/js/views.js b/webcit-ng/static/js/views.js
index d62af2cb8..7ad2a6b92 100644
--- a/webcit-ng/static/js/views.js
+++ b/webcit-ng/static/js/views.js
@@ -66,6 +66,7 @@ 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 + "
"
@@ -78,13 +79,20 @@ function forum_readmessages(target_div, min_msg, max_msg)
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.
+ else if (min_msg > 0)
+ {
+ msgs = msgs.slice(0, msgs_per_page);
+ }
+
// show us the last 20 messages and scroll to the bottom (this will become the not-logged-in behavior)
else if ((logged_in) | (!logged_in))
{
if (msgs.length > messages_per_page)
{
msgs = msgs.slice(msgs.length - messages_per_page);
- document.getElementById(innerdivname).innerHTML += "link to msgs less than " + msgs[0] + "
" ;
+ document.getElementById(innerdivname).innerHTML += "