Compare commits
2 Commits
v202603042
...
v202603050
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e3c5554aa | ||
|
|
ad02140594 |
@@ -48,7 +48,7 @@ PADDLE_ENVIRONMENT=${PADDLE_ENVIRONMENT:-sandbox}
|
|||||||
# -- Preparation -------------------------------------------------------------
|
# -- Preparation -------------------------------------------------------------
|
||||||
|
|
||||||
info "Resetting database"
|
info "Resetting database"
|
||||||
rm -f "$DATABASE_PATH"
|
rm -f "$DATABASE_PATH" "${DATABASE_PATH}-shm" "${DATABASE_PATH}-wal"
|
||||||
ok "Removed $DATABASE_PATH"
|
ok "Removed $DATABASE_PATH"
|
||||||
|
|
||||||
info "Running migrations"
|
info "Running migrations"
|
||||||
|
|||||||
@@ -108,6 +108,15 @@ function toggleArticleSelect(id, checked) {
|
|||||||
updateArticleBulkBar();
|
updateArticleBulkBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleArticleGroupSelect(checkbox) {
|
||||||
|
var ids = (checkbox.dataset.ids || '').split(',').map(Number).filter(Boolean);
|
||||||
|
ids.forEach(function(id) {
|
||||||
|
if (checkbox.checked) articleSelectedIds.add(id);
|
||||||
|
else articleSelectedIds.delete(id);
|
||||||
|
});
|
||||||
|
updateArticleBulkBar();
|
||||||
|
}
|
||||||
|
|
||||||
function clearArticleSelection() {
|
function clearArticleSelection() {
|
||||||
articleSelectedIds.clear();
|
articleSelectedIds.clear();
|
||||||
document.querySelectorAll('.article-checkbox').forEach(function(cb) { cb.checked = false; });
|
document.querySelectorAll('.article-checkbox').forEach(function(cb) { cb.checked = false; });
|
||||||
@@ -152,7 +161,12 @@ function submitArticleBulk() {
|
|||||||
document.body.addEventListener('htmx:afterSwap', function(evt) {
|
document.body.addEventListener('htmx:afterSwap', function(evt) {
|
||||||
if (evt.detail.target.id === 'article-results') {
|
if (evt.detail.target.id === 'article-results') {
|
||||||
document.querySelectorAll('.article-checkbox').forEach(function(cb) {
|
document.querySelectorAll('.article-checkbox').forEach(function(cb) {
|
||||||
if (articleSelectedIds.has(Number(cb.dataset.id))) cb.checked = true;
|
if (cb.dataset.ids) {
|
||||||
|
var ids = cb.dataset.ids.split(',').map(Number).filter(Boolean);
|
||||||
|
cb.checked = ids.length > 0 && ids.every(function(id) { return articleSelectedIds.has(id); });
|
||||||
|
} else {
|
||||||
|
cb.checked = articleSelectedIds.has(Number(cb.dataset.id));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<tr id="article-group-{{ g.url_path | replace('/', '-') | trim('-') }}">
|
<tr id="article-group-{{ g.url_path | replace('/', '-') | trim('-') }}">
|
||||||
<td></td>
|
<td onclick="event.stopPropagation()">
|
||||||
|
<input type="checkbox" class="article-checkbox"
|
||||||
|
data-ids="{{ g.variants | map(attribute='id') | join(',') }}"
|
||||||
|
onchange="toggleArticleGroupSelect(this)">
|
||||||
|
</td>
|
||||||
<td style="max-width:260px">
|
<td style="max-width:260px">
|
||||||
<div style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500" title="{{ g.url_path }}">{{ g.title }}</div>
|
<div style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500" title="{{ g.url_path }}">{{ g.title }}</div>
|
||||||
<div class="article-subtitle">{{ g.url_path }}</div>
|
<div class="article-subtitle">{{ g.url_path }}</div>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
{% if not grouped %}
|
{% if not grouped %}
|
||||||
<th style="width:32px"><input type="checkbox" id="article-select-all" onchange="document.querySelectorAll('.article-checkbox').forEach(cb => { cb.checked = this.checked; toggleArticleSelect(Number(cb.dataset.id), this.checked); })"></th>
|
<th style="width:32px"><input type="checkbox" id="article-select-all" onchange="document.querySelectorAll('.article-checkbox').forEach(cb => { cb.checked = this.checked; toggleArticleSelect(Number(cb.dataset.id), this.checked); })"></th>
|
||||||
{% else %}
|
{% else %}
|
||||||
<th style="width:32px"></th>
|
<th style="width:32px"><input type="checkbox" id="article-select-all" onchange="document.querySelectorAll('.article-checkbox').forEach(cb => { cb.checked = this.checked; toggleArticleGroupSelect(cb); })"></th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
<th>{% if grouped %}Variants{% else %}Status{% endif %}</th>
|
<th>{% if grouped %}Variants{% else %}Status{% endif %}</th>
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
<p class="q-step-sub">{{ t.q4_subheading }}</p>
|
<p class="q-step-sub">{{ t.q4_subheading }}</p>
|
||||||
|
|
||||||
<div class="q-field-group">
|
<div class="q-field-group">
|
||||||
<span class="q-label">{{ t.q4_phase_label }}</span>
|
<span class="q-label">{{ t.q4_phase_label }} <span class="required">*</span></span>
|
||||||
|
{% if 'location_status' in errors %}<p class="q-error-hint">{{ t.q4_error_phase }}</p>{% endif %}
|
||||||
<div class="q-pills">
|
<div class="q-pills">
|
||||||
{% for val, label in [('still_searching', t.q4_phase_searching), ('location_found', t.q4_phase_found), ('converting_existing', t.q4_phase_converting), ('lease_signed', t.q4_phase_lease_signed), ('permit_not_filed', t.q4_phase_permit_not_filed), ('permit_pending', t.q4_phase_permit_pending), ('permit_granted', t.q4_phase_permit_granted)] %}
|
{% for val, label in [('still_searching', t.q4_phase_searching), ('location_found', t.q4_phase_found), ('converting_existing', t.q4_phase_converting), ('lease_signed', t.q4_phase_lease_signed), ('permit_not_filed', t.q4_phase_permit_not_filed), ('permit_pending', t.q4_phase_permit_pending), ('permit_granted', t.q4_phase_permit_granted)] %}
|
||||||
<label><input type="radio" name="location_status" value="{{ val }}" {{ 'checked' if data.get('location_status') == val }}><span class="q-pill">{{ label }}</span></label>
|
<label><input type="radio" name="location_status" value="{{ val }}" {{ 'checked' if data.get('location_status') == val }}><span class="q-pill">{{ label }}</span></label>
|
||||||
|
|||||||
@@ -428,6 +428,7 @@
|
|||||||
"q4_phase_permit_not_filed": "Baugenehmigung noch nicht beantragt",
|
"q4_phase_permit_not_filed": "Baugenehmigung noch nicht beantragt",
|
||||||
"q4_phase_permit_pending": "Baugenehmigung in Bearbeitung",
|
"q4_phase_permit_pending": "Baugenehmigung in Bearbeitung",
|
||||||
"q4_phase_permit_granted": "Baugenehmigung erteilt",
|
"q4_phase_permit_granted": "Baugenehmigung erteilt",
|
||||||
|
"q4_error_phase": "Bitte wähle Deine Projektphase aus.",
|
||||||
"q5_heading": "Zeitplan",
|
"q5_heading": "Zeitplan",
|
||||||
"q5_subheading": "Wann möchtest Du beginnen?",
|
"q5_subheading": "Wann möchtest Du beginnen?",
|
||||||
"q5_timeline_label": "Zeitplan",
|
"q5_timeline_label": "Zeitplan",
|
||||||
|
|||||||
@@ -428,6 +428,7 @@
|
|||||||
"q4_phase_permit_not_filed": "Permit not yet filed",
|
"q4_phase_permit_not_filed": "Permit not yet filed",
|
||||||
"q4_phase_permit_pending": "Permit in progress",
|
"q4_phase_permit_pending": "Permit in progress",
|
||||||
"q4_phase_permit_granted": "Permit approved",
|
"q4_phase_permit_granted": "Permit approved",
|
||||||
|
"q4_error_phase": "Please select your project phase.",
|
||||||
"q5_heading": "Timeline",
|
"q5_heading": "Timeline",
|
||||||
"q5_subheading": "When do you want to get started?",
|
"q5_subheading": "When do you want to get started?",
|
||||||
"q5_timeline_label": "Timeline",
|
"q5_timeline_label": "Timeline",
|
||||||
|
|||||||
Reference in New Issue
Block a user