Open torgeirl opened 6 months ago
The print button in trix/trix_student/templates/trix_student/assignment_list_base.django.html is pretty much the standard way to have a print button so I don't know if there is any other cleaner way to do it.
Moved the inline javascript in statistics.django.html out into their own file in 7aa0f05
Looking through all the javascript I think it wouldn't be to hard to replace most of it with HTMX, most of what angular is being used for seems to be simple state control. It would require some work on most of the views to get most out of it, but atleast I feel that it would be worth it.
The print button in trix/trix_student/templates/trix_student/assignment_list_base.django.html is pretty much the standard way to have a print button so I don't know if there is any other cleaner way to do it.
I've landed on simply removing it; most users are familiar with Ctrl+P and that has the bonus of allowing the user to print only select parts of the page instead of all assignments on a give page. :leaves:
Moved out the inline styles in statistics. 4888329. Quite happy that Less could generate css so it was quite nice to generate classes for progress bar width 1-100%
Could use the same css classes in assignment_list, pushed up in 62e0aa9
Goals
Possible solutions
Tasks
eliminate the use of inline scripts:heavy_check_mark:eval()
functionsInline styling:
:heavy_check_mark:trix/trix_admin/templates/trix_admin/assignments/preview.django.html
:heavy_check_mark:trix/trix_admin/templates/trix_admin/editor/markdown_help.django.html
:heavy_check_mark:trix/trix_admin/templates/trix_admin/roleselect.django.html
:heavy_check_mark:*trix/trix_admin/templates/trix_admin/statistics.django.html
+../include/progress_bar.django.html
:heavy_check_mark:trix/trix_course/templates/trix_course/add_course_admin.django.html
:heavy_check_mark:trix/trix_course/templates/trix_course/course_admin.django.html
:heavy_check_mark:trix/trix_student/templates/trix_student/assignment_list_base.django.html
:heavy_check_mark: (removed)trix/trix_student/templates/trix_student/consent_form_base.django.html
:heavy_check_mark:trix/trix_student/templates/trix_student/include/assignment.django.html
(* Inline styling is removed from
/trix_admin/statistics.django.html
, but that has caused (at least) two changes:X
(should only be displayed on optional tags) :x:)Inline scripts:
:heavy_check_mark:trix/trix_admin/templates/trix_admin/statistics.django.html
:heavy_check_mark: (removed)trix/trix_student/templates/trix_student/assignment_list_base.django.html
HTMX features that rely on
eval()
are:hx-on:
attributeshx-vals
with thejs:
prefixhx-headers
with thejs:
prefix