]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/static/js/views.js
mail_folder_list.js: DROP target is working in Brave browser
[citadel.git] / webcit-ng / static / js / views.js
index 82e979853a8a4b55bfe6f423a3c9dda25cf42b3e..f3707d48c935e373862cf7b207f435522018c50a 100644 (file)
@@ -16,15 +16,26 @@ function clear_sidebar_selection() {
 }
 
 
-// This function is the dispatcher that determines the correct view for a room, and calls the correct renderer.
-function render_room_view() {
+// Clear any drop handlers that might have been set by the previous view
+function clear_drop_handlers() {
+}
 
-       // The view renderer will set its own room navigation buttons
+
+// Clear the top bar navigation buttons.  The view renderer will set its own buttons.
+function clear_navigation_buttons() {
        for (const d of ["ctdl-newmsg-button", "ctdl-ungoto-button", "ctdl-skip-button", "ctdl-goto-button", "ctdl-delete-button"]) {
                document.getElementById(d).style.display = "none";
        }
+}
 
+
+// This function is the dispatcher that determines the correct view for a room, and calls the correct renderer.
+function render_room_view() {
+
+       clear_navigation_buttons();
        clear_sidebar_selection();
+       clear_drop_handlers();
+
        document.getElementById("ctdl-main").innerHTML = 
                "<div class=\"ctdl-middle\">"
                + _("Loading messages from server, please wait")