Add autocomplete to /clipboard.

This commit is contained in:
voussoir 2018-07-22 20:45:16 -07:00
parent 2a45f4e17e
commit 977b47522d

View file

@ -12,6 +12,7 @@
<script src="/static/js/common.js"></script> <script src="/static/js/common.js"></script>
<script src="/static/js/hotkeys.js"></script> <script src="/static/js/hotkeys.js"></script>
<script src="/static/js/photoclipboard.js"></script> <script src="/static/js/photoclipboard.js"></script>
<script src="/static/js/tag_autocomplete.js"></script>
<style> <style>
body body
@ -91,12 +92,12 @@ body
</div> </div>
<div id="right"> <div id="right">
<div id="add_tag_area"> <div id="add_tag_area">
<input type="text" id="add_tag_textbox"> <input type="text" id="add_tag_textbox" list="tag_autocomplete_datalist">
<button class="add_tag_button green_button" id="add_tag_button" onclick="submit_add_tag(add_remove_callback);">Add tag</button> <button class="add_tag_button green_button" id="add_tag_button" onclick="submit_add_tag(add_remove_callback);">Add tag</button>
</div> </div>
<div id="remove_tag_area"> <div id="remove_tag_area">
<input type="text" id="remove_tag_textbox"> <input type="text" id="remove_tag_textbox" list="tag_autocomplete_datalist">
<button class="red_button" id="remove_tag_button" onclick="submit_remove_tag(add_remove_callback);">Remove tag</button> <button class="red_button" id="remove_tag_button" onclick="submit_remove_tag(add_remove_callback);">Remove tag</button>
</div> </div>
@ -199,6 +200,7 @@ function myhook()
refresh_divs(); refresh_divs();
} }
tag_autocomplete.init_datalist();
photo_clipboard.on_load_hooks.push(myhook); photo_clipboard.on_load_hooks.push(myhook);
photo_clipboard.on_save_hooks.push(myhook); photo_clipboard.on_save_hooks.push(myhook);