-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bootstrap5] Upgrade to Bootstrap 5 and Alpine 3 (#47)
* wip * wip * wip * wip * typings * Rewrite filter field * wip * Fix dropdown in navbar * js snippets * update settings from js * Retain form state correctly * Get rid of jQuery and upgrade Alpine * Replace morphdom with alpine-morph * Save form fields to user preferences
- Loading branch information
Showing
102 changed files
with
20,576 additions
and
35,452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
adit/accounts/migrations/0003_rename_misc_settings_user_preferences.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.2.3 on 2023-08-06 08:20 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("accounts", "0002_alter_user_id"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name="user", | ||
old_name="misc_settings", | ||
new_name="preferences", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.2.3 on 2023-08-06 08:23 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("accounts", "0003_rename_misc_settings_user_preferences"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="user", | ||
name="preferences", | ||
field=models.JSONField(default=dict), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
adit/batch_query/static/batch_query/batch_query_job_form.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Keep those variables in sync with the ones in the Django view | ||
const BATCH_QUERY_SOURCE = "batch_query_source"; | ||
const BATCH_QUERY_URGENT = "batch_query_urgent"; | ||
const BATCH_QUERY_SEND_FINISHED_MAIL = "batch_query_send_finished_mail"; | ||
|
||
function batchQueryJobForm() { | ||
return { | ||
onSourceChange: function (ev) { | ||
updatePreferences("batch-query", { | ||
[BATCH_QUERY_SOURCE]: ev.target.value, | ||
}); | ||
}, | ||
onUrgentChange: function (ev) { | ||
updatePreferences("batch-query", { | ||
[BATCH_QUERY_URGENT]: ev.target.checked, | ||
}); | ||
}, | ||
onSendFinishedMailChange: function (ev) { | ||
updatePreferences("batch-query", { | ||
[BATCH_QUERY_SEND_FINISHED_MAIL]: ev.target.checked, | ||
}); | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 10 additions & 14 deletions
24
adit/batch_query/templates/batch_query/batch_query_result_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
{% extends "core/base_generic.html" %} | ||
{% load crispy from crispy_forms_tags %} | ||
{% load render_table from django_tables2 %} | ||
{% block container %} | ||
<div class="d-flex justify-content-between align-items-start"> | ||
<h4 class="mb-3">Batch Query Results</h4> | ||
<a href="{% url 'batch_query_job_detail' job.id %}"> | ||
{% include "core/icons/back.svg" %} | ||
<strong class="align-middle">View Job</strong> | ||
View Job | ||
</a> | ||
</div> | ||
<div class="row justify-content-start mb-1"> | ||
<div class="col-md"> | ||
<h5 text-nowrap class="mb-0"> | ||
<a href="{% url 'batch_query_result_download' job.id %}" | ||
class="badge badge-light align-top"> | ||
{% include "core/icons/download.svg" %} | ||
Download all results | ||
</a> | ||
</h5> | ||
</div> | ||
<div class="col col-md-auto">{% crispy filter.form %}</div> | ||
<div class="col col-md-auto">{% crispy page_size_select %}</div> | ||
<div class="d-flex justify-content-between"> | ||
<h5 text-nowrap class="mb-0"> | ||
<a href="{% url 'batch_query_result_download' job.id %}" | ||
class="badge text-bg-light align-top"> | ||
{% include "core/icons/download.svg" %} | ||
Download all results | ||
</a> | ||
</h5> | ||
{% include "core/_table_filters.html" %} | ||
</div> | ||
{% render_table table %} | ||
{% endblock container %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.