fix(add): Fix #162, show purchase date picker on bulk add page.

This commit is contained in:
2026-06-22 21:53:10 +02:00
parent 4d09be06ae
commit 52211a7900
3 changed files with 6 additions and 1 deletions
+4
View File
@@ -11,6 +11,10 @@ document.addEventListener("DOMContentLoaded", () => {
const addContainer = document.getElementById('add-set');
if (!addContainer) return;
// On the bulk page the socket is initialized by set/socket.html include,
// so only wire it up here for the single add page to avoid a double init.
if (addContainer.dataset.bulk === 'true') return;
new BrickSetSocket(
'add',
addContainer.dataset.path,
+1
View File
@@ -44,6 +44,7 @@
<input type="text" class="form-control" id="add-set" placeholder="{% if not bulk %}{% if not config.get('HIDE_INDIVIDUAL_MINIFIGURES', False) and not config.get('DISABLE_INDIVIDUAL_MINIFIGURES', False) %}107-1 or fig-001234 or ...{% else %}107-1 or ...{% endif %}{% else %}107-1, 1642-1, ...{% endif %}"
data-path="{{ path }}"
data-namespace="{{ namespace }}"
data-bulk="{% if bulk %}true{% else %}false{% endif %}"
data-msg-complete="{{ messages['COMPLETE'] }}"
data-msg-fail="{{ messages['FAIL'] }}"
data-msg-import-set="{{ messages['IMPORT_SET'] }}"
+1 -1
View File
@@ -172,7 +172,7 @@
<script src="{{ url_for('static', filename='scripts/socket/minifigure.js') }}"></script>
<script src="{{ url_for('static', filename='scripts/socket/value.js') }}"></script>
<script src="{{ url_for('static', filename='scripts/table.js') }}"></script>
{% if request.endpoint == 'add.add' %}
{% if request.endpoint in ['add.add', 'add.bulk'] %}
<script src="{{ url_for('static', filename='scripts/add.js') }}"></script>
{% endif %}
{% if request.endpoint == 'add.parts' %}