diff --git a/pod/main/static/css/dark.css b/pod/main/static/css/dark.css index 71697c1152..77f69ed2c2 100644 --- a/pod/main/static/css/dark.css +++ b/pod/main/static/css/dark.css @@ -292,7 +292,8 @@ body.dark { [data-theme="dark"] .select2-dropdown-open .select2-choice, [data-theme="dark"] .select2-results .select2-no-results, [data-theme="dark"] .select2-results .select2-searching, -[data-theme="dark"] .select2-container--default .select2-selection--multiple { +[data-theme="dark"] .select2-container--default .select2-selection--multiple, +[data-theme="dark"] .select2-container--default .select2-selection--single { background-color: var(--pod-background-neutre1-bloc); border-color: var(--pod-font-color); color: var(--pod-font-color); @@ -304,6 +305,15 @@ body.dark { color: #000; } +[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered{ + color: var(--pod-font-color); +} + +[data-theme="dark"] .select2-results__option { + background-color: var(--pod-background-neutre1-bloc); + color: var(--pod-font-color); +} + [data-theme="dark"] .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f3f9ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); } diff --git a/pod/video/forms.py b/pod/video/forms.py index 3c1f0e2292..c66f23f976 100644 --- a/pod/video/forms.py +++ b/pod/video/forms.py @@ -829,7 +829,8 @@ def __init__(self, *args, **kwargs): if self.instance and self.instance.video: if self.instance.encoding_in_progress or not self.instance.encoded: - self.remove_field("owner") + if not self.is_superuser: + self.remove_field("owner") self.remove_field("video") # .widget = forms.HiddenInput() # remove required=True for videofield if instance diff --git a/pod/video/management/commands/create_thumbnail.py b/pod/video/management/commands/create_thumbnail.py index a7bdf72316..a6b884f10c 100755 --- a/pod/video/management/commands/create_thumbnail.py +++ b/pod/video/management/commands/create_thumbnail.py @@ -1,7 +1,7 @@ from django.core.management.base import BaseCommand from pod.video.models import Video -from pod.video.Encoding_video_model import Encoding_video_model -from pod.video.models import EncodingLog +from pod.video_encode_transcript.Encoding_video_model import Encoding_video_model +from pod.video_encode_transcript.models import EncodingLog class Command(BaseCommand): diff --git a/pod/video/static/js/video_stats_view.js b/pod/video/static/js/video_stats_view.js index af9fa50027..d8256e9c5f 100644 --- a/pod/video/static/js/video_stats_view.js +++ b/pod/video/static/js/video_stats_view.js @@ -99,13 +99,17 @@ $(() => { pager: "#pager", sortorder: "asc", beforeProcessing: function (data) { - // Set min date - let min_date = data.filter((obj) => { - return obj.min_date != undefined; - }); - // remove date_min in data - data.pop(); - document.querySelector("#jsperiode").min = min_date[0].min_date; + // Avoid "data.filter is not a function" error (if change number of lines or page) + try { + // Set min date + let min_date = data.filter((obj) => { + return obj.min_date != undefined; + }); + // remove date_min in data + data.pop(); + document.getElementById("jsperiode").min = min_date[0].min_date; + } + catch(uselesserr) { } }, postData: { csrfmiddlewaretoken: $("[name=csrfmiddlewaretoken]").val(), @@ -113,7 +117,7 @@ $(() => { }); let today = new Date().toISOString().split("T")[0]; $("#jsperiode").val(today); // set date input value to today - document.querySelector("#jsperiode").max = today; + document.getElementById("jsperiode").max = today; $("#jsperiode").on("change paste keyup", function (e) { if ($(this).val() != undefined && $(this).val().trim() !== "") { diff --git a/pod/video_encode_transcript/Encoding_video_model.py b/pod/video_encode_transcript/Encoding_video_model.py index f8dd078e9d..573333751d 100644 --- a/pod/video_encode_transcript/Encoding_video_model.py +++ b/pod/video_encode_transcript/Encoding_video_model.py @@ -383,7 +383,7 @@ def recreate_thumbnail(self): encoding_log.save() if len(self.list_thumbnail_files) > 0: info_video["list_thumbnail_files"] = self.list_thumbnail_files - self.store_json_list_thumbnail_files(info_video, video_to_encode) + self.store_json_list_thumbnail_files(info_video) def encode_video(self): """Start video encoding."""