-
Notifications
You must be signed in to change notification settings - Fork 3
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
Refactoring CSS and JS #146
Comments
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. |
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. 🍃 |
Moved out the inline styles in statistics. 4888329. |
Could use the same css classes in assignment_list, pushed up in 62e0aa9 |
* Improved contrast course admin assignment and editor * Fixed missing labels and iframe title * wrapped in fieldset * Fixed Empty header * Empty table header fix, and added missing label to search field * Fixed language not being set * Added link icon to link * Removed redundant login button * Removed django.middleware.clickjacking.XFrameOptionsMiddleware * Added the ability to hide courses from students * Hopefully fixed 145 * Statics view optimization * redirect url cleanup * (re-)moved some inline styling (#146) * added and improved translation for add admin (#148) * moved more inline styling (#146) * Move inline javascript to own file * removed «Print this page» (#146) * Moved out inline styles * Replace inline style with correct css classes * Fixed #149 * added `TRIX_VERSION` template variable * releasing Trix 4.1.0 --------- Co-authored-by: Levijatan <[email protected]>
Goals
Possible solutions
Tasks
eliminate the use of inline scripts✔️eval()
functionsInline styling:
✔️trix/trix_admin/templates/trix_admin/assignments/preview.django.html
✔️trix/trix_admin/templates/trix_admin/editor/markdown_help.django.html
✔️trix/trix_admin/templates/trix_admin/roleselect.django.html
✔️*trix/trix_admin/templates/trix_admin/statistics.django.html
+../include/progress_bar.django.html
✔️trix/trix_course/templates/trix_course/add_course_admin.django.html
✔️trix/trix_course/templates/trix_course/course_admin.django.html
✔️trix/trix_student/templates/trix_student/assignment_list_base.django.html
✔️ (removed)trix/trix_student/templates/trix_student/consent_form_base.django.html
✔️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) ❌)Inline scripts:
✔️trix/trix_admin/templates/trix_admin/statistics.django.html
✔️ (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:
prefixThe text was updated successfully, but these errors were encountered: