Add tray_lines div so that tray_body might hold more buttons.
This commit is contained in:
parent
67c2dadffa
commit
4a5583c091
2 changed files with 5 additions and 3 deletions
|
@ -141,10 +141,10 @@ function update_clipboard_tray()
|
||||||
tray_button.innerText = "Clipboard: " + photo_clipboard.size + " items";
|
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"))
|
if (!clipboard_tray.classList.contains("hidden"))
|
||||||
{
|
{
|
||||||
delete_all_children(tray_body);
|
delete_all_children(tray_lines);
|
||||||
var photo_ids = Array.from(photo_clipboard);
|
var photo_ids = Array.from(photo_clipboard);
|
||||||
photo_ids.sort();
|
photo_ids.sort();
|
||||||
for (var i = 0; i < photo_ids.length; i += 1)
|
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_delete_button);
|
||||||
clipboard_line.appendChild(clipboard_line_link);
|
clipboard_line.appendChild(clipboard_line_link);
|
||||||
tray_body.appendChild(clipboard_line);
|
tray_lines.appendChild(clipboard_line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
onclick="toggle_clipboard_tray_collapsed()"
|
onclick="toggle_clipboard_tray_collapsed()"
|
||||||
>Clipboard: 0 items</button>
|
>Clipboard: 0 items</button>
|
||||||
<div id="clipboard_tray_body" class="hidden">
|
<div id="clipboard_tray_body" class="hidden">
|
||||||
|
<div id="clipboard_tray_lines">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
Loading…
Reference in a new issue