Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the aria-hide issue #626

Merged
merged 60 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
8750b4f
Add local SQL Server setup with auto-restore
RickWangPerth Nov 21, 2024
b8bf921
Add batch curation tool to admin tools page
RickWangPerth Nov 21, 2024
ea9c3e5
Add batch curation tool to admin tools page
RickWangPerth Nov 21, 2024
1828c1e
Merge branch 'v2.9dev' of https://github.com/RickWangPerth/wastd into…
RickWangPerth Nov 21, 2024
2e84d07
Remove local SQL Server setup with auto-restore
RickWangPerth Nov 21, 2024
ded5763
Remove local SQL Server setup with auto-restore
RickWangPerth Nov 21, 2024
764076a
Remove duplicate message
RickWangPerth Nov 26, 2024
137f287
Add curation observation page
RickWangPerth Nov 26, 2024
31abe8f
Fix icon display in admin tools page
RickWangPerth Nov 26, 2024
6e2ef80
Merge branch 'v2.9dev' of https://github.com/RickWangPerth/wastd into…
RickWangPerth Nov 26, 2024
62f6f11
Add curation observation page
RickWangPerth Nov 27, 2024
7d418d0
Add curation observation page
RickWangPerth Nov 27, 2024
fecc5fa
Fix curation observation page
RickWangPerth Nov 27, 2024
0126f94
Debugging curation observation page
RickWangPerth Nov 27, 2024
75f3bee
Fix curation observation page
RickWangPerth Nov 27, 2024
53a653b
Fix curation observation page
RickWangPerth Nov 27, 2024
7a272f5
Adjust curation observation page layout
RickWangPerth Nov 27, 2024
05e9713
Fix curation observation page
RickWangPerth Nov 27, 2024
9a994a9
Fix curation observation page
RickWangPerth Nov 27, 2024
e921c82
Fix curation observation page
RickWangPerth Nov 28, 2024
c5cf484
Fix curation observation page
RickWangPerth Nov 28, 2024
842b2ad
Merge branch 'v2.9dev' of https://github.com/RickWangPerth/wastd into…
RickWangPerth Nov 28, 2024
6c40556
Add curation turtle manage page
RickWangPerth Nov 28, 2024
88acff2
Add curation turtle manage page
RickWangPerth Nov 28, 2024
f4c1081
Merge branch 'v2.9dev' of https://github.com/RickWangPerth/wastd into…
RickWangPerth Nov 28, 2024
88dc9aa
Fix curation turtle manage page
RickWangPerth Nov 28, 2024
f802825
Fix curation turtle page
RickWangPerth Nov 28, 2024
66a5f1a
Enhance Turtle Management UI with Save Confirmations
RickWangPerth Nov 28, 2024
695454c
Debug curation turtle page
RickWangPerth Nov 28, 2024
2fc6451
Fix curation turtle page
RickWangPerth Nov 28, 2024
df7442c
Test save function in
RickWangPerth Nov 28, 2024
78638d5
Fix the csrf token bug
RickWangPerth Nov 28, 2024
4129795
Fix save function in curation turtle page
RickWangPerth Nov 28, 2024
0fc31b3
Add descriptive filenames for data exports
RickWangPerth Dec 2, 2024
112e1e6
Add more information to be displayed on the turtle management page
RickWangPerth Dec 3, 2024
2bf3e66
Merge branch 'v2.9dev' of https://github.com/RickWangPerth/wastd into…
RickWangPerth Dec 3, 2024
2a977c3
Add more information to be displayed on the turtle management page
RickWangPerth Dec 3, 2024
b939464
Fix information to be displayed bugs in the turtle management page
RickWangPerth Dec 3, 2024
3f22ab1
Fix information to be displayed bugs in the turtle management page
RickWangPerth Dec 3, 2024
da641a7
Fix type big in turtle management page
RickWangPerth Dec 3, 2024
d250014
Redesign observation management page
RickWangPerth Dec 3, 2024
5d031f1
Fix observation page connection
RickWangPerth Dec 4, 2024
32ea907
Fix observation page contents
RickWangPerth Dec 4, 2024
11735d4
Adjust observation manage page layout
RickWangPerth Dec 4, 2024
b165536
Adjust observation manage page content
RickWangPerth Dec 4, 2024
6330686
Migrate dropdown options from Django template to JavaScript in observ…
RickWangPerth Dec 4, 2024
0206b7f
Resolve aria-hidden accessibility warning in modal dialog
RickWangPerth Dec 5, 2024
e98ba40
Resolve aria-hidden accessibility warning in modal dialog
RickWangPerth Dec 5, 2024
8ffd06b
Resolve modal accessibility warning
RickWangPerth Dec 5, 2024
e106a34
Handle missing main element in modal focus management
RickWangPerth Dec 5, 2024
a87ea16
Use inert attribute instead of aria-hidden for modal
RickWangPerth Dec 5, 2024
54c17c3
Extend inert attribute to modal buttons
RickWangPerth Dec 5, 2024
ceb5305
Add null checks for modal content manipulation
RickWangPerth Dec 5, 2024
6b81b86
Merge branch 'v4.0uat' of https://github.com/RickWangPerth/wastd into…
RickWangPerth Dec 5, 2024
3d7f435
Correct person and place data loading in observation form
RickWangPerth Dec 5, 2024
f03b304
Remove test output
RickWangPerth Dec 5, 2024
7e66b23
Merge location data into basic info section
RickWangPerth Dec 5, 2024
8dcd484
Merge branch 'v4.0dev' into v4.0uat
RickWangPerth Dec 5, 2024
b243dc7
Upgrade to 2.1.4
RickWangPerth Dec 5, 2024
9ad7b49
Merge branch 'master' into v2.1.4prod
RickWangPerth Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ taxonomy/fixtures/test_tax_*
*.csv
*.pgdump
compose.yaml
*.bacpac
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

# syntax=docker/dockerfile:1
# Prepare the base environment.
FROM python:3.11.8-slim as builder_base_wastd

Check warning on line 4 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
# NOTE: we're constrained to using the version(s) of Debian which the Microsoft ODBC driver supports.
MAINTAINER asi@dbca.wa.gov.au

Check warning on line 6 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/
LABEL org.opencontainers.image.source https://github.com/dbca-wa/wastd

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN apt-get update -y \
&& apt-get upgrade -y \
Expand All @@ -23,7 +24,7 @@
&& rm -rf /var/lib/apt/lists

# Install Python libs using Poetry.
FROM builder_base_wastd as python_libs_wastd

Check warning on line 27 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
WORKDIR /app
ENV POETRY_VERSION=1.7.1
RUN pip install poetry=="${POETRY_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ patches:
- path: service_patch.yaml
images:
- name: ghcr.io/dbca-wa/wastd
newTag: 2.1.3
newTag: 2.1.4

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tool.poetry]
name = "wastd"
version = "2.1.3"
version = "2.1.4"


description = "Western Australian Sea Turtles Database"
authors = ["Florian Mayer <florian.mayer@dbca.wa.gov.au>", "Ashley Felton <ashley.felton@dbca.wa.gov.au>","Evan Hallein <evan.hallein@dbca.wa.gov.au>", "Rick Wang <rick.wang@dbca.wa.gov.au>"]
Expand Down
10 changes: 7 additions & 3 deletions wamtram2/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class TrtBeachPositions(models.Model):
class Meta:
managed = False
db_table = "TRT_BEACH_POSITIONS"

def __str__(self):
return f"{self.description}"


class TrtBodyParts(models.Model):
Expand Down Expand Up @@ -2058,8 +2061,9 @@ class TrtRecordedTags(models.Model):
side = models.CharField(
db_column="SIDE", max_length=1, blank=True, null=True
) # Field name made lowercase.
tag_state = models.CharField(
db_column="TAG_STATE", max_length=10, blank=True, null=True
tag_state = models.ForeignKey(
'TrtTagStates', models.CASCADE, db_column="TAG_STATE", max_length=10,
blank=True, null=True
) # Field name made lowercase.
comments = models.CharField(
db_column="COMMENTS", max_length=255, blank=True, null=True
Expand Down Expand Up @@ -2222,7 +2226,6 @@ def __str__(self):
return f"{self.common_name}"



class TrtTags(models.Model):
tag_id = models.CharField(
db_column="TAG_ID", primary_key=True, max_length=10
Expand Down Expand Up @@ -2490,6 +2493,7 @@ class Meta:
def __str__(self):
return f"{self.description}"


SEX_CHOICES = [
("F", "Female"),
("M", "Male"),
Expand Down
90 changes: 90 additions & 0 deletions wamtram2/static/css/observation_management.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
.container-fluid {
padding: 20px;
}


.section-card {
background-color: #fff;
border: 1px solid #dee2e6;
border-radius: 5px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.nav-tabs {
margin-bottom: 20px;
}

.tab-content {
padding: 20px 0;
}

.form-row {
margin-bottom: 15px;
}

#searchResults {
margin-top: 20px;
}

#searchResults th {
background-color: #f8f9fa;
border-bottom: 2px solid #dee2e6;
}

#searchResults td {
vertical-align: middle;
}

.modified {
background-color: #fff3cd;
}

.readonly-field {
background-color: #e9ecef;
cursor: not-allowed;
}

.table-responsive {
overflow-x: auto;
}

#searchResults {
margin-bottom: 0;
}

#searchResults th {
background-color: #f8f9fa;
position: sticky;
top: 0;
z-index: 1;
}

#searchResults td {
vertical-align: middle;
}

.tag-info {
font-size: 0.85em;
color: #666;
margin-bottom: 5px;
}

.action-buttons {
white-space: nowrap;
}

@media (max-width: 768px) {
.container-fluid {
padding: 10px;
}

.section-card {
padding: 15px;
}

.form-row {
margin-bottom: 10px;
}
}
55 changes: 44 additions & 11 deletions wamtram2/static/css/search_styles.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,48 @@
/* search_styles.css */

/* Search input field style */
/* Select2 customization */
.select2-container .select2-selection--single {
height: 38px;
padding: 6px 12px;
font-size: 15px;
line-height: 1.42857143;
color: #495057;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 24px;
padding-left: 0;
color: #495057;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 36px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: #f5f5f5;
color: #444;
}

.select2-results__option {
padding: 6px 12px;
color: #444;
line-height: 1.42857143;
}

.select2-dropdown {
border: 1px solid #ccc;
border-radius: 5px;
background-color: #f8f9fa;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

/* Keep existing styles for other search elements */
.search-field {
/* Styles are similar to '.form-control' */
display: block;
width: 100%;
height: 38px;
Expand All @@ -15,14 +55,10 @@
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

/* Search results container style */
.search-results {
border: 1px solid #ccc;
border-radius: 5px;
Expand All @@ -33,24 +69,21 @@
position: absolute;
z-index: 1000;
width: 100%;
max-height: 200px; /* Max height */
overflow-y: auto; /* Scroll if too tall */
max-height: 200px;
overflow-y: auto;
}

/* Search result item style */
.search-result {
padding: 6px 12px;
cursor: pointer;
color: #444;
line-height: 1.42857143;
}

/* Style for the result item when hovered */
.search-result:hover {
background-color: #f5f5f5;
}

/* Style for the result item when it is selected */
.search-result.selected {
background-color: #e9e9e9;
}
143 changes: 143 additions & 0 deletions wamtram2/static/css/turtle_management.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@

.form-label {
color: #495057;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.table-container {
overflow-y: auto;
position: relative;
height: 40vh;
margin: 1rem 0;
border: 1px solid #dee2e6;
border-radius: 0.25rem;
}


.table {
width: 100%;
margin-bottom: 0;
color: #212529;
}


.table thead th {
position: sticky;
top: 0;
background: #f8f9fa;
z-index: 1;
font-weight: 500;
border-bottom: 2px solid #dee2e6;
}


.table tbody tr:hover {
background-color: rgba(0,0,0,.075);
cursor: pointer;
}


.section-card {
background-color: #fff;
border: 1px solid #dee2e6;
border-radius: 5px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}


.nav-tabs {
margin-bottom: 20px;
border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
color: #495057;
border: 1px solid transparent;
border-top-left-radius: .25rem;
border-top-right-radius: .25rem;
}

.nav-tabs .nav-link.active {
color: #495057;
background-color: #fff;
border-color: #dee2e6 #dee2e6 #fff;
}


.form-row {
margin-bottom: 15px;
}

.form-control.readonly-field {
background-color: #e9ecef;
cursor: not-allowed;
}


.modified {
background-color: #fff3cd;
}

@media (max-width: 768px) {
.container-fluid {
padding: 10px;
}

.section-card {
padding: 15px;
}

.table {
font-size: 0.875rem;
}

.table th,
.table td {
padding: 0.5rem;
}
}

.search-area {
margin-bottom: 1.5rem;
}

.search-area .input-group {
margin-bottom: 0.5rem;
}


.tag-info-area {
margin-top: 1.5rem;
}

.observation-area {
margin-top: 1.5rem;
}

.section-card {
padding: 20px;
background-color: #fff;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0,0,0,0.12);
margin-bottom: 20px;
}

.card {
margin-bottom: 15px;
}

.card-body {
padding: 15px;
}

.btn-success {
margin-bottom: 15px;
}

.tab-content {
padding-top: 20px;
}
Loading
Loading