forked from FrederikBaerentsen/BrickTracker
fix(add): Fix #162, show purchase date picker on bulk add page.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
@@ -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' %}
|
||||
|
||||
Reference in New Issue
Block a user