Add tray_lines div so that tray_body might hold more buttons.

This commit is contained in:
voussoir 2017-12-16 12:24:46 -08:00
parent 67c2dadffa
commit 4a5583c091
2 changed files with 5 additions and 3 deletions

View file

@ -141,10 +141,10 @@ function update_clipboard_tray()
tray_button.innerText = "Clipboard: " + photo_clipboard.size + " items";
}
var tray_body = document.getElementById("clipboard_tray_body");
var tray_lines = document.getElementById("clipboard_tray_lines");
if (!clipboard_tray.classList.contains("hidden"))
{
delete_all_children(tray_body);
delete_all_children(tray_lines);
var photo_ids = Array.from(photo_clipboard);
photo_ids.sort();
for (var i = 0; i < photo_ids.length; i += 1)
@ -164,7 +164,7 @@ function update_clipboard_tray()
clipboard_line.appendChild(clipboard_line_delete_button);
clipboard_line.appendChild(clipboard_line_link);
tray_body.appendChild(clipboard_line);
tray_lines.appendChild(clipboard_line);
}
}
}

View file

@ -6,6 +6,8 @@
onclick="toggle_clipboard_tray_collapsed()"
>Clipboard: 0 items</button>
<div id="clipboard_tray_body" class="hidden">
<div id="clipboard_tray_lines">
</div>
</div>
</div>
{% endmacro %}