X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit-ng%2Fstatic%2Fjs%2Fviews.js;h=5804155f48d6c97e87d7c7f51c6ce9ea6d675f2e;hb=ec0632c60fbcc1509eada758e6778afb4a52ea11;hp=bb8f88e69a959f21722f5289c4725c7077b9b24b;hpb=c2130254167cb73d7841fde1ba8536de3bac469a;p=citadel.git diff --git a/webcit-ng/static/js/views.js b/webcit-ng/static/js/views.js index bb8f88e69..5804155f4 100644 --- a/webcit-ng/static/js/views.js +++ b/webcit-ng/static/js/views.js @@ -1,5 +1,5 @@ // -// Copyright (c) 2016-2018 by the citadel.org team +// Copyright (c) 2016-2019 by the citadel.org team // // This program is open source software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 3. @@ -30,18 +30,18 @@ var views = { // This function is the dispatcher that determines the correct view for a room, -// and calls the correct renderer. +// and calls the correct renderer. Greater/Less than bounds are accepted. // -function render_room_view(min_msg, max_msg) +function render_room_view(gt_msg, lt_msg) { - switch(current_view) - { + switch(current_view) { case views.VIEW_MAILBOX: // FIXME view mail rooms as forums for now case views.VIEW_BBS: - forum_readmessages("ctdl-main", min_msg, max_msg); + forum_readmessages("ctdl-main", gt_msg, lt_msg); break; default: - document.getElementById("ctdl-main").innerHTML = "The view for " + current_room + " is " + current_view + " but there is no renderer." ; + document.getElementById("ctdl-main").innerHTML = + "The view for " + current_room + " is " + current_view + " but there is no renderer." ; break; } @@ -50,82 +50,153 @@ function render_room_view(min_msg, max_msg) // Forum view (flat) -- let's have another go at this with the rendering done client-side // -function forum_readmessages(target_div, min_msg, max_msg) +function forum_readmessages(target_div, gt_msg, lt_msg) { - var innerdivname = randomString(5); - document.getElementById(target_div).innerHTML = "