Fix some css bugs:
This commit is contained in:
parent
7a74f940fa
commit
756e4749c9
5 changed files with 10 additions and 13 deletions
|
@ -49,10 +49,6 @@ DMOJ_PP_BONUS_FUNCTION = lambda n: 300 * (1 - 0.997**n) # noqa: E731
|
|||
NODEJS = "/usr/bin/node"
|
||||
EXIFTOOL = "/usr/bin/exiftool"
|
||||
ACE_URL = "//cdnjs.cloudflare.com/ajax/libs/ace/1.1.3"
|
||||
SELECT2_JS_URL = "//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"
|
||||
DEFAULT_SELECT2_CSS = (
|
||||
"//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css"
|
||||
)
|
||||
|
||||
DMOJ_CAMO_URL = None
|
||||
DMOJ_CAMO_KEY = None
|
||||
|
|
|
@ -60,7 +60,7 @@ else:
|
|||
class Media:
|
||||
js = [
|
||||
"mathjax_config.js",
|
||||
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML",
|
||||
"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js",
|
||||
"pagedown_math.js",
|
||||
]
|
||||
|
||||
|
|
|
@ -47,9 +47,9 @@ from django.forms.models import ModelChoiceIterator
|
|||
from django.urls import reverse_lazy
|
||||
from django.utils.http import urlencode
|
||||
|
||||
DEFAULT_SELECT2_JS = "//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"
|
||||
DEFAULT_SELECT2_CSS = (
|
||||
"//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css"
|
||||
DEFAULT_SELECT2_JS = settings.STATIC_URL + "/libs/select2/select2.js"
|
||||
DEFAULT_SELECT2_CSS = settings.STATIC_URL + (
|
||||
"/libs/select2/select2.min.css"
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
|
@ -106,8 +106,8 @@ class Select2Mixin(object):
|
|||
https://docs.djangoproject.com/en/1.8/topics/forms/media/#media-as-a-dynamic-property
|
||||
"""
|
||||
return forms.Media(
|
||||
js=[settings.SELECT2_JS_URL, "django_select2.js"],
|
||||
css={"screen": [settings.SELECT2_CSS_URL]},
|
||||
js=[DEFAULT_SELECT2_JS, "django_select2.js"],
|
||||
css={"screen": [DEFAULT_SELECT2_CSS]},
|
||||
)
|
||||
|
||||
|
||||
|
@ -117,10 +117,10 @@ class AdminSelect2Mixin(Select2Mixin):
|
|||
return forms.Media(
|
||||
js=[
|
||||
"admin/js/jquery.init.js",
|
||||
settings.SELECT2_JS_URL,
|
||||
DEFAULT_SELECT2_JS,
|
||||
"django_select2.js",
|
||||
],
|
||||
css={"screen": [settings.SELECT2_CSS_URL]},
|
||||
css={"screen": [DEFAULT_SELECT2_CSS]},
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
success: function () {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config=TeX-AMS_HTML',
|
||||
url: 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js',
|
||||
dataType: "script",
|
||||
cache: true,
|
||||
success: function () {
|
||||
|
|
|
@ -145,6 +145,7 @@
|
|||
$('.middle-right-content').html(reload_content.first().html());
|
||||
MathJax.typeset($('.middle-right-content')[0]);
|
||||
onWindowReady();
|
||||
$('.xdsoft_datetimepicker').hide();
|
||||
}
|
||||
else {
|
||||
window.location.href = url;
|
||||
|
|
Loading…
Reference in a new issue