Skip to content

Commit

Permalink
django: update static files
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Remmert <[email protected]>
  • Loading branch information
jonas-rem committed Apr 30, 2024
1 parent d18853a commit 2da432e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/django/staticfiles/admin/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ body {
/* LINKS */

a:link, a:visited {
color: var(--body-fg);
color: var(--link-fg);
text-decoration: none;
transition: color 0.15s, background 0.15s;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,7 @@ body a:hover {
margin-left: 5px;
margin-right: 5px;
}

.pagination {
margin: 5px 0 10px 0;
}
6 changes: 6 additions & 0 deletions server/django/staticfiles/rest_framework/js/ajax-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ function replaceDocument(docString) {

doc.write(docString);
doc.close();

if (window.djdt) {
// If Django Debug Toolbar is available, reinitialize it so that
// it can show updated panels from new `docString`.
window.addEventListener("load", djdt.init);
}
}

function doAjaxSubmit(e) {
Expand Down
1 change: 1 addition & 0 deletions server/django/staticfiles/rest_framework/js/csrf.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function sameOrigin(url) {
!(/^(\/\/|http:|https:).*/.test(url));
}

window.drf = JSON.parse(document.getElementById('drf_csrf').textContent);
var csrftoken = window.drf.csrfToken;

$.ajaxSetup({
Expand Down

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions server/django/staticfiles/rest_framework/js/load-ajax-form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$(document).ready(function() {
$('form').ajaxForm();
});

0 comments on commit 2da432e

Please sign in to comment.