diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 0000000000..a043666029
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,41 @@
+module.exports = {
+ "env": {
+ "browser": true,
+ "commonjs": true,
+ "es2021": true,
+ "node": true
+ },
+ "extends": "eslint:recommended",
+ "parserOptions": {
+ "ecmaVersion": "latest",
+ "sourceType": "script"
+ },
+ "rules": {
+ "indent": [
+ "error",
+ 2,
+ {"SwitchCase": 1}
+ ],
+ "linebreak-style": [
+ "error",
+ "unix"
+ ],
+ "semi": [
+ "error",
+ "always",
+ ],
+ /*"camelcase": ["warn", {"ignoreGlobals": true}],*/
+ /* First capital letter is reserved for "new" Objects. */
+ "new-cap": ["warn", { "capIsNew": true }]
+ },
+ /* functions and Objects that will not trigger a "not defined" error. */
+ "globals": {
+ "Cookies": "readonly",
+ "gettext": "readonly",
+ "interpolate": "readonly",
+ "bootstrap": "readonly",
+ "videojs": "readonly",
+ "send_form_data": "writable",
+ "showalert": "writable",
+ }
+};
diff --git a/.github/workflows/code_formatting.yml b/.github/workflows/code_formatting.yml
index a1ee4ea2d3..bf7a7f4447 100644
--- a/.github/workflows/code_formatting.yml
+++ b/.github/workflows/code_formatting.yml
@@ -17,9 +17,11 @@ jobs:
git config user.email github-actions@github.com
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
- # Prettify js code with prettier
+ # Prettify js+css code with prettier
- name: Running prettier
- run: npx prettier --write pod/*/static/**/*.js
+ run: |
+ npx prettier --write pod/*/static/**/*.js
+ npx prettier --write pod/*/static/**/*.css
- name: Check for modified files
id: prettier-git-check
diff --git a/.pa11yci b/.pa11yci
index 2ff160e506..8bb2b412b0 100644
--- a/.pa11yci
+++ b/.pa11yci
@@ -16,7 +16,7 @@
"http://localhost:9090/video/0001-video-test/",
"http://localhost:9090/live/events/"
],
- "todo":[
+ "todo": [
"These urls are not A11y compliant yet, and need more work from 3rd party",
"http://localhost:9090/video/stats_view/videos/"
]
diff --git a/.stylelintrc.json b/.stylelintrc.json
new file mode 100644
index 0000000000..40db42c668
--- /dev/null
+++ b/.stylelintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "stylelint-config-standard"
+}
diff --git a/CONFIGURATION_FR.md b/CONFIGURATION_FR.md
index ceedd88995..0afa7f1d62 100644
--- a/CONFIGURATION_FR.md
+++ b/CONFIGURATION_FR.md
@@ -6,7 +6,7 @@
La plateforme Esup-Pod se base sur le framework Django écrit en Python.
-Elle supporte les versions 3.7, 3.8 et 3.9 de Python.
+Elle est compatible avec les versions 3.8, 3.9 et 3.10 de Python.
**Django Version : 3.2 LTS**
@@ -72,6 +72,30 @@ Voici les configurations des applications tierces utilisées par Esup-Pod.
>> Système d’authentification OpenID Connect
>> [https://mozilla-django-oidc.readthedocs.io/en/stable/installation.html]()
+ - `pwa`
+
+ > valeur par défaut : `1.1.0`
+
+ >> Mise en place du mode PWA grâce à l'application Django-pwa
+ >> Voici la configuration par défaut pour Pod, vous pouvez surcharger chaque variable dans votre fichier de configuration.
+ >> PWA_APP_NAME = "Pod"
+ >> PWA_APP_DESCRIPTION = _(
+ >> "Pod is aimed at users of our institutions, by allowing the publication of "
+ >> "videos in the fields of research (promotion of platforms, etc.), training "
+ >> "(tutorials, distance training, student reports, etc.), institutional life (video "
+ >> "of events), offering several days of content."
+ >> )
+ >> PWA_APP_THEME_COLOR = "#0A0302"
+ >> PWA_APP_BACKGROUND_COLOR = "#ffffff"
+ >> PWA_APP_DISPLAY = "standalone"
+ >> PWA_APP_SCOPE = "/"
+ >> PWA_APP_ORIENTATION = "any"
+ >> PWA_APP_START_URL = "/"
+ >> PWA_APP_STATUS_BAR_COLOR = "default"
+ >> PWA_APP_DIR = "ltr"
+ >> PWA_APP_LANG = "fr-FR"
+ >> Pour en savoir plus : [https://github.com/silviolleite/django-pwa]()
+
- `rest_framework`
> valeur par défaut : `3.14.0`
@@ -711,17 +735,17 @@ Vous pouvez tout à fait rajouter des langues comme vous le souhaitez. Il faudra
>> Si True, permet de cacher l’onglet chaine dans la barre de menu du haut.
- - `HIDE_DISCIPLINES`
+ - `HIDE_CURSUS`
> valeur par défaut : `False`
- >> Si True, permet de ne pas afficher les disciplines dans la colonne de droite
+ >> Si True, permet de ne pas afficher les cursus dans la colonne de droite
- - `HIDE_CURSUS`
+ - `HIDE_DISCIPLINES`
> valeur par défaut : `False`
- >> Si True, permet de ne pas afficher les cursus dans la colonne de droite
+ >> Si True, permet de ne pas afficher les disciplines dans la colonne de droite
- `HIDE_LANGUAGE_SELECTOR`
@@ -954,7 +978,7 @@ Vous pouvez tout à fait rajouter des langues comme vous le souhaitez. Il faudra
- `TRANSCRIPTION_STT_SENTENCE_MAX_LENGTH`
- > valeur par défaut : `3`
+ > valeur par défaut : `2`
>> Temps en secondes maximum pour une phrase lors de la transcription avec l’outil STT.
@@ -1401,12 +1425,6 @@ Vous pouvez tout à fait rajouter des langues comme vous le souhaitez. Il faudra
Application Import_video permettant d'importer des vidéos externes dans Pod.
Mettre `USE_IMPORT_VIDEO` à True pour activer cette application.
- - `RESTRICT_EDIT_IMPORT_VIDEO_ACCESS_TO_STAFF_ONLY`
-
- > valeur par défaut : `True`
-
- >> Seuls les utilisateurs "staff" pourront importer des vidéos
-
- `MAX_UPLOAD_SIZE_ON_IMPORT`
> valeur par défaut : `4`
@@ -1414,6 +1432,12 @@ Mettre `USE_IMPORT_VIDEO` à True pour activer cette application.
>> Taille maximum en Go des fichiers vidéos qui peuvent être importés sur la plateforme
>> via l'application import_video (0 = pas de taille maximum).
+ - `RESTRICT_EDIT_IMPORT_VIDEO_ACCESS_TO_STAFF_ONLY`
+
+ > valeur par défaut : `True`
+
+ >> Seuls les utilisateurs "staff" pourront importer des vidéos
+
- `USE_IMPORT_VIDEO`
> valeur par défaut : `True`
@@ -1475,18 +1499,18 @@ Mettre `USE_IMPORT_VIDEO` à True pour activer cette application.
>> Permet de lancer automatiquement l’enregistrement sur l’interface utilisée (wowza, ) sur le broadcaster et spécifié par `BROADCASTER_PILOTING_SOFTWARE`
- - `EVENT_GROUP_ADMIN`
-
- > valeur par défaut : `event admin`
-
- >> Permet de préciser le nom du groupe dans lequel les utilisateurs peuvent planifier un évènement sur plusieurs jours.
-
- `EVENT_CHECK_MAX_ATTEMPT`
> valeur par défaut : `10`
>> Nombre de tentatives maximum pour vérifier la présence / taille d'un fichier sur le filesystem
+ - `EVENT_GROUP_ADMIN`
+
+ > valeur par défaut : `event admin`
+
+ >> Permet de préciser le nom du groupe dans lequel les utilisateurs peuvent planifier un évènement sur plusieurs jours.
+
- `HEARTBEAT_DELAY`
> valeur par défaut : `45`
@@ -1784,13 +1808,6 @@ Mettre `USE_MEETING` à True pour activer cette application.
Application Playlist pour la gestion des playlists.
Mettre `USE_PLAYLIST` à True pour activer cette application.
- - `DEFAULT_PLAYLIST_THUMBNAIL`
-
- > valeur par défaut : `/static/playlist/img/default-playlist.svg`
-
- >> Image par défaut affichée comme poster ou vignette, utilisée pour présenter la playlist.
- >> Cette image doit se situer dans le répertoire `static`.
-
- `COUNTDOWN_PLAYLIST_PLAYER`
> valeur par défaut : `0`
@@ -1798,6 +1815,13 @@ Mettre `USE_PLAYLIST` à True pour activer cette application.
>> Compte à rebours utilisé entre chaque vidéo lors de la lecture d'une playlist en lecture automatique.
>> Le compte à rebours n'est pas présent s'il est à 0.
+ - `DEFAULT_PLAYLIST_THUMBNAIL`
+
+ > valeur par défaut : `/static/playlist/img/default-playlist.svg`
+
+ >> Image par défaut affichée comme poster ou vignette, utilisée pour présenter la playlist.
+ >> Cette image doit se situer dans le répertoire `static`.
+
- `USE_FAVORITES`
> valeur par défaut : `True`
@@ -1840,6 +1864,12 @@ Mettre `USE_PLAYLIST` à True pour activer cette application.
### Configuration application progressive_web_app
+ - `USE_NOTIFICATIONS`
+
+ > valeur par défaut : `True`
+
+ >> Activation des notifications, attention, elles sont actives par défaut.
+
- `WEBPUSH_SETTINGS`
> valeur par défaut :
@@ -1998,6 +2028,13 @@ Mettre `USE_PLAYLIST` à True pour activer cette application.
>> Activer les commentaires au niveau de la plateforme
+ - `CACHE_VIDEO_DEFAULT_TIMEOUT`
+
+ > valeur par défaut : `600`
+
+
+ >> Temps en seconde de conservation des données de l'application video
+
- `CHANNEL_FORM_FIELDS_HELP_TEXT`
> valeur par défaut : ``
@@ -2569,6 +2606,18 @@ Attention, il faut configurer Celery pour l’envoi des instructions pour l'enco
>> Si True, un courriel est envoyé aux managers et à l’auteur (si DEBUG est à False) à la fin de la transcription
+ - `ENCODE_STUDIO`
+
+ > valeur par défaut : `start_encode_studio`
+
+ >> Fonction appelée pour lancer l’encodage du studio (merge and cut).
+
+ - `ENCODE_VIDEO`
+
+ > valeur par défaut : `start_encode`
+
+ >> Fonction appelée pour lancer l’encodage des vidéos direct par thread ou distant par celery
+
- `ENCODING_CHOICES`
> valeur par défaut : `()`
@@ -2587,6 +2636,14 @@ Attention, il faut configurer Celery pour l’envoi des instructions pour l'enco
>>
>> ```
+ - `ENCODING_TRANSCODING_CELERY_BROKER_URL`
+
+ > valeur par défaut : `False`
+
+
+ >> Il faut renseigner l'url du redis sur lequel Celery va chercher les ordres d'encodage et de transcription
+ >> par exemple : "redis://redis:6379/7"
+
- `FORMAT_CHOICES`
> valeur par défaut : `()`
@@ -2605,17 +2662,12 @@ Attention, il faut configurer Celery pour l’envoi des instructions pour l'enco
>>
>> ```
- - `ENCODE_STUDIO`
-
- > valeur par défaut : `start_encode_studio`
-
- >> Fonction appelée pour lancer l’encodage du studio (merge and cut).
+ - `USE_DISTANT_ENCODING_TRANSCODING`
- - `ENCODE_VIDEO`
+ > valeur par défaut : `False`
- > valeur par défaut : `start_encode`
- >> Fonction appelée pour lancer l’encodage des vidéos direct par thread ou distant par celery
+ >> Si True, active l'encodage et la transcription sur un environnement distant via redis+celery
- `VIDEO_RENDITIONS`
@@ -2658,21 +2710,6 @@ Attention, il faut configurer Celery pour l’envoi des instructions pour l'enco
>>
>> ```
- - `ENCODING_TRANSCODING_CELERY_BROKER_URL`
-
- > valeur par défaut : `False`
-
-
- >> Il faut renseigner l'url du redis sur lequel Celery va chercher les ordres d'encodage et de transcription
- >> par exemple : "redis://redis:6379/7"
-
- - `USE_DISTANT_ENCODING_TRANSCODING`
-
- > valeur par défaut : `False`
-
-
- >> Si True, active l'encodage et la transcription sur un environnement distant via redis+celery
-
### Configuration application search
- `ES_INDEX`
diff --git a/dockerfile-dev-with-volumes/pod-back/Dockerfile b/dockerfile-dev-with-volumes/pod-back/Dockerfile
index e0d9013d7d..6f509e568c 100755
--- a/dockerfile-dev-with-volumes/pod-back/Dockerfile
+++ b/dockerfile-dev-with-volumes/pod-back/Dockerfile
@@ -19,7 +19,7 @@ FROM $PYTHON_VERSION
# TODO
#FROM harbor.urba.univ-lille.fr/store/python:3.7-buster
-RUN apt-get clean && apt-get update && apt-get install -y netcat
+RUN apt-get clean && apt-get update && apt-get install -y netcat && apt-get install -y gettext
WORKDIR /usr/src/app
diff --git a/dockerfile-dev-with-volumes/pod/Dockerfile b/dockerfile-dev-with-volumes/pod/Dockerfile
index 68f8d08065..a716a6ff92 100755
--- a/dockerfile-dev-with-volumes/pod/Dockerfile
+++ b/dockerfile-dev-with-volumes/pod/Dockerfile
@@ -23,7 +23,8 @@ RUN apt-get clean && apt-get update \
&& apt-get install -y netcat \
ffmpeg \
ffmpegthumbnailer \
- imagemagick
+ imagemagick \
+ gettext
WORKDIR /usr/src/app
diff --git a/pod/authentication/backends.py b/pod/authentication/backends.py
index 1b2ee527a7..57bda9b203 100644
--- a/pod/authentication/backends.py
+++ b/pod/authentication/backends.py
@@ -20,8 +20,9 @@ def is_staff_affiliation(affiliation):
class ShibbBackend(ShibbolethRemoteUserBackend):
def authenticate(self, request, remote_user, shib_meta):
"""
- The username passed as ``remote_user`` is considered trusted. Use the
- username to get or create the user.
+ Username passed as `remote_user` is considered trusted.
+
+ Use the username to get or create the user.
"""
if not remote_user:
return
diff --git a/pod/bbb/static/css/bbb.css b/pod/bbb/static/css/bbb.css
index 521a6cc6e7..cd388c7916 100644
--- a/pod/bbb/static/css/bbb.css
+++ b/pod/bbb/static/css/bbb.css
@@ -1,15 +1,22 @@
+/**
+ * Esup-Pod BBB styles
+ */
+
#bbb_meetings_list .card-header {
background: var(--color-black-alpha);
- padding: 0 .25rem;
+ padding: 0 0.25rem;
z-index: 9;
}
-#bbb_meetings_list .card-header .text-muted{
- color: var(--color-white) !important;
+
+#bbb_meetings_list .card-header .text-muted {
+ color: var(--color-white) !important;
}
+
/* To always see publish button */
-#bbb_meetings_list .infinite-item .card-body{
-height: auto !important;
+#bbb_meetings_list .infinite-item .card-body {
+ height: auto !important;
+}
+
+#bbb_meetings_list .infinite-item .card-body footer a {
+ width: 100% !important;
}
-#bbb_meetings_list .infinite-item .card-body footer a{
-width: 100% !important;
-}
\ No newline at end of file
diff --git a/pod/chapter/static/css/chapters.css b/pod/chapter/static/css/chapters.css
index 0530205422..b5d17425b6 100644
--- a/pod/chapter/static/css/chapters.css
+++ b/pod/chapter/static/css/chapters.css
@@ -1,90 +1,107 @@
+/**
+ * Esup-Pod Chapter styles
+ */
/*** Table scroll ***/
table.scroll {
- width: 100%;
- border-collapse: collapse;
- border-spacing: 0;
+ width: 100%;
+ border-collapse: collapse;
+ border-spacing: 0;
}
+
table.scroll .btn-sm,
table.scroll .btn-group-sm > .btn {
- border-radius: 3px;
- font-size: 12px;
- line-height: 0.5;
- padding: 5px 10px;
+ border-radius: 3px;
+ font-size: 12px;
+ line-height: 0.5;
+ padding: 5px 10px;
}
+
table.scroll tbody,
table.scroll thead {
- display: block;
+ display: block;
}
+
table.scroll thead tr th {
- height: 27px;
- line-height: 27px;
- text-align: left;
+ height: 27px;
+ line-height: 27px;
+ text-align: left;
}
+
table.scroll tbody {
- max-height: 200px;
- overflow-y: auto;
- overflow-x: hidden;
+ max-height: 200px;
+ overflow-y: auto;
+ overflow-x: hidden;
}
+
table.scroll tbody td,
table.scroll thead th {
- width: 10%;
- height: 20px;
- white-space: nowrap;
- line-height: 20px;
+ width: 10%;
+ height: 20px;
+ white-space: nowrap;
+ line-height: 20px;
}
+
table.scroll thead th.chapter_title,
table.scroll thead th.chapter_time_start,
table.scroll thead th.chapter_time_end {
- white-space: nowrap;
+ white-space: nowrap;
}
+
#list_chapter .panel-heading,
#form_chapter .panel-heading {
- border-bottom: 1px solid transparent;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
- padding: 4px 15px;
+ border-bottom: 1px solid transparent;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+ padding: 4px 15px;
}
+
#form_new {
- padding-left: 12px;
- padding-bottom: 10px;
+ padding-left: 12px;
+ padding-bottom: 10px;
}
+
#form_chapter,
#form_chapter_import,
#form_vtt {
- padding: 10px;
+ padding: 10px;
}
+
form#form_chapter,
form#form_chapter_import {
- background-color: rgba(0, 0, 0, .05);
+ background-color: rgba(0 0 0 0.05);
}
+
.form-group.row p {
- padding: 2px;
+ padding: 2px;
}
/** Filepicker override **/
div.file-picker-overlay,
div.file-picker,
ul.css-tabs a {
- box-sizing: content-box;
+ box-sizing: content-box;
}
+
textarea#id_description {
- line-height: normal;
+ line-height: normal;
}
+
div.file-picker-overlay input[type="text"],
-div.file-picker-overlay textarea,
+div.file-picker-overlay textarea,
div.file-picker-overlay select {
- border: 1px solid #ccc;
- border-radius: 4px;
- padding: 5px 6px;
- margin-top: 0;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ padding: 5px 6px;
+ margin-top: 0;
}
+
.file-list a:hover {
- cursor: pointer;
- color: #007bff !important;
+ cursor: pointer;
+ color: #007bff !important;
}
/** Bootstrap override **/
.card-title {
- margin: .45rem;
-}
\ No newline at end of file
+ margin: 0.45rem;
+}
diff --git a/pod/chapter/static/css/videojs-chapters.css b/pod/chapter/static/css/videojs-chapters.css
index f8d2d1c38e..e196bdd172 100644
--- a/pod/chapter/static/css/videojs-chapters.css
+++ b/pod/chapter/static/css/videojs-chapters.css
@@ -1,3 +1,7 @@
+/**
+ * Esup-Pod video-js chapter styles
+ */
+
.chapters-list.inactive,
.chapters-list.active {
position: absolute;
@@ -5,12 +9,10 @@
top: 0;
height: 100%;
width: 20%;
- background-color: rgba(43, 51, 63, .7);
+ background-color: rgba(43 51 63 0.7);
overflow-y: auto;
- /*border: 2px solid black;*/
cursor: default;
z-index: 2;
-
}
.chapters-list.inactive {
@@ -45,9 +47,17 @@
display: list-item;
list-style-type: none;
text-align: -webkit-match-parent;
- /*background-color: rgba(0, 0, 0, 0.8);*/
margin: 0 3px;
- border-top: 1px solid rgba(0, 0, 0, .8);
+ border-top: 1px solid rgba(0 0 0 0.8);
+}
+
+.chapters-list ol li a {
+ display: block;
+ padding: 0.7rem 1rem;
+ transition: 0.3s;
+ color: #fff;
+ text-align: left;
+ font-size: 1.3em;
}
.chapters-list ol li a:hover,
@@ -58,15 +68,6 @@
cursor: pointer;
}
-.chapters-list ol li a {
- display: block;
- padding: .7rem 1rem;
- transition: .3s;
- color: #fff;
- text-align: left;
- font-size: 1.3em;
-}
-
#chapters {
display: none;
}
diff --git a/pod/completion/static/css/caption_maker.css b/pod/completion/static/css/caption_maker.css
index a599853de7..4b7271ef65 100644
--- a/pod/completion/static/css/caption_maker.css
+++ b/pod/completion/static/css/caption_maker.css
@@ -1,356 +1,245 @@
+/**
+ * Esup-Pod caption_maker styles
+ */
+
#videoElm {
- display: block;
- border: solid 1px #999;
- width: 100%;
- min-height: 297px;
+ display: block;
+ border: solid 1px #999;
+ width: 100%;
+ min-height: 297px;
}
+
.videoError {
- display: block;
- background-color: #999;
- width: 100%;
- min-height: 297px;
- color: white;
- text-align: center;
- padding: 12px;
+ display: block;
+ background-color: #999;
+ width: 100%;
+ min-height: 297px;
+ color: white;
+ text-align: center;
+ padding: 12px;
}
#videoError {
- display: none;
+ display: none;
}
+
#captionTitle {
- padding-top: 4px;
- padding-bottom: 4px;
- min-height: 32px;
+ padding-top: 4px;
+ padding-bottom: 4px;
+ min-height: 32px;
}
#textCaptionEntry {
- /*
- width: 100%;
- height: auto;
- line-height: 19px;
- border: 1px solid #999;
- padding: 3px 8px 5px;
- min-height: 50px;
- overflow: hidden;
- */
- text-align: center;
+ text-align: center;
}
#textCaptionEntry.playing {
- background-color: var(--pod-background-dark);
- color: white;
+ background-color: var(--pod-background-dark);
+ color: white;
}
-/*textarea {
- line-height: 16px;
- font-size: 14px;
- resize: none;
- border: 1px solid #ccc;
- border-radius: 4px;
-}*/
-
.shortcutKey {
- display: inline-block;
- border: 2px solid #222;
- border-radius: 6px;
- padding: 3px 8px;
- font-weight: 600;
- margin-right: 8px;
- margin-left: 8px;
- min-width: 35px;
- text-align: center;
+ display: inline-block;
+ border: 2px solid #222;
+ border-radius: 6px;
+ padding: 3px 8px;
+ font-weight: 600;
+ margin-right: 8px;
+ margin-left: 8px;
+ min-width: 35px;
+ text-align: center;
}
.shortcutKey svg {
- transform: translateY(-2px);
+ transform: translateY(-2px);
}
/* the list of captions */
-.gray_no_video{
- display: flex;
- flex-wrap: wrap;
- border-top: 1px solid #E1E1E1;
+.gray_no_video {
+ display: flex;
+ flex-wrap: wrap;
+ border-top: 1px solid #e1e1e1;
}
.videoSection {
- float: left;
- min-height: 425px;
- width: 49%;
- padding: 24px 0px;
- padding-right: 24px;
+ float: left;
+ min-height: 425px;
+ width: 49%;
+ padding: 24px 0;
+ padding-right: 24px;
}
.caption_content {
- border-left: 1px solid #E1E1E1;
- display: inline-block;
- width: 49%;
- /* overflow-y: auto; */
-}
-
-.caption_content .caption_title{
- display: flex;
- position: relative;
-}
-.caption_content svg{
- width: 20px;
- color: var(--secondary);
- margin-left: 4px;
-}
-.caption_content .caption_title svg:hover + .help_text{
- display: block;
-}
-.caption_content .help_text{
- display: none;
- position: absolute;
- background: var(--pod-primary);
- color: #fff;
- width: calc(100% - 110px);
- right: 0;
- padding: .4em .8em;
- border-radius: 4px;
- box-shadow: 4px 4px 10px #ccc;
- font-size: 15px;
- line-height: 1.4;
+ border-left: 1px solid #e1e1e1;
+ display: inline-block;
+ width: 49%;
}
-.captions_editor {
- height: 470px;
+.caption_content .caption_title {
+ display: flex;
+ position: relative;
+}
- overflow-y: auto;
- /*resize: none;
- width: 100%;
- padding: 0;*/
+.caption_content svg {
+ width: 20px;
+ color: var(--secondary);
+ margin-left: 4px;
+}
+.caption_content .caption_title svg:hover + .help_text {
+ display: block;
}
-#newCaptionsEditor {
- margin-bottom: 6px;
+.caption_content .help_text {
+ display: none;
+ position: absolute;
+ background: var(--pod-primary);
+ color: #fff;
+ width: calc(100% - 110px);
+ right: 0;
+ padding: 0.4em 0.8em;
+ border-radius: 4px;
+ box-shadow: 4px 4px 10px #ccc;
+ font-size: 15px;
+ line-height: 1.4;
+}
+.captions_editor {
+ height: 470px;
+ overflow-y: auto;
+}
+
+#newCaptionsEditor {
+ margin-bottom: 6px;
}
.newEditorBlock {
- border-bottom: 1px solid #E1E1E1;
- padding: 8px;
- transition: 0.2s;
+ border-bottom: 1px solid #e1e1e1;
+ padding: 8px;
+ transition: 0.2s;
}
.newEditorBlock:hover {
- background-color: rgba(223, 230, 246, 0.4);
+ background-color: rgba(223 230 246 0.4);
}
.newEditorBlock > textarea {
- width: 77%;
- /*
- height: 80px;
- border-style: hidden;
- background-color: transparent;
- padding: 8px;
- transition: .4s;
- */
+ width: 77%;
}
.captionBeingEdited {
- border-left: 3px solid var(--pod-primary);
- background-color: rgba(223, 230, 246, 0.4);
+ border-left: 3px solid var(--pod-primary);
+ background-color: rgba(223 230 246 0.4);
}
-/*.captionBeingEdited > textarea {
- border: 1px solid var(--pod-primary);
- border-radius: 4px;
- background-color: #FFF5FB;
-}*/
-
.captionTimestamps {
- /*float: right;*/
- line-height: 32px;
+ line-height: 32px;
}
.newEditorBlock a {
- display: block;
- /*
- margin: 6px 0;
- max-width: 78px;
- color: #3EA6FF;
- font-weight: 400;
- */
+ display: block;
}
.newEditorBlock input {
- margin: 6px 0;
- max-width: 78px;
- display: inline-block;
- padding: 4px;
+ margin: 6px 0;
+ max-width: 78px;
+ display: inline-block;
+ padding: 4px;
}
-/*.captionButtons {
- float: left;
-}*/
-
.captionButtons button {
- /*margin: 9px 2px 2px 2px;
- left: 16px;*/
- display: block;
- width: 28px;
- height: 28px;
- padding: 0;
- border: 0;
- border-radius: 50%;
- /*background: #fff;
- box-shadow: 0 0 4px rgba(0,0,0,.15);
- transition: 0.2s;*/
+ display: block;
+ width: 28px;
+ height: 28px;
+ padding: 0;
+ border: 0;
+ border-radius: 50%;
}
.captionButtons button:hover {
- background: var(--pod-primary-lighten);
+ background: var(--pod-primary-lighten);
}
-/*
-.captionButtons button:hover svg {
- color: #fff;
-}
-
-.captionButtons svg{
- color: #707070;
- margin: 0;
-}*/
-
#addSubtitle svg {
- color: var(--pod-link-color);
+ color: var(--pod-link-color);
}
.makerNavbarRight {
- float: right;
+ float: right;
}
@media only screen and (max-width: 1000px) {
- .makerNavbarRight {
- float: none;
- }
-}
-
-/*
-#captionFilename {
- width: 280px;
- margin-left: 32px;
- transform: translateY(-4px);
- border-top-style: hidden;
- border-right-style: hidden;
- border-left-style: hidden;
- border-bottom-style: groove;
- background-color: transparent;
-}
-
-#switchOldEditMode {
- margin-bottom: 8px;
+ .makerNavbarRight {
+ float: none;
+ }
}
-#captionLanguageSelect {
- margin-right: 10px;
- height: 31px;
- width: 120px;
- background: none;
- border: none;
- color: var(--pod-primary);
- font-weight: 600;
- font-size: 20px;
-}
-
-#captionLanguageSelect:hover {
- cursor: pointer;
-}
-
-#captionLanguageSelect option {
- color: black;
- text-align: left;
- font-size: 16px;
+#captionmakerModal.save > .modal-dialog {
+ max-width: 1000px;
}
-
-#captionKindSelect {
- margin-right: 10px;
- height: 31px;
- width: 120px;
- background: none;
- border: none;
- color: var(--pod-primary);
- font-weight: 600;
- font-size: 20px;
+#editorTipsAndGoBack {
+ width: 100%;
+ clear: both;
+ padding-top: 24px;
+ padding-bottom: 24px;
+ display: block;
+ border-top: 1px solid #e1e1e1;
}
-#captionKindSelect:hover {
- cursor: pointer;
-}
+@media only screen and (max-width: 800px) {
+ .gray_no_video {
+ display: flex;
+ flex-direction: column;
+ }
-#captionKindSelect option {
- color: black;
- text-align: left;
- font-size: 16px;
-}*/
+ .gray_no_video > div {
+ width: 100% !important;
+ }
-#captionmakerModal.save > .modal-dialog {
- max-width: 1000px;
-}
+ .gray_no_video div:first-child {
+ overflow: hidden;
+ margin: 0;
+ margin-bottom: 1em;
+ min-height: unset !important;
+ }
-#editorTipsAndGoBack {
- width: 100%;
- clear: both;
- padding-top: 24px;
- padding-bottom: 24px;
- display: block;
- border-top: 1px solid #E1E1E1;
-}
-
-@media only screen and (max-width: 800px){
- .gray_no_video{
- display: flex;
- flex-direction: column;
- }
- .gray_no_video > div{
- width: 100% !important;
- }
- .gray_no_video div:first-child{
- overflow: hidden;
- margin: 0;
- margin-bottom: 1em;
- min-height: unset !important;
- }
-
- .newEditorBlock > textarea {
- width: 60%;
- }
+ .newEditorBlock > textarea {
+ width: 60%;
+ }
}
.keyframe {
- position: absolute;
- z-index: 2;
- height: 11px;
+ position: absolute;
+ z-index: 2;
+ height: 11px;
}
.keyframe-left {
- transform: translate(-6px, -11px);
+ transform: translate(-6px, -11px);
}
.keyframe-right {
- transform: translate(0, -11px);
+ transform: translate(0, -11px);
}
.regionHighligh {
- position: absolute;
- z-index: 1;
- background-color: rgba(173, 50, 122, .5);
- height: 3px;
+ position: absolute;
+ z-index: 1;
+ background-color: rgba(173 50 122 0.5);
+ height: 3px;
}
::-webkit-scrollbar {
- padding: 2px;
- width: 4px;
+ padding: 2px;
+ width: 4px;
}
::-webkit-scrollbar-track {
- background: none;
+ background: none;
}
::-webkit-scrollbar-thumb {
- background: var(--pod-primary);
- border-radius: 2px;
+ background: var(--pod-primary);
+ border-radius: 2px;
}
diff --git a/pod/completion/static/css/completion.css b/pod/completion/static/css/completion.css
index d50aee21a8..b228cbff4f 100644
--- a/pod/completion/static/css/completion.css
+++ b/pod/completion/static/css/completion.css
@@ -1,137 +1,184 @@
-
-/** Table scroll **/
-table.scroll {
- width: 100%;
- border-collapse: collapse;
- border-spacing: 0;
-}
-table.scroll .btn-sm,
-table.scroll .btn-group-sm > .btn {
- border-radius: 4px;
- font-size: 14px;
- line-height: 1.4;
- padding: .2em .4em;
-}
-table.scroll tbody {
- max-height: 100px;
- overflow-y: auto;
- overflow-x: hidden;
-}
-table.scroll tbody td,
-table.scroll thead th {
- width: 10%;
- height: 20px;
- line-height: 20px;
- border-bottom: 0;
-}
-table.scroll thead tr th {
- height: 27px;
- line-height: 27px;
- text-align: left;
-}
-
-/** Table contributor **/
-table#table_list_contributors tbody td.contributor_name,
-table#table_list_contributors thead th.contributor_name {
- width: 20%;
-}
-
-/** Accordeon for lists **/
-#accordeon li,
-#accordeon div {
- list-style: none;
-}
-
-/** Lists style **/
-#list_contributor .panel-heading,
-#list_track .panel-heading,
-#list_document .panel-heading,
-#list_overlay .panel-heading {
- border-bottom: 1px solid transparent;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
- padding: 4px 15px;
-}
-
-#id_background {
- margin-left: 0.25rem;
- position: inherit;
-}
-
-.contenuTitre{
- display: flex;
- flex-direction: column;
-}
-.contenuTitre #list_track{
- order: 1;
-}
-.contenuTitre .breadcrumb{
- padding: 0;
-}
-.contenuTitre .btn{
- margin-bottom: 1rem;
- margin-right: 1rem;
-}
-
-/***** Override track list *****/
-
-.grid-list-track .division{ grid-column: 1 / span 4; border-bottom: 1px solid #ccc;}
-.grid-list-track .track_kind.options .btn{ font-size: 14px;}
-.grid-list-track .track_kind.options a.btn{ overflow: unset; align-self: self-start;}
-.grid-list-track .track_kind.options .dropdown #dropdownMenuButton{
- background-color: var(--pod-primary);
- color: #fff;
- border-color: var(--pod-primary);
- border-radius: 4px;
-}
-.grid-list-track .track_kind.options .dropdown .dropdown-item{ background-color: #fff; }
-.grid-list-track .track_kind.options .dropdown .btn{ width: 100%; }
-.grid-list-track .track_kind.options .dropdown{ display: none; background-color: #fff;}
-.grid-list-track .thead_title{
- margin: 0;
- padding-right: 20px;
- color: var(--pod-primary);
- word-wrap: break-word;
- font-weight: 600;
-}
-.grid-list-track p{margin: 0;}
-.grid-list-track{
- display: grid;
- grid-template-columns: max-content min-content 1fr min-content;
- grid-gap: 20px;
- margin-bottom: 1em;
- margin-top: 1em;
-}
-.grid-list-track .track_kind.file{word-break: break-word;}
-.track_kind.options{
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- grid-column-gap: 10px;
-}
-.track_kind.options .btn {
- margin: 0;
- padding: .2em .4em;
- font-size: 1rem;
- box-sizing: border-box;
-}
-@media only screen and (max-width: 840px)
-{
-.grid-list-track .track_kind.options .dropdown{ display: inline-block;}
-.grid-list-track .track_kind.options > form,
-.grid-list-track .track_kind.options > #modifCapSubFile{ display: none;}
-}
-
-/** Filepicker override **/
-div.file-picker-overlay,
-div.file-picker,
-ul.css-tabs a {
- box-sizing: content-box;
-}
-textarea#id_description {
- line-height: normal;
-}
-
-/** Bootstrap override **/
-.card-title {
- margin: .45rem;
-}
+/**
+ * Esup-Pod completion styles
+ */
+
+/** Table scroll **/
+table.scroll {
+ width: 100%;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+table.scroll .btn-sm,
+table.scroll .btn-group-sm > .btn {
+ border-radius: 4px;
+ font-size: 14px;
+ line-height: 1.4;
+ padding: 0.2em 0.4em;
+}
+
+table.scroll tbody {
+ max-height: 100px;
+ overflow-y: auto;
+ overflow-x: hidden;
+}
+
+table.scroll tbody td,
+table.scroll thead th {
+ width: 10%;
+ height: 20px;
+ line-height: 20px;
+ border-bottom: 0;
+}
+
+table.scroll thead tr th {
+ height: 27px;
+ line-height: 27px;
+ text-align: left;
+}
+
+/** Table contributor **/
+table#table_list_contributors tbody td.contributor_name,
+table#table_list_contributors thead th.contributor_name {
+ width: 20%;
+}
+
+/** Accordeon for lists **/
+#accordeon li,
+#accordeon div {
+ list-style: none;
+}
+
+/** Lists style **/
+#list_contributor .panel-heading,
+#list_track .panel-heading,
+#list_document .panel-heading,
+#list_overlay .panel-heading {
+ border-bottom: 1px solid transparent;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+ padding: 4px 15px;
+}
+
+#id_background {
+ margin-left: 0.25rem;
+ position: inherit;
+}
+
+.contenuTitre {
+ display: flex;
+ flex-direction: column;
+}
+
+.contenuTitre #list_track {
+ order: 1;
+}
+
+.contenuTitre .breadcrumb {
+ padding: 0;
+}
+
+.contenuTitre .btn {
+ margin-bottom: 1rem;
+ margin-right: 1rem;
+}
+
+/***** Override track list *****/
+
+.grid-list-track .division {
+ grid-column: 1 / span 4;
+ border-bottom: 1px solid #ccc;
+}
+
+.grid-list-track .track_kind.options .btn {
+ font-size: 14px;
+}
+
+.grid-list-track .track_kind.options a.btn {
+ overflow: unset;
+ align-self: self-start;
+}
+
+.grid-list-track .track_kind.options .dropdown #dropdownMenuButton {
+ background-color: var(--pod-primary);
+ color: #fff;
+ border-color: var(--pod-primary);
+ border-radius: 4px;
+}
+
+.grid-list-track .track_kind.options .dropdown .dropdown-item {
+ background-color: #fff;
+}
+
+.grid-list-track .track_kind.options .dropdown .btn {
+ width: 100%;
+}
+
+.grid-list-track .track_kind.options .dropdown {
+ display: none;
+ background-color: #fff;
+}
+
+.grid-list-track .thead_title {
+ margin: 0;
+ padding-right: 20px;
+ color: var(--pod-primary);
+ word-wrap: break-word;
+ font-weight: 600;
+}
+
+.grid-list-track p {
+ margin: 0;
+}
+
+.grid-list-track {
+ display: grid;
+ grid-template-columns: max-content min-content 1fr min-content;
+ grid-gap: 20px;
+ margin-bottom: 1em;
+ margin-top: 1em;
+}
+
+.grid-list-track .track_kind.file {
+ word-break: break-word;
+}
+
+.track_kind.options {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ grid-column-gap: 10px;
+}
+
+.track_kind.options .btn {
+ margin: 0;
+ padding: 0.2em 0.4em;
+ font-size: 1rem;
+ box-sizing: border-box;
+}
+
+@media only screen and (max-width: 840px) {
+ .grid-list-track .track_kind.options .dropdown {
+ display: inline-block;
+ }
+
+ .grid-list-track .track_kind.options > form,
+ .grid-list-track .track_kind.options > #modifCapSubFile {
+ display: none;
+ }
+}
+
+/** Filepicker override **/
+div.file-picker-overlay,
+div.file-picker,
+ul.css-tabs a {
+ box-sizing: content-box;
+}
+
+textarea#id_description {
+ line-height: normal;
+}
+
+/** Bootstrap override **/
+.card-title {
+ margin: 0.45rem;
+}
diff --git a/pod/completion/static/js/caption_maker.js b/pod/completion/static/js/caption_maker.js
index 11c0a3704e..68082fc62a 100644
--- a/pod/completion/static/js/caption_maker.js
+++ b/pod/completion/static/js/caption_maker.js
@@ -1,8 +1,21 @@
-const caption_memories = {
+// Esup-Pod Caption maker Tool
+
+// Read-only globals defined in video_caption_maker.html
+/*
+ global current_folder
+*/
+
+// Global vars
+var fileLoaded = false;
+var fileLoadedId = undefined;
+var captionsArray = [];
+var autoPauseAtTime = -1;
+
+const captionMemories = {
start_time: "00:00.000",
};
const file_prefix = window.location.pathname
- .match(/[\d\w\-]+\/$/)[0]
+ .match(/[\d\w-]+\/$/)[0]
.replace("/", "");
document.addEventListener("click", (e) => {
@@ -17,7 +30,7 @@ document.addEventListener("click", (e) => {
let form = document.getElementById("captionmaker_form");
let data_form = new FormData(form);
- send_form_data(url, data_form, "ProcessProxyVttResponse");
+ send_form_data(url, data_form, "processProxyVttResponse");
});
// Charge caption/subtitle file if exists
@@ -30,7 +43,7 @@ document.addEventListener("DOMContentLoaded", function () {
csrfmiddlewaretoken: Cookies.get("csrftoken"),
};
- send_form_data(url, data, "ProcessProxyVttResponse");
+ send_form_data(url, data, "processProxyVttResponse");
} else {
document.getElementById(
"captionFilename",
@@ -42,7 +55,7 @@ document.addEventListener("DOMContentLoaded", function () {
);
let captionContent = document.getElementById("captionContent");
captionContent.setAttribute("placeholder", placeholder);
- captionContent.addEventListener("mouseup", function (e) {
+ captionContent.addEventListener("mouseup", function () {
let selectedText = this.value.substring(
this.selectionStart,
this.selectionEnd,
@@ -57,10 +70,9 @@ document.addEventListener("DOMContentLoaded", function () {
elt.remove();
});
if (this.value.match(/^WEBVTT/)) {
- ParseAndLoadWebVTT(this.value);
+ parseAndLoadWebVTT(this.value);
} else {
alert(gettext("Unrecognized caption file format."));
- t;
}
});
});
@@ -69,13 +81,21 @@ document.addEventListener("submit", (e) => {
if (e.target.id != "form_save_captions") return;
e.preventDefault();
let caption_content = document.getElementById("captionContent");
- if (!oldModeSelected) caption_content.value = GenerateWEBVTT();
+ if (!oldModeSelected) caption_content.value = generateWEBVTT();
+
+ if (caption_content.value === "false") {
+ showalert(
+ gettext("There are errors in your captions/subtitles. Please review."),
+ "alert-warning",
+ );
+ return;
+ }
if (caption_content.value.trim() === "") {
- showalert(gettext("There is no captions to save."), "alert-danger");
+ showalert(gettext("There is no caption/subtitle to save."), "alert-danger");
return;
}
- if (typeof file_loaded != "undefined" && file_loaded) {
+ if (typeof fileLoaded != "undefined" && fileLoaded) {
let saveModalId = document.getElementById("saveCaptionsModal");
let saveModal = bootstrap.Modal.getOrCreateInstance(saveModalId);
saveModal.show();
@@ -85,25 +105,25 @@ document.addEventListener("submit", (e) => {
}
});
-document.addEventListener("click", (elt) => {
- if (elt.target.id != "modal-btn-new" && elt.target.id != "modal-btn-override")
+document.addEventListener("click", (evt) => {
+ if (evt.target.id != "modal-btn-new" && evt.target.id != "modal-btn-override")
return;
let caption_content = document.getElementById("captionContent");
- if (!oldModeSelected) caption_content.value = GenerateWEBVTT();
+ if (!oldModeSelected) caption_content.value = generateWEBVTT();
let saveModalId = document.getElementById("saveCaptionsModal");
let saveModal = bootstrap.Modal.getOrCreateInstance(saveModalId);
saveModal.hide();
let form_save_captions = document.getElementById("form_save_captions");
- if (elt.target.id == "modal-btn-override") {
+ if (evt.target.id == "modal-btn-override") {
document
.getElementById("form_save_captions")
- .querySelector('input[name="file_id"]').value = file_loaded_id;
+ .querySelector('input[name="file_id"]').value = fileLoadedId;
//form_save_captions.querySelector('input[name="enrich_ready"]').value = "";
updateCaptionsArray(caption_content.value);
send_form_save_captions();
- } else if (elt.target.id == "modal-btn-new") {
+ } else if (evt.target.id == "modal-btn-new") {
form_save_captions.querySelector('input[name="file_id"]').value = "";
//form_save_captions.querySelector('input[name="enrich_ready"]').value="";
@@ -111,15 +131,18 @@ document.addEventListener("click", (elt) => {
}
});
+/**
+ * Send the captions form to be saved
+ */
const send_form_save_captions = function () {
let fileName = document.getElementById("captionFilename").value;
if (fileName.length == 0) {
fileName = `${file_prefix}_captions_${Date.now()}`;
}
- rxSignatureLine = /^WEBVTT(?:\s.*)?$/;
- vttContent = document.getElementById("captionContent").value.trim();
- vttLines = vttContent.split(/\r\n|\r|\n/);
+ let rxSignatureLine = /^WEBVTT(?:\s.*)?$/;
+ let vttContent = document.getElementById("captionContent").value.trim();
+ let vttLines = vttContent.split(/\r\n|\r|\n/);
if (!rxSignatureLine.test(vttLines[0])) {
alert(gettext("Not a valid time track file."));
return;
@@ -130,7 +153,9 @@ const send_form_save_captions = function () {
data_form.append("folder", current_folder);
data_form.append("file", f);
- url = document.getElementById("form_save_captions").getAttribute("action");
+ let url = document
+ .getElementById("form_save_captions")
+ .getAttribute("action");
fetch(url, {
method: "POST",
@@ -194,7 +219,6 @@ document
video_error.textContent = gettext(
"The video could not be loaded, either because the server or network failed or because the format is not supported.",
);
-
break;
default:
video_error.textContent = gettext("An unknown error occurred.");
@@ -207,7 +231,7 @@ document
let shortcutsDisplayed = false;
document
.getElementById("showShortcutTips")
- .addEventListener("click", function (e) {
+ .addEventListener("click", function () {
let shortcuts = document.getElementById("shortcutsBlock");
if (shortcutsDisplayed) {
shortcuts.style.display = "none";
@@ -218,12 +242,12 @@ document
shortcutsDisplayed = !shortcutsDisplayed;
});
-document.getElementById("addSubtitle").addEventListener("click", function (e) {
+document.getElementById("addSubtitle").addEventListener("click", function () {
const pod = document.getElementById("podvideoplayer");
const podPlayer = pod.player;
var playTime = podPlayer.currentTime();
var captionsEndTime = existingCaptionsEndTime();
- AddCaption(
+ addCaption(
captionsEndTime,
playTime > captionsEndTime ? playTime : parseInt(captionsEndTime) + 2,
"",
@@ -251,24 +275,31 @@ let oldModeSelected = false;
document
.getElementById("switchOldEditMode")
- .addEventListener("click", function (e) {
- oldModeSelected = !oldModeSelected;
-
- if (oldModeSelected) {
- document.getElementById("captionContent").value = GenerateWEBVTT();
- document.getElementById("rawCaptionsEditor").style.display = "block";
- document.getElementById("newCaptionsEditor").style.display = "none";
+ .addEventListener("click", function () {
+ if (!oldModeSelected) {
+ let vtt = generateWEBVTT();
+ if (vtt) {
+ document.getElementById("captionContent").value = vtt;
+ document.getElementById("rawCaptionsEditor").style.display = "block";
+ document.getElementById("newCaptionsEditor").style.display = "none";
+ oldModeSelected = !oldModeSelected;
+ }
} else {
+ oldModeSelected = !oldModeSelected;
document.getElementById("rawCaptionsEditor").style.display = "none";
document.getElementById("newCaptionsEditor").style.display = "block";
}
});
-// index into captionsArray of the caption being displayed. -1 if none.
+// index into captionsArray of the caption being displayed. -1 if none.
var captionBeingDisplayed = -1;
-function DisplayExistingCaption(seconds) {
- var ci = FindCaptionIndex(seconds);
+/**
+ * Display existing caption
+ * @param {[type]} seconds [description]
+ */
+function displayExistingCaption(seconds) {
+ var ci = findCaptionIndex(seconds);
captionBeingDisplayed = ci;
if (ci != -1) {
var theCaption = captionsArray[ci];
@@ -276,8 +307,8 @@ function DisplayExistingCaption(seconds) {
divs[divs.length - 1].innerText = theCaption.caption;
var message = gettext("Caption for segment from %s to %s:");
document.getElementById("captionTitle").textContent = interpolate(message, [
- FormatTime(theCaption.start),
- FormatTime(theCaption.end),
+ formatTime(theCaption.start),
+ formatTime(theCaption.end),
]);
document.getElementById("textCaptionEntry").value = theCaption.caption;
@@ -289,12 +320,20 @@ function DisplayExistingCaption(seconds) {
}
}
+/**
+ * Get last existing captions end time.
+ * @return {int} end time
+ */
function existingCaptionsEndTime() {
return captionsArray.length > 0
? captionsArray[captionsArray.length - 1].end
: 0;
}
+/**
+ * Update captions array.
+ * @param {[type]} vtt [description]
+ */
let updateCaptionsArray = (vtt) => {
let arr = vtt.split("\n\n");
captionsArray = [];
@@ -306,19 +345,22 @@ let updateCaptionsArray = (vtt) => {
let data = text.split("\n");
let times = data[0].split("-->");
let newCaption = {
- start: ParseTime(times[0]),
- end: ParseTime(times[1]),
+ start: parseTime(times[0]),
+ end: parseTime(times[1]),
caption: data[1],
};
captionsArray.push(newCaption);
- CreateCaptionBlock(newCaption);
+ createCaptionBlock(newCaption);
}
});
};
+/**
+ * Video play event handler
+ */
function videoPlayEventHandler() {
captionBeingDisplayed = -1;
- // give Opera a beat before doing this
+ // give Opera a beat before doing this
window.setTimeout(function () {
let textCaption = document.getElementById("textCaptionEntry");
textCaption.value = "";
@@ -333,6 +375,9 @@ function videoPlayEventHandler() {
}, 16);
}
+/**
+ * Video pause event handler
+ */
function videoPauseEventHandler() {
document
.querySelectorAll("#playButton, #justSaveCaption, #saveCaptionAndPlay")
@@ -351,14 +396,14 @@ function videoPauseEventHandler() {
var captionsEndTime = existingCaptionsEndTime();
var message = "";
if (playTime - 1 < captionsEndTime) {
- var ci = FindCaptionIndex(playTime - 1);
+ var ci = findCaptionIndex(playTime - 1);
if (ci != -1) {
var theCaption = captionsArray[ci];
message = gettext("Edit caption for segment from %s to %s:");
document.getElementById("captionTitle").textContent = interpolate(
message,
- [FormatTime(theCaption.start), FormatTime(theCaption.end)],
+ [formatTime(theCaption.start), formatTime(theCaption.end)],
);
textCaption.value = theCaption.caption;
@@ -373,8 +418,8 @@ function videoPauseEventHandler() {
} else {
message = gettext("Enter caption for segment from %s to %s:");
document.getElementById("captionTitle").textContent = interpolate(message, [
- FormatTime(existingCaptionsEndTime()),
- FormatTime(playTime),
+ formatTime(existingCaptionsEndTime()),
+ formatTime(playTime),
]);
document.getElementById("textCaptionEntry").value = "";
@@ -384,6 +429,9 @@ function videoPauseEventHandler() {
//$("#textCaptionEntry").focus().get(0).setSelectionRange(1000, 1000); // set focus and selection point to end
}
+/**
+ * Video time update event handler.
+ */
function videoTimeUpdateEventHandler() {
const pod = document.getElementById("podvideoplayer");
const podPlayer = pod.player;
@@ -396,12 +444,12 @@ function videoTimeUpdateEventHandler() {
var captionsEndTime = existingCaptionsEndTime();
if (playTime < captionsEndTime) {
- DisplayExistingCaption(playTime);
+ displayExistingCaption(playTime);
} else {
var message = gettext("Pause to enter caption for segment from %s to %s.");
document.getElementById("captionTitle").textContent = interpolate(message, [
- FormatTime(captionsEndTime),
- FormatTime(playTime),
+ formatTime(captionsEndTime),
+ formatTime(playTime),
]);
let divs = document.querySelectorAll(".vjs-text-track-display div");
@@ -414,8 +462,10 @@ function videoTimeUpdateEventHandler() {
}
}
-// this enables the demo after a successful video load
-function EnableDemoAfterLoadVideo() {
+/**
+ * Enables the demo after a successful video load
+ */
+function enableDemoAfterLoadVideo() {
document
.querySelectorAll(".grayNoVideo a, .grayNoVideo")
.forEach(function (e) {
@@ -443,8 +493,8 @@ const pod = document.getElementById("podvideoplayer");
pod.addEventListener("play", videoPlayEventHandler);
pod.addEventListener("timeupdate", videoTimeUpdateEventHandler);
pod.addEventListener("pause", videoPauseEventHandler);
-pod.addEventListener("canplay", EnableDemoAfterLoadVideo);
-pod.addEventListener("loadeddata", EnableDemoAfterLoadVideo);
+pod.addEventListener("canplay", enableDemoAfterLoadVideo);
+pod.addEventListener("loadeddata", enableDemoAfterLoadVideo);
document.getElementById("playButton").addEventListener("click", function () {
const pod = document.getElementById("podvideoplayer");
@@ -458,49 +508,96 @@ document.getElementById("pauseButton").addEventListener("click", function () {
podPlayer.pause();
});
-function GenerateWEBVTT() {
+/**
+ * Generate a WEBVTT file from all the captionTextInput.
+ * @return {string|false} The generated WEBVTT string
+ */
+function generateWEBVTT() {
let vtt = "";
- document
- .querySelectorAll("#newCaptionsEditor > .newEditorBlock")
- .forEach((e) => {
- let captionText = e.querySelector(".captionTextInput").value;
- let startTime = e.querySelector(".startTimeBtn").text;
- let endTime = e.querySelector(".endTimeBtn").text;
- vtt += `\n\n${startTime} --> ${endTime}\n${captionText}`;
- });
+ let captionBlocks = document.querySelectorAll(
+ "#newCaptionsEditor > .newEditorBlock",
+ );
+
+ // If form has invalid fields, do not continue.
+ if (!validateForms(captionBlocks)) {
+ return false;
+ }
+ captionBlocks.forEach((e) => {
+ /* We use FormData to get a formatted version of captionText
+ * including auto "\n" generated by cols='y' rows='x' wrap='hard'
+ */
+ let captionText = new FormData(e).get("captionTextInput");
+ let startTime = e.querySelector(".startTimeBtn").text;
+ let endTime = e.querySelector(".endTimeBtn").text;
+
+ vtt += `\n\n${startTime} --> ${endTime}\n${captionText}`;
+ });
if (vtt.length > 0) vtt = "WEBVTT" + vtt;
return vtt;
}
-function SaveCurrentCaption() {
+/**
+ * Check validity of every form and fires an invalid event on invalid elements
+ * @return {bool} true if everything's fine
+ */
+function validateForms(forms) {
+ let validity = true;
+ forms.forEach((e) => {
+ e.classList.remove("was-validated");
+
+ // After Browser checks, we add some custom ones
+ let captionInput = e.querySelector(".captionTextInput");
+ if (captionInput.value.length > 80) {
+ captionInput.setCustomValidity(
+ gettext("A caption cannot has more than 80 characters.") +
+ "[" +
+ captionInput.value.length +
+ "]",
+ );
+ } else {
+ captionInput.setCustomValidity("");
+ }
+
+ if (!e.reportValidity()) {
+ e.classList.add("was-validated");
+ validity = false;
+ }
+ });
+ return validity;
+}
+
+/**
+ * Save current caption.
+ */
+function saveCurrentCaption() {
const pod = document.getElementById("podvideoplayer");
const podPlayer = pod.player;
var playTime = podPlayer.currentTime();
var captionsEndTime = existingCaptionsEndTime();
let new_entry = document.getElementById("textCaptionEntry").value;
if (playTime - 1 < captionsEndTime) {
- var ci = FindCaptionIndex(playTime - 1);
+ var ci = findCaptionIndex(playTime - 1);
if (ci != -1) {
- UpdateCaption(ci, new_entry);
+ updateCaption(ci, new_entry);
}
} else {
- AddCaption(captionsEndTime, playTime, new_entry);
+ addCaption(captionsEndTime, playTime, new_entry);
}
}
document
.getElementById("justSaveCaption")
.addEventListener("click", function () {
- SaveCurrentCaption();
+ saveCurrentCaption();
});
document
.getElementById("saveCaptionAndPlay")
.addEventListener("click", function () {
- SaveCurrentCaption();
+ saveCurrentCaption();
const pod = document.getElementById("podvideoplayer");
const podPlayer = pod.player;
@@ -518,12 +615,12 @@ document
});
/**
- * Updat caption html content
+ * Update caption html content.
*/
let updateCaptionHtmlContent = () => {
let vtt = "WEBVTT\n\n";
captionsArray.forEach((cap, i) => {
- vtt += `${FormatTime(cap.start)} --> ${FormatTime(cap.end)}\n${
+ vtt += `${formatTime(cap.start)} --> ${formatTime(cap.end)}\n${
cap.caption
}`;
if (i !== captionsArray.length - 1) vtt += "\n\n";
@@ -531,22 +628,36 @@ let updateCaptionHtmlContent = () => {
document.getElementById("captionContent").value = vtt;
};
-function UpdateCaption(ci, captionText) {
+/**
+ * Update caption.
+ * @param {[type]} ci caption index
+ * @param {[type]} captionText caption text
+ */
+function updateCaption(ci, captionText) {
captionsArray[ci].caption = captionText;
updateCaptionHtmlContent();
}
let lastEditedBlock = null;
-function CreateCaptionBlock(newCaption, spawnFunction) {
+/**
+ * Create a caption block object.
+ * @param {Object} newCaption Simple object representing the caption block
+ * @param {Function} spawnFunction Function to call after block init
+ */
+function createCaptionBlock(newCaption, spawnFunction) {
let captionText = newCaption.caption;
- let start = FormatTime(newCaption.start);
- let end = FormatTime(newCaption.end);
-
- let block = {
+ let start = formatTime(newCaption.start);
+ let end = formatTime(newCaption.end);
+
+ /**
+ * Caption Block Object
+ * @type {Object}
+ */
+ let Block = {
// parent
div: new DOMParser().parseFromString(
- `
`,
+ ``,
"text/html",
).body.firstChild,
@@ -557,15 +668,19 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
).body.firstChild,
insertBtn: new DOMParser().parseFromString(
- ` `,
+ )}"> `,
"text/html",
).body.firstChild,
deleteBtn: new DOMParser().parseFromString(
- ` `,
+ )}"> `,
"text/html",
).body.firstChild,
// textarea
@@ -573,13 +688,13 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
"
",
"text/html",
).body.firstChild,
- //captionTextInput: $(`${gettext('Caption')} `),
+
captionTextLabel: new DOMParser().parseFromString(
- `${gettext("Caption")} `,
+ `${gettext("Caption / Subtitle")} `,
"text/html",
).body.firstChild,
captionTextInput: new DOMParser().parseFromString(
- ``,
+ ``,
"text/html",
).body.firstChild,
// time editable
@@ -592,7 +707,7 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
"text/html",
).body.firstChild,
startTimeInput: new DOMParser().parseFromString(
- ` `,
+ ` `,
"text/html",
).body.firstChild,
endTimeLabel: new DOMParser().parseFromString(
@@ -600,7 +715,7 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
"text/html",
).body.firstChild,
endTimeInput: new DOMParser().parseFromString(
- ` `,
+ ` `,
"text/html",
).body.firstChild,
@@ -623,6 +738,9 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
isEditEnabled: false,
// methods
+ /**
+ * Enable Block edition mode
+ */
enableEdit: function () {
if (!this.isEditEnabled) {
if (lastEditedBlock) {
@@ -630,9 +748,7 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
}
this.startTimeInput.value = this.startTimeBtn.textContent;
-
this.endTimeInput.value = this.endTimeBtn.textContent;
-
this.timeBlockEditable.style.display = "";
this.timeBlock.style.display = "none";
this.div.classList.add("captionBeingEdited");
@@ -640,19 +756,23 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
lastEditedBlock = this;
this.isEditEnabled = true;
+ seekVideoTo(newCaption.start);
}
},
+ /**
+ * Disable Block edition mode
+ */
disableEdit: function () {
if (this.isEditEnabled) {
- let newStartTime = ParseTime(this.startTimeInput.value);
- let newEndTime = ParseTime(this.endTimeInput.value);
+ let newStartTime = parseTime(this.startTimeInput.value);
+ let newEndTime = parseTime(this.endTimeInput.value);
newCaption.start = newStartTime;
newCaption.end = newEndTime;
- this.startTimeBtn.textContent = FormatTime(newStartTime);
- this.endTimeBtn.textContent = FormatTime(newEndTime);
+ this.startTimeBtn.textContent = formatTime(newStartTime);
+ this.endTimeBtn.textContent = formatTime(newEndTime);
this.timeBlockEditable.style.display = "none";
this.timeBlock.style.display = "";
@@ -663,6 +783,9 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
}
},
+ /**
+ * Place Block In Order
+ */
placeInOrder: function () {
for (let i in captionsArray) {
let cap = captionsArray[i];
@@ -696,10 +819,19 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
}
},
- spawnNew: function () {
+ /**
+ * Spawn New Block
+ * @param {Event} e Triggered Event
+ */
+ spawnNew: function (e) {
+ e.preventDefault();
const pod = document.getElementById("podvideoplayer");
const podPlayer = pod.player;
let playTime = podPlayer.currentTime();
+ /**
+ * Caption object
+ * @type {Object}
+ */
let captionObj = {
start: newCaption.end,
end:
@@ -709,18 +841,26 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
let index = Array.from(this.div.parentNode.children).indexOf(this.div);
captionsArray.splice(index + 1, 0, captionObj);
- CreateCaptionBlock(captionObj, (newDiv) =>
+ createCaptionBlock(captionObj, (newDiv) =>
this.div.parentNode.insertBefore(newDiv, this.div.nextSibling),
);
},
- delete: function () {
+ /**
+ * Delete Block
+ * @param {Event} e Triggered Event
+ */
+ delete: function (e) {
+ e.preventDefault();
let index = Array.from(this.div.parentNode.children).indexOf(this.div);
captionsArray.splice(index, 1);
this.div.remove();
},
+ /**
+ * Init Block
+ */
init: function () {
var uniq = "c" + Math.floor(Math.random() * 100000000);
this.div.captionBlockObject = this;
@@ -730,8 +870,8 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
this.captionTextInput.setAttribute("id", uniq);
this.captionTextLabel.setAttribute("for", uniq);
- this.insertBtn.addEventListener("click", () => this.spawnNew());
- this.deleteBtn.addEventListener("click", () => this.delete());
+ this.insertBtn.addEventListener("click", (e) => this.spawnNew(e));
+ this.deleteBtn.addEventListener("click", (e) => this.delete(e));
this.startTimeBtn.addEventListener("click", () =>
seekVideoTo(newCaption.start),
);
@@ -784,21 +924,21 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
},
};
- block.init();
- newCaption.blockObject = block;
+ Block.init();
+ newCaption.blockObject = Block;
if (spawnFunction) {
- spawnFunction(block.div);
+ spawnFunction(Block.div);
} else {
let addSubtitle = document.getElementById("addSubtitle");
- addSubtitle.parentNode.insertBefore(block.div, addSubtitle);
+ addSubtitle.parentNode.insertBefore(Block.div, addSubtitle);
}
- block.captionTextInput.addEventListener("input propertychange", function () {
- captionsArray[block.div.index()].caption = this.value;
+ Block.captionTextInput.addEventListener("input propertychange", function () {
+ captionsArray[Block.div.index()].caption = this.value;
});
- block.div.addEventListener(
+ Block.div.addEventListener(
"hover",
function () {
highlightVideoRegion(newCaption.start, newCaption.end);
@@ -809,17 +949,21 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
);
document.getElementById("noCaptionsText")?.remove();
- return block;
+ return Block;
}
+/**
+ * Assign some keyboard shortcuts to editor functions
+ * @type {Object}
+ */
let editorShortcuts = {
Delete: function (e) {
if (e.altKey && lastEditedBlock) {
- lastEditedBlock.delete();
+ lastEditedBlock.delete(e);
return false;
}
},
- PageUp: function (e) {
+ PageUp: function () {
if (lastEditedBlock) {
let prev = lastEditedBlock.div.previousElementSibling;
if (prev) {
@@ -829,7 +973,7 @@ let editorShortcuts = {
}
}
},
- PageDown: function (e) {
+ PageDown: function () {
if (lastEditedBlock) {
let next = lastEditedBlock.div.nextElementSibling;
if (next) {
@@ -839,19 +983,19 @@ let editorShortcuts = {
}
}
},
- ArrowLeft: function (e) {
+ ArrowLeft: function () {
if (this.notFocused()) {
seekVideo(-10);
return false;
}
},
- ArrowRight: function (e) {
+ ArrowRight: function () {
if (this.notFocused()) {
seekVideo(10);
return false;
}
},
- " ": function (e) {
+ " ": function () {
// space
if (this.notFocused()) {
const pod = document.getElementById("podvideoplayer");
@@ -863,7 +1007,7 @@ let editorShortcuts = {
return false;
}
},
- m: function (e) {
+ m: function () {
if (this.notFocused()) {
let player = podPlayer;
@@ -873,13 +1017,13 @@ let editorShortcuts = {
return false;
}
},
- "?": function (e) {
+ "?": function () {
if (this.notFocused()) {
document.getElementById("showShortcutTips").click();
return false;
}
},
- Insert: function (e) {
+ Insert: function () {
if (lastEditedBlock) {
lastEditedBlock.spawnNew();
} else {
@@ -894,11 +1038,15 @@ let editorShortcuts = {
return false;
}
},
- End: function (e) {
+ End: function () {
document.getElementById("saveCaptionAndPlay").click();
return false;
},
+ /**
+ * Check if there is no element on document that is focused
+ * @return {bool} true if not focused
+ */
notFocused: function () {
var focused = document.activeElement;
return focused.length == 0;
@@ -916,15 +1064,20 @@ let editorShortcuts = {
editorShortcuts.init();
-function AddCaptionListRow(ci, newCaption) {
+/**
+ * Add caption list row
+ * @param {[type]} ci [description]
+ * @param {[type]} newCaption [description]
+ */
+function addCaptionListRow(ci, newCaption) {
let vtt = document.getElementById("captionContent");
let vtt_entry = document.getElementById("textCaptionEntry").value.trim();
- let start = caption_memories.start_time;
+ let start = captionMemories.start_time;
const pod = document.getElementById("podvideoplayer");
const podPlayer = pod.player;
- var end = FormatTime(podPlayer.currentTime());
- var captionsEndTime = existingCaptionsEndTime();
+ var end = formatTime(podPlayer.currentTime());
+ // var captionsEndTime = existingCaptionsEndTime();
let caption_text = `${start} --> ${end}\n${vtt_entry}`;
if (vtt_entry !== "") {
if (vtt.value.trim() === "") {
@@ -934,11 +1087,17 @@ function AddCaptionListRow(ci, newCaption) {
}
}
- CreateCaptionBlock(newCaption);
- caption_memories.start_time = end;
+ createCaptionBlock(newCaption);
+ captionMemories.start_time = end;
}
-function AddCaption(captionStart, captionEnd, captionText) {
+/**
+ * Add caption
+ * @param {[type]} captionStart [description]
+ * @param {[type]} captionEnd [description]
+ * @param {[type]} captionText [description]
+ */
+function addCaption(captionStart, captionEnd, captionText) {
const pod = document.getElementById("podvideoplayer");
const podPlayer = pod.player;
let videoDuration = podPlayer.duration();
@@ -952,9 +1111,14 @@ function AddCaption(captionStart, captionEnd, captionText) {
};
captionsArray.push(newCaption);
- AddCaptionListRow(captionsArray.length - 1, newCaption);
+ addCaptionListRow(captionsArray.length - 1, newCaption);
}
+/**
+ * Convert HMS time format to seconds only
+ * @param {string} str hms
+ * @return {number} corresponding seconds
+ */
function hmsToSecondsOnly(str) {
let p = str.split(":"),
s = 0,
@@ -966,8 +1130,11 @@ function hmsToSecondsOnly(str) {
return s;
}
-// parses webvtt time string format into floating point seconds
-function ParseTime(sTime) {
+/**
+ * Parses webvtt time string format into floating point seconds
+ * @param {[type]} sTime [description]
+ */
+function parseTime(sTime) {
let seconds = hmsToSecondsOnly(sTime);
return parseFloat(seconds + "." + (sTime.split(".")[1] || 0));
/*// parse time formatted as hours:mm:ss.sss where hours are optional
@@ -985,8 +1152,11 @@ function ParseTime(sTime) {
return 0;*/
}
-// formats floating point seconds into the webvtt time string format
-function FormatTime(seconds) {
+/**
+ * formats floating point seconds into the webvtt time string format
+ * @param {[type]} seconds [description]
+ */
+function formatTime(seconds) {
var hh = Math.floor(seconds / (60 * 60));
var mm = Math.floor(seconds / 60) % 60;
var ss = seconds % 60;
@@ -1000,7 +1170,11 @@ function FormatTime(seconds) {
);
}
-function FindCaptionIndex(seconds) {
+/**
+ * Find caption index
+ * @param {[type]} seconds [description]
+ */
+function findCaptionIndex(seconds) {
var below = -1;
var above = captionsArray.length;
var i = Math.floor((below + above) / 2);
@@ -1018,11 +1192,15 @@ function FindCaptionIndex(seconds) {
return -1;
}
+/**
+ * Play selected caption
+ * @param {[type]} timeline [description]
+ */
function playSelectedCaption(timeline) {
if (timeline.includes("-->")) {
- let times = timeline.trim().split(/\s?\-\->\s?/);
- let start = times[0].match(/[\d:\.]/) ? ParseTime(times[0]) : null;
- let end = times[1].match(/[\d:\.]/) ? ParseTime(times[1]) : null;
+ let times = timeline.trim().split(/\s?-->\s?/);
+ let start = times[0].match(/[\d:.]/) ? parseTime(times[0]) : null;
+ let end = times[1].match(/[\d:.]/) ? parseTime(times[1]) : null;
if (!isNaN(start) && !isNaN(end)) {
const pod = document.getElementById("podvideoplayer");
const podPlayer = pod.player;
@@ -1036,10 +1214,11 @@ function playSelectedCaption(timeline) {
/**
* Escape Html entities
+ * @param {string} s String to be escaped
*/
function XMLEncode(s) {
return s
- .replace(/\&/g, "&")
+ .replace(/&/g, "&")
.replace(/“/g, """)
.replace(/”/g, """)
.replace(/"/g, """)
@@ -1047,6 +1226,10 @@ function XMLEncode(s) {
.replace(/>/g, ">");
}
+/**
+ * Decode Html entities
+ * @param {String} s String to be decoded
+ */
function XMLDecode(s) {
return s
.replace(/</g, "<")
@@ -1056,12 +1239,17 @@ function XMLDecode(s) {
.replace(/&/g, "&");
}
-function LoadCaptionFile(fileObject) {
+/**
+ * Load caption file
+ * @param {[type]} fileObject [description]
+ */
+/*
+function loadCaptionFile(fileObject) {
if (window.FileReader) {
var reader = new window.FileReader();
reader.addEventListener("load", function () {
- ProcessProxyVttResponse({ status: "success", response: reader.result });
+ processProxyVttResponse({ status: "success", response: reader.result });
});
reader.addEventListener("onerror", function (evt) {
@@ -1078,18 +1266,21 @@ function LoadCaptionFile(fileObject) {
} else {
alert(gettext("Your browser does not support FileReader."));
}
-}
+}*/
-// invoked by script insertion of proxyvtt.ashx
-function ProcessProxyVttResponse(obj) {
+/**
+ * Invoked by script insertion of proxyvtt.ashx
+ * @param {[type]} obj [description]
+ */
+function processProxyVttResponse(obj) {
obj = JSON.parse(obj);
if (obj.status == "error")
alert(gettext("Error loading caption file: ") + obj.message);
else if (obj.status == "success") {
// delete any captions we've got
captionsArray.length = 0;
- file_loaded = true;
- file_loaded_id = obj.id_file;
+ fileLoaded = true;
+ fileLoadedId = obj.id_file;
current_folder = obj.id_folder;
document.querySelectorAll(".newEditorBlock").forEach((elt) => {
elt.remove();
@@ -1102,18 +1293,18 @@ function ProcessProxyVttResponse(obj) {
);
if (obj.response.match(/^WEBVTT/)) {
- ParseAndLoadWebVTT(obj.response);
+ parseAndLoadWebVTT(obj.response);
} else {
alert(gettext("Unrecognized caption file format."));
}
}
}
-//-----------------------------------------------------------------------------------------------------------------------------------------
-// Partial parser for WebVTT files based on the spec at http://dev.w3.org/html5/webvtt/
-//-----------------------------------------------------------------------------------------------------------------------------------------
-
-function ParseAndLoadWebVTT(vtt) {
+/**
+ * Partial parser for WebVTT files based on the spec at http://dev.w3.org/html5/webvtt/
+ * @param {[type]} vtt [description]
+ */
+function parseAndLoadWebVTT(vtt) {
var vttLines = vtt.split(/\r\n|\r|\n/); // create an array of lines from our file
if (vttLines[0].trim().toLowerCase() != "webvtt") {
@@ -1126,7 +1317,7 @@ function ParseAndLoadWebVTT(vtt) {
elt.remove();
});
- var rxTimeLine = /^([\d\.:]+)\s+-->\s+([\d\.:]+)(?:\s.*)?$/;
+ var rxTimeLine = /^([\d.:]+)\s+-->\s+([\d.:]+)(?:\s.*)?$/;
var rxCaptionLine = /^(?:]+)>)?([^\r\n]+)$/;
var rxBlankLine = /^\s*$/;
var rxMarkup = /<[^>]>/g;
@@ -1135,6 +1326,9 @@ function ParseAndLoadWebVTT(vtt) {
cueEnd = null,
cueText = null;
+ /**
+ * Append current caption
+ */
function appendCurrentCaption() {
if (cueStart && cueEnd && cueText) {
let newCaption = {
@@ -1143,7 +1337,7 @@ function ParseAndLoadWebVTT(vtt) {
caption: cueText.trim(),
};
captionsArray.push(newCaption);
- CreateCaptionBlock(newCaption);
+ createCaptionBlock(newCaption);
}
cueStart = cueEnd = cueText = null;
}
@@ -1155,22 +1349,22 @@ function ParseAndLoadWebVTT(vtt) {
}
if (!cueStart && !cueEnd && !cueText && vttLines[i].indexOf("-->") == -1) {
- // this is a cue identifier we're ignoring
+ // this is a cue identifier we're ignoring
continue;
}
var timeMatch = rxTimeLine.exec(vttLines[i]);
if (timeMatch) {
appendCurrentCaption();
- cueStart = ParseTime(timeMatch[1]);
+ cueStart = parseTime(timeMatch[1]);
if (cueStart == 0) cueStart = "0.0";
- cueEnd = ParseTime(timeMatch[2]);
+ cueEnd = parseTime(timeMatch[2]);
continue;
}
var captionMatch = rxCaptionLine.exec(vttLines[i]);
if (captionMatch && cueStart && cueEnd) {
- // captionMatch[1] is the optional voice (speaker) we're ignoring
+ // captionMatch[1] is the optional voice (speaker) we're ignoring
var capLine = captionMatch[2].replace(rxMarkup, "");
if (cueText) cueText += " " + capLine;
else {
@@ -1189,11 +1383,19 @@ var clearVideoRegion;
const registerPlugin = videojs.registerPlugin || videojs.plugin;
+/**
+ * On player ready Event
+ * @param {[type]} player [description]
+ * @param {[type]} options [description]
+ */
const onPlayerReady = function (player, options) {
let startKeyframe;
let endKeyframe;
let regionHighlight;
+ /**
+ * Clear video region
+ */
const clearVideoRegion = () => {
startKeyframe?.remove();
@@ -1204,6 +1406,11 @@ const onPlayerReady = function (player, options) {
player.userActive(false);
};
+ /**
+ * Highlight video region
+ * @param {[type]} startTime [description]
+ * @param {[type]} endTime [description]
+ */
highlightVideoRegion = function (startTime, endTime) {
clearVideoRegion();
player.userActive(true);
@@ -1223,8 +1430,8 @@ const onPlayerReady = function (player, options) {
element.parentNode.insertBefore(startKeyframe, element);
regionHighlight = "
";
- regionHighlight.style = "left: " + `${startPercent}%`;
- regionHighlight.style = "width:" + `${endPercent - startPercent}%`;
+ regionHighlight.style.left = `${startPercent}%`;
+ regionHighlight.style.width = `${endPercent - startPercent}%`;
startKeyframe.after(regionHighlight);
@@ -1235,22 +1442,34 @@ const onPlayerReady = function (player, options) {
regionHighlight.after(endKeyframe);
};
+ /**
+ * Seek video player to absolute `time`.
+ * @param {[type]} time [description]
+ */
seekVideoTo = function (time) {
player.userActive(true);
player.currentTime(time);
};
+ /**
+ * Seek video player to relative `time`.
+ * @param {[type]} time [description]
+ */
seekVideo = function (time) {
player.userActive(true);
player.currentTime(player.currentTime() + time);
};
};
-const timelineRegions = function (options) {
+/**
+ * Timeline regions
+ * @param {[type]} options [description]
+ */
+function timelineRegions(options) {
this.ready(function () {
onPlayerReady(this, options);
});
-};
+}
registerPlugin("timelineRegions", timelineRegions);
diff --git a/pod/completion/templates/video_caption_maker.html b/pod/completion/templates/video_caption_maker.html
index c86f707410..0b44717dc3 100644
--- a/pod/completion/templates/video_caption_maker.html
+++ b/pod/completion/templates/video_caption_maker.html
@@ -84,7 +84,7 @@
{% trans "Caption" %}
-
+
@@ -111,10 +111,10 @@
-
{% trans "No captions" %}
-
-
- {% trans "Add subtitle" %}
+ {% trans "No captions" %}
+
+
+ {% trans "Add a caption/subtitle" %}
@@ -218,11 +218,6 @@
{% trans "Save captions file."%}
{% block more_script %}
diff --git a/pod/cut/static/css/video_cut.css b/pod/cut/static/css/video_cut.css
index d487da90ee..836765d64a 100644
--- a/pod/cut/static/css/video_cut.css
+++ b/pod/cut/static/css/video_cut.css
@@ -1,7 +1,11 @@
+/**
+ * Esup-Pod video-cutter styles
+ */
+
#wrapper_cut {
position: relative;
width: 100%;
- padding: 50px 10px 20px 10px;
+ padding: 50px 10px 20px;
border-radius: 10px;
}
@@ -12,8 +16,6 @@
}
input[type="range"] {
- -webkit-appearance: none;
- -moz-appearance: none;
appearance: none;
width: 100%;
outline: none;
@@ -63,13 +65,12 @@ input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
margin-top: -9px;
border: 1px solid gray;
-
height: 1.7em;
width: 1.7em;
cursor: pointer;
pointer-events: auto;
border-radius: 50%;
- background-color: #FFF;
+ background-color: #fff;
}
input[type="range"]::-moz-range-thumb {
@@ -79,7 +80,7 @@ input[type="range"]::-moz-range-thumb {
cursor: pointer;
pointer-events: auto;
border-radius: 50%;
- background-color: #FFF;
+ background-color: #fff;
}
input[type="range"]::-ms-thumb {
@@ -89,13 +90,14 @@ input[type="range"]::-ms-thumb {
cursor: pointer;
pointer-events: auto;
border-radius: 50%;
- background-color: #FFF;
+ background-color: #fff;
}
-#container_cut{
- /*--bs-btn-focus-shadow-rgb: var(--pod-primary-rgb);*/
+#container_cut {
+ /* --bs-btn-focus-shadow-rgb: var(--pod-primary-rgb); */
--bs-btn-focus-shadow-rgb: 200, 200, 253;
- --bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);;
+ --bs-btn-focus-box-shadow: 0 0 0 0.25rem
+ rgba(var(--bs-btn-focus-shadow-rgb) 0.5);
}
input[type="range"]:active::-webkit-slider-thumb,
@@ -124,7 +126,7 @@ input[type="range"]:focus-visible::-moz-range-thumb {
font-size: 25px;
}
-#values_cut:before {
+#values_cut::before {
content: "";
position: absolute;
height: 0;
diff --git a/pod/enrichment/static/css/enrichment.css b/pod/enrichment/static/css/enrichment.css
index 75ee3e1311..8d126e3ccd 100644
--- a/pod/enrichment/static/css/enrichment.css
+++ b/pod/enrichment/static/css/enrichment.css
@@ -4,59 +4,56 @@
/*** Table scroll ***/
table.scroll {
- width: 100%;
- border-collapse: collapse;
- border-spacing: 0;
+ width: 100%;
+ border-collapse: collapse;
+ border-spacing: 0;
}
+
table.scroll .btn-sm,
table.scroll .btn-group-sm > .btn {
- border-radius: 3px;
- font-size: 12px;
- line-height: 0.5;
- padding: 5px 10px;
+ border-radius: 3px;
+ font-size: 12px;
+ line-height: 0.5;
+ padding: 5px 10px;
}
+
table.scroll thead tr th {
- height: 27px;
- line-height: 27px;
- text-align: left;
- border: none;
+ height: 27px;
+ line-height: 27px;
+ text-align: left;
+ border: none;
}
+
table.scroll tbody {
- max-height: 200px;
- overflow-y: auto;
- overflow-x: hidden;
+ max-height: 200px;
+ overflow-y: auto;
+ overflow-x: hidden;
}
+
table.scroll tbody td,
table.scroll thead th {
- width: 10%;
- height: 20px;
- white-space: nowrap;
- line-height: 20px;
+ width: 10%;
+ height: 20px;
+ white-space: nowrap;
+ line-height: 20px;
}
-.enrich_type{
- text-transform: capitalize;
+
+.enrich_type {
+ text-transform: capitalize;
}
+
#list_enrich .panel-heading,
#form_enrich .panel-heading {
- border-bottom: 1px solid transparent;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
- padding: 4px 15px;
+ border-bottom: 1px solid transparent;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+ padding: 4px 15px;
}
+
#form_enrich {
- padding: 10px;
-}
-form#form_enrich {
- background-color: rgba(0, 0, 0, .05);
+ padding: 10px;
}
-/*
-#form_new,
-.video_back {
- padding-left: 12px;
- margin-bottom: 10px;
-}
-.video_back button {
- margin-bottom: 10px;
+form#form_enrich {
+ background-color: rgba(0 0 0 0.05);
}
-*/
\ No newline at end of file
diff --git a/pod/enrichment/static/css/videojs-slides.css b/pod/enrichment/static/css/videojs-slides.css
index 8185899249..3702ac9cd3 100644
--- a/pod/enrichment/static/css/videojs-slides.css
+++ b/pod/enrichment/static/css/videojs-slides.css
@@ -1,9 +1,16 @@
+/**
+ * Esup-Pod videojs-slides styles
+ */
+
/* Main */
-.vjs-poster {z-index: 2}
-.video-js .vjs-tech {padding: 0 10px 0 10px}
+.vjs-poster {
+ z-index: 2;
+}
+
.vjs-slides {
display: block;
}
+
.video-slides {
display: flex;
position: absolute;
@@ -12,11 +19,13 @@
bottom: 0;
padding: 0;
}
-.video-slides>li {
+
+.video-slides > li {
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
- /*background-attachment: fixed;*/
+
+ /* background-attachment: fixed; */
display: none;
position: absolute;
left: 50%;
@@ -24,16 +33,23 @@
bottom: 15%;
width: 50%;
padding: 0;
- border-right: 8px solid transparent;/*make margin for contain background-attachment*/
- /*padding-bottom: 35px;*//*Works but maybe not usable because plyer menu is hidden duriong playing */
+ border-right: 8px solid transparent;
+
+ /* Make margin for contain background-attachment */
+
+ /* padding-bottom: 35px; */
+
+ /* Works but maybe not usable because plyer menu is hidden duriong playing */
}
-.video-slides>li>div {
+
+.video-slides > li > div {
height: 100%;
- background-color: var(--bs-light); /*#fff;*/
+ background-color: var(--bs-light);
color: var(--pod-font-color);
padding: 1em;
}
-.video-slides>li>.slide_embed {
+
+.video-slides > li > .slide_embed {
overflow: auto;
background-color: #000;
text-align: center;
@@ -41,10 +57,12 @@
align-items: center;
justify-content: center;
}
-.video-slides>li>img {
+
+.video-slides > li > img {
max-width: 100%;
-webkit-user-select: none;
}
+
/* Normal screen size */
/********* Default *********/
@@ -53,28 +71,37 @@
height: 100%;
}
+.video-js .vjs-tech {
+ padding: 0 10px;
+}
+
/********* Pip slide -> pip-slide *********/
.vjs-tech.pip-slide {
width: 80% !important;
height: 100%;
}
+
.video-slides li.pip-slide {
left: 80% !important;
top: 35% !important;
bottom: 35% !important;
width: 20%;
}
-/*.pip-slide img {
+
+/*
+.pip-slide img {
height: 30% !important;
}
.pip-slide div {
height: 50% !important;
-}*/
+}
+*/
.video-slides li.pip-slide embed {
position: absolute;
right: 0;
width: 150%;
- /*height: 50%;*/
+
+ /* height: 50%; */
}
/********* Pip video -> big-slides *********/
@@ -82,6 +109,7 @@
width: 20% !important;
height: 100%;
}
+
.video-slides li.big-slide {
position: relative !important;
width: 80%;
@@ -89,21 +117,26 @@
top: 0 !important;
bottom: 0 !important;
}
+
.video-slides li.big-slide img {
height: 100%;
width: 100%;
- /*padding-right: 5%;*/
+
+ /* padding-right: 5%; */
}
+
.video-slides li.big-slide embed {
position: absolute;
height: 100%;
width: 90%;
left: 25px;
}
+
/********* Video off -> full-slide *********/
.vjs-tech.full-slide {
- display:none;
+ display: none;
}
+
.video-slides li.full-slide {
position: relative !important;
left: 0 !important;
@@ -112,10 +145,12 @@
padding: 0 !important;
width: 100%;
}
+
.video-slides li.full-slide img {
height: 100%;
width: 100%;
}
+
.video-slides li.full-slide embed {
position: absolute;
height: 100%;
@@ -125,20 +160,23 @@
/********* Slide off -> no-slide *********/
.vjs-tech.no-slide {
- width:100% !important;
- height:100%;
+ width: 100% !important;
+ height: 100%;
z-index: 1;
}
+
.video-slides li.no-slide {
- z-index:-1;
+ z-index: -1;
}
.vjs-text-track-display {
- z-index:1;
+ z-index: 1;
}
/* Fullscreen */
-/*.vjs-fullscreen .video-slides img,
+
+/*
+.vjs-fullscreen .video-slides img,
.vjs-fullscreen .video-slides embed {
width: 100%;
height: 100%;
@@ -166,18 +204,22 @@
height: 100%;
width: 90%;
left: 50px;
-}*/
+}
+*/
+
/* Slide bar */
.vjs-chapbar {
color: red;
top: -0.5rem;
height: 100%;
position: relative;
- background: rgba(100, 100, 100, 0.5);
+ background: rgba(100 100 100 0.5);
}
+
.vjs-chapbar-holder {
height: 100%;
}
+
.vjs-chapbar-chap {
height: 100%;
float: left;
@@ -188,19 +230,39 @@
background-color: #ffe800;
}
-.vjs-big-play-button {z-index: 2}
-.vjs-control-bar {z-index: 3}
+.vjs-big-play-button {
+ z-index: 2;
+}
+
+.vjs-control-bar {
+ z-index: 3;
+}
/* Enrich types colors */
-.enrich_image{color:var(--bs-purple)}
-.enrich_document{color:var(--bs-orange)}
-.enrich_richtext{color:var(--bs-blue)}
-.enrich_weblink{color:var(--bs-red)}
-.enrich_embed{color:var(--bs-green)}
+.enrich_image {
+ color: var(--bs-purple);
+}
+
+.enrich_document {
+ color: var(--bs-orange);
+}
+
+.enrich_richtext {
+ color: var(--bs-blue);
+}
+
+.enrich_weblink {
+ color: var(--bs-red);
+}
-li[class^="enrich_"]{
+.enrich_embed {
+ color: var(--bs-green);
+}
+
+li[class^="enrich_"] {
line-height: 1.2em;
}
-li[class^="enrich_"]::marker{
+
+li[class^="enrich_"]::marker {
font-size: 1.5em;
}
diff --git a/pod/import_video/static/css/import_video.css b/pod/import_video/static/css/import_video.css
index 68c7fed335..c5f25bd664 100644
--- a/pod/import_video/static/css/import_video.css
+++ b/pod/import_video/static/css/import_video.css
@@ -1,9 +1,12 @@
+/**
+ * Esup-Pod import_video styles
+ */
+
#recordings.table {
--bs-table-color: var(--pod-font-color);
--bs-table-striped-color: var(--pod-font-color);
}
-
/* Loading while uploading */
.recording-loader {
position: absolute;
@@ -19,6 +22,7 @@
padding: 10px;
display: none;
}
+
.recording-loading {
margin: auto;
border: 6px solid #f3f3f3;
@@ -30,10 +34,15 @@
}
@keyframes recording-spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
+ 0% {
+ transform: rotate(0deg);
+ }
+
+ 100% {
+ transform: rotate(360deg);
+ }
}
-/* */
+
/* Message error */
div.alert.alert-dismissible {
border-radius: 6px;
@@ -43,7 +52,7 @@ div.alert.alert-dismissible {
position: relative;
padding-right: 60px;
border: 1px solid #e6e6e6;
- background: #FFF;
+ background: #fff;
}
div.alert .icon {
@@ -68,37 +77,37 @@ div.alert .icon i {
}
div.alert.alert-success .icon,
-div.alert.alert-success .icon:after {
+div.alert.alert-success .icon::after {
border-color: none;
background: #00986a;
}
div.alert.alert-info .icon,
-div.alert.alert-info .icon:after {
+div.alert.alert-info .icon::after {
border-color: none;
background: #00b3c8;
}
div.alert.alert-warning .icon,
-div.alert.alert-warning .icon:after {
+div.alert.alert-warning .icon::after {
border: none;
background: #f9af2c;
}
div.alert.alert-error .icon,
-div.alert.alert-error .icon:after {
+div.alert.alert-error .icon::after {
border-color: none;
background: #c82630;
}
div.alert .proposition {
color: #000;
- font-weight: Bold;
+ font-weight: bold;
}
+
div.alert .proposition::before {
content: "\F137";
margin-right: 15px;
font-family: bootstrap-icons;
- vertical-align: -.125em;
+ vertical-align: -0.125em;
}
-/* */
diff --git a/pod/live/static/css/event.css b/pod/live/static/css/event.css
index 16bfe0589e..48b1888ec3 100644
--- a/pod/live/static/css/event.css
+++ b/pod/live/static/css/event.css
@@ -1,13 +1,20 @@
-.current_event{
+/**
+ * Esup-Pod live event styles
+ */
+
+.current_event {
stroke: red;
}
+
.video-js .vjs-time-control {
display: block;
}
+
.video-js .vjs-remaining-time {
display: none;
}
- .filter-event-img {
- max-height:32px;
- max-width:32px;
+
+.filter-event-img {
+ max-height: 32px;
+ max-width: 32px;
}
diff --git a/pod/live/static/css/event_list.css b/pod/live/static/css/event_list.css
index d8b38cec81..fad97a8f2c 100644
--- a/pod/live/static/css/event_list.css
+++ b/pod/live/static/css/event_list.css
@@ -1,3 +1,7 @@
+/**
+ * Esup-Pod live event list styles
+ */
+
.event-card-container {
min-width: 12rem;
min-height: 11rem;
diff --git a/pod/locale/fr/LC_MESSAGES/django.mo b/pod/locale/fr/LC_MESSAGES/django.mo
index f855d8b1e9..f49fba9142 100644
Binary files a/pod/locale/fr/LC_MESSAGES/django.mo and b/pod/locale/fr/LC_MESSAGES/django.mo differ
diff --git a/pod/locale/fr/LC_MESSAGES/django.po b/pod/locale/fr/LC_MESSAGES/django.po
index 171d6dc0ad..b6315d50f4 100644
--- a/pod/locale/fr/LC_MESSAGES/django.po
+++ b/pod/locale/fr/LC_MESSAGES/django.po
@@ -5,10 +5,10 @@ msgid ""
msgstr ""
"Project-Id-Version: Pod\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-09-28 09:06+0000\n"
+"POT-Creation-Date: 2023-10-16 13:36+0000\n"
"PO-Revision-Date: \n"
-"Last-Translator: obado \n"
-"Language-Team: Pod Team pod@esup-portail.org\n"
+"Last-Translator: Ptitloup \n"
+"Language-Team: Pod Team cotech-esup-pod@esup-portail.org\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -194,6 +194,7 @@ msgstr "Changer votre image de profil"
#: pod/podfile/templates/podfile/customfilewidget.html
#: pod/podfile/templates/podfile/home_content.html
#: pod/podfile/templates/podfile/userfolder.html
+#: pod/progressive_web_app/templates/notification_toast.html
#: pod/recorder/templates/recorder/claim_record.html
#: pod/video/templates/videos/category_modal.html
#: pod/video/templates/videos/video-iframe.html
@@ -1578,8 +1579,8 @@ msgid "No captions"
msgstr "Pas de sous-titres"
#: pod/completion/templates/video_caption_maker.html
-msgid "Add subtitle"
-msgstr "Ajouter un sous titre"
+msgid "Add a caption/subtitle"
+msgstr "Ajouter un(e) légende / sous-titre"
#: pod/completion/templates/video_caption_maker.html
msgid "Save Captions"
@@ -2127,8 +2128,8 @@ msgid ""
msgstr ""
"Les champs \"Début\" et \"Fin\" doivent contenir des valeurs en secondes. "
"Lancez la lecture de la vidéo, mettez sur pause et cliquez sur \"Récupérer "
-"le temps depuis le lecteur\" pour renseigner automatiquement le champ "
-"\"Début\". Vous pouvez le faire également pour remplir le champ \"Fin\"."
+"le temps depuis le lecteur\" pour renseigner automatiquement le champ \"Début"
+"\". Vous pouvez le faire également pour remplir le champ \"Fin\"."
#: pod/enrichment/templates/enrichment/edit_enrichment.html
msgid "You cannot overlap enrichments."
@@ -2633,8 +2634,8 @@ msgid ""
"This video was uploaded to Pod; its origin is %(type)s: %(url)s "
msgstr ""
-"Cette vidéo a été téléversée sur Pod ; son origine est %(type)s : %(url)s "
+"Cette vidéo a été téléversée sur Pod ; son origine est %(type)s : %(url)s "
#: pod/import_video/views.py pod/meeting/views.py
msgid "Try changing the record type or address for this recording."
@@ -2645,8 +2646,8 @@ msgstr ""
#: pod/import_video/views.py
#, python-format
msgid ""
-"This video '%(name)s' was uploaded to Pod; its origin is Youtube: %(url)s "
+"This video '%(name)s' was uploaded to Pod; its origin is Youtube: %(url)s "
msgstr ""
"Cette vidéo « %(name)s » a été téléversée sur Pod ; son origine est "
"Youtube : %(url)s "
@@ -5583,16 +5584,16 @@ msgid ""
msgstr ""
"\n"
" Bonjour,\n"
-"
%(owner)s vous invite à une réunion récurrente "
-"%(meeting_title)s .
\n"
+" %(owner)s vous invite à une réunion récurrente "
+"%(meeting_title)s .
\n"
" Date de début : %(start_date_time)s
\n"
" Récurrent jusqu’à la date : %(end_date)s
\n"
" La réunion se tiendra tou(te)s les %(frequency)s %(recurrence)s "
"p>\n"
"
Voici le lien pour rejoindre la réunion :\n"
" %(join_link)s
\n"
-" Vous avez besoin de ce mot de passe pour entrer : "
-"%(password)s
\n"
+" Vous avez besoin de ce mot de passe pour entrer : "
+"%(password)s
\n"
" Cordialement
\n"
" "
@@ -5618,8 +5619,8 @@ msgstr ""
" Date de fin : %(end_date)s
\n"
" Voici le lien pour rejoindre la réunion :\n"
" %(join_link)s
\n"
-" Vous avez besoin de ce mot de passe pour entrer : "
-"%(password)s
\n"
+" Vous avez besoin de ce mot de passe pour entrer : "
+"%(password)s
\n"
" Cordialement
\n"
" "
@@ -5784,6 +5785,12 @@ msgstr "Date de création"
msgid "Update date"
msgstr "Date de mise à jour"
+#: pod/playlist/models.py
+msgid "Password is required for a password-protected playlist."
+msgstr ""
+"Un mot de passe est nécessaire pour une liste de lecture protégée par un mot "
+"de passe."
+
#: pod/playlist/models.py
msgid "Addition date"
msgstr "Date d’ajout"
@@ -6104,10 +6111,19 @@ msgstr "Vous ne pouvez créer une liste de lecture nommé \"Favoris\""
msgid "The playlist has been deleted."
msgstr "La liste de lecture a été supprimée."
+#: pod/playlist/views.py
+msgid "Edit the playlist “%(pname)s”"
+msgstr "Modifier la liste de lecture « %(pname)s »"
+
#: pod/playlist/views.py
msgid "The playlist has been created and the video has been added in it."
msgstr "La liste de lecture a été créée et la vidéo a été ajoutée dedans."
+#: pod/playlist/views.py
+msgid "The data sent to create the playlist are invalid."
+msgstr ""
+"Les données envoyées pour créer la liste de lecture ne sont pas valides."
+
#: pod/playlist/views.py
msgid "JSON in wrong format"
msgstr "JSON au mauvais format"
@@ -6330,6 +6346,10 @@ msgstr "Vous ne pouvez pas éditer ce fichier."
msgid "Get application notifications"
msgstr "Recevez les notifications de l’application"
+#: pod/progressive_web_app/templates/notification_toast.html
+msgid "Close notification panel"
+msgstr "Fermer le panneau de notification"
+
#: pod/progressive_web_app/templates/notification_toast.html
msgid ""
"Get notified for specific events (when one of your video encoding is "
@@ -6626,8 +6646,8 @@ msgstr "Prévisualisation d’enregistrement"
#: pod/video/templates/videos/video-element.html
msgid ""
"To view this video please enable JavaScript, and consider upgrading to a web "
-"browser that supports HTML5 video "
+"browser that supports HTML5 video "
msgstr ""
"Pour visionner cette vidéo, veuillez activer JavaScript et envisager de "
"passer à un navigateur Web qui Bonjour, un nouvel enregistrement a été ajouté sur la plateforme "
"%(title_site)s à partir de l’enregistreur « %(recorder)s ». Pour "
-"l’ajouter, cliquez sur le lien ci-dessous.%(link_url)s Si le lien n’est pas actif, il "
-"faut le copier-coller dans la barre d’adresse de votre navigateur. "
-"p>
Cordialement.
"
+"l’ajouter, cliquez sur le lien ci-dessous."
+"%(link_url)s Si le lien n’est pas actif, il faut le copier-coller "
+"dans la barre d’adresse de votre navigateur.
Cordialement.
"
#: pod/recorder/views.py
msgid "New recording added."
@@ -7057,8 +7076,8 @@ msgid ""
"%(url)s \n"
msgstr ""
"vous pouvez changer la date de suppression en éditant votre vidéo :\n"
-"%(scheme)s:%(url)s
\n"
+""
+"%(scheme)s:%(url)s
\n"
"\n"
#: pod/video/management/commands/check_obsolete_videos.py
@@ -7820,8 +7839,8 @@ msgid ""
"This video is chaptered. Click the chapter button on the video player to view them."
msgstr ""
-"Cette vidéo est chapitrée. Cliquez sur le bouton de chapitre sur le lecteur vidéo pour les voir."
+"Cette vidéo est chapitrée. Cliquez sur le bouton de chapitre sur le lecteur vidéo pour les voir."
#: pod/video/templates/videos/video-all-info.html
msgid "Other versions"
diff --git a/pod/locale/fr/LC_MESSAGES/djangojs.mo b/pod/locale/fr/LC_MESSAGES/djangojs.mo
index 77efbe3cbb..fefa12e22e 100644
Binary files a/pod/locale/fr/LC_MESSAGES/djangojs.mo and b/pod/locale/fr/LC_MESSAGES/djangojs.mo differ
diff --git a/pod/locale/fr/LC_MESSAGES/djangojs.po b/pod/locale/fr/LC_MESSAGES/djangojs.po
index eda5115c9a..e613a4a746 100644
--- a/pod/locale/fr/LC_MESSAGES/djangojs.po
+++ b/pod/locale/fr/LC_MESSAGES/djangojs.po
@@ -5,9 +5,9 @@ msgid ""
msgstr ""
"Project-Id-Version: Esup-Pod\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-09-27 14:42+0000\n"
+"POT-Creation-Date: 2023-10-16 13:36+0000\n"
"PO-Revision-Date: \n"
-"Last-Translator: obado \n"
+"Last-Translator: AymericJak \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
@@ -96,8 +96,13 @@ msgid "Unrecognized caption file format."
msgstr "Format de fichier de traduction non reconnu."
#: pod/completion/static/js/caption_maker.js
-msgid "There is no captions to save."
-msgstr "Il n’y a aucun sous-titre à sauvegarder."
+msgid "There are errors in your captions/subtitles. Please review."
+msgstr ""
+"Il y a des erreurs dans vos légendes/sous-titres. Veuillez corriger svp."
+
+#: pod/completion/static/js/caption_maker.js
+msgid "There is no caption/subtitle to save."
+msgstr "Il n’y a aucun sous-titre/légende à sauvegarder."
#: pod/completion/static/js/caption_maker.js
msgid "Not a valid time track file."
@@ -170,6 +175,10 @@ msgstr "Veuillez entrer un texte pour le segment compris entre %s et %s :"
msgid "Pause to enter caption for segment from %s to %s."
msgstr "Mettez en pause pour entrer le texte du segment entre %s et %s."
+#: pod/completion/static/js/caption_maker.js
+msgid "A caption cannot has more than 80 characters."
+msgstr "Une légende / sous-titre ne peut comporter plus de 80 caractères."
+
#: pod/completion/static/js/caption_maker.js
#: pod/podfile/static/podfile/js/filewidget.js
msgid "Add"
@@ -181,7 +190,7 @@ msgid "Delete"
msgstr "Supprimer"
#: pod/completion/static/js/caption_maker.js
-msgid "Caption"
+msgid "Caption / Subtitle"
msgstr "Légende / Sous-titre"
#: pod/completion/static/js/caption_maker.js
@@ -196,18 +205,6 @@ msgstr "Fin"
msgid "Time stamps"
msgstr "Horodatages"
-#: pod/completion/static/js/caption_maker.js
-msgid "Error reading caption file. Code = "
-msgstr "Erreur durant la lecture du fichier de traduction, Code = "
-
-#: pod/completion/static/js/caption_maker.js
-msgid "Exception thrown reading caption file. Code = "
-msgstr "Une exception a été levée durant la lecture du fichier. Code = "
-
-#: pod/completion/static/js/caption_maker.js
-msgid "Your browser does not support FileReader."
-msgstr "Votre navigateur ne supporte pas FileReader."
-
#: pod/completion/static/js/caption_maker.js
msgid "Error loading caption file: "
msgstr "Erreur durant le chargement du fichier de sous-titres : "
@@ -512,11 +509,6 @@ msgstr "Sauvegarder"
msgid "Network response was not ok."
msgstr "La réponse du réseau n’était pas correcte."
-#: pod/podfile/static/podfile/js/filewidget.js
-#: pod/video/static/js/change_video_owner.js
-msgid "Loading…"
-msgstr "Chargement en cours…"
-
#: pod/podfile/static/podfile/js/filewidget.js
msgid "Change image"
msgstr "Changer d’image"
@@ -606,26 +598,18 @@ msgstr "Souscription aux notifications réussie."
msgid "Error while subscribing to push notifications."
msgstr "Une erreur est survenue lors de la souscription aux notifications."
-#: pod/video/static/js/ajax-display-channels.js
-msgid "%(count)s channel"
-msgid_plural "%(count)s channels"
-msgstr[0] "%(count)s chaîne"
-msgstr[1] "%(count)s chaînes"
-
#: pod/video/static/js/ajax-display-channels.js
msgid "No channels found"
msgstr "Aucun chaîne trouvée"
-#: pod/video/static/js/ajax-display-channels.js
-msgid "%(count)s video"
-msgid_plural "%(count)s videos"
-msgstr[0] "%(count)s vidéo"
-msgstr[1] "%(count)s vidéos"
-
#: pod/video/static/js/change_video_owner.js
msgid "No element found"
msgstr "Aucun élément trouvé"
+#: pod/video/static/js/change_video_owner.js
+msgid "Loading…"
+msgstr "Chargement en cours…"
+
#: pod/video/static/js/change_video_owner.js
msgid "An error occurred during the change of owner"
msgstr "Une erreur s’est produite lors du changement de propriétaire"
@@ -646,37 +630,14 @@ msgstr "Réponses"
msgid "Cancel"
msgstr "Annuler"
-#: pod/video/static/js/comment-script.js
-#, javascript-format
-msgid "%s vote "
-msgid_plural "%s votes "
-msgstr[0] "%s vote "
-msgstr[1] "%s votes "
-
#: pod/video/static/js/comment-script.js
msgid "Agree with the comment"
msgstr "D’accord avec ce commentaire"
-#: pod/video/static/js/comment-script.js
-msgid "Reply to comment"
-msgstr "Répondre au commentaire"
-
-#: pod/video/static/js/comment-script.js
-msgid "Reply"
-msgstr "Répondre"
-
#: pod/video/static/js/comment-script.js
msgid "Remove this comment"
msgstr "Supprimer ce commentaire"
-#: pod/video/static/js/comment-script.js
-msgid "Add a public comment"
-msgstr "Ajouter un commentaire public"
-
-#: pod/video/static/js/comment-script.js
-msgid "Send"
-msgstr "Envoyer"
-
#: pod/video/static/js/comment-script.js
msgid "Show answers"
msgstr "Afficher les réponses"
@@ -689,6 +650,13 @@ msgstr "Mauvaise réponse du serveur."
msgid "Sorry, you're not allowed to vote by now."
msgstr "Désolé, vous n’êtes pas autorisé à voter maintenant."
+#: pod/video/static/js/comment-script.js
+#, javascript-format
+msgid "%s vote "
+msgid_plural "%s votes "
+msgstr[0] "%s vote "
+msgstr[1] "%s votes "
+
#: pod/video/static/js/comment-script.js
msgid "Sorry, you can't comment this video by now."
msgstr "Désolé, vous ne pouvez pas commenter cette vidéo maintenant."
@@ -709,47 +677,38 @@ msgstr[0] "%s commentaire"
msgstr[1] "%s commentaires"
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "This content is password protected."
msgstr "Ce contenu est protégé par mot de passe."
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "This content is chaptered."
msgstr "Ce contenu est chapitré."
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "This content is in draft."
msgstr "Ce contenu est en brouillon."
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Video content."
msgstr "Contenu vidéo."
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Audio content."
msgstr "Contenu audio."
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Edit the video"
msgstr "Éditer la vidéo"
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Complete the video"
msgstr "Compléter la vidéo"
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Chapter the video"
msgstr "Chapitrer la vidéo"
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Delete the video"
msgstr "Supprimer la vidéo"
@@ -822,18 +781,6 @@ msgstr "Désolé, aucune vidéo trouvée"
msgid "Edit the category"
msgstr "Éditer la catégorie"
-#: pod/video/static/js/video_category.js
-msgid "Delete the category"
-msgstr "Supprimer la catégorie"
-
-#: pod/video/static/js/video_category.js
-msgid "Success!"
-msgstr "Succès !"
-
-#: pod/video/static/js/video_category.js
-msgid "Error…"
-msgstr "Erreur…"
-
#: pod/video/static/js/video_category.js
msgid "Category created successfully"
msgstr "Catégorie créée avec succès"
@@ -910,37 +857,8 @@ msgstr "Ajouts en favoris total depuis la création"
msgid "Slug"
msgstr "Titre court"
-#~ msgid "Error"
-#~ msgstr "Erreur"
-
-#~ msgid "video"
-#~ msgid_plural "videos"
-#~ msgstr[0] "vidéo"
-#~ msgstr[1] "vidéos"
-
-#~ msgid "Channels"
-#~ msgstr "Chaînes"
-
-#~ msgid "Channel"
-#~ msgstr "Chaîne"
-
-#~ msgid "videos"
-#~ msgstr "vidéos"
-
-#~ msgid "Are you sure you want to delete this element?"
-#~ msgstr "Êtes-vous sûr(e) de vouloir supprimer cet élément ?"
-
-#~ msgid "Refresh"
-#~ msgstr "Actualiser"
-
-#~ msgid "Video add to playlist"
-#~ msgstr "Ajouter une vidéo à une playlist"
-
-#~ msgid "Do you want to delete this playlist?"
-#~ msgstr "Êtes-vous sûr(e) de vouloir supprimer cette liste de lecture ?"
-
-#~ msgid "default"
-#~ msgstr "par défaut"
+#~ msgid "Add a caption/subtitle after this one"
+#~ msgstr "Ajouter un(e) légende/sous-titre ci-dessous"
-#~ msgid "Slide"
-#~ msgstr "Diapositive"
+#~ msgid "Delete this caption/subtitle"
+#~ msgstr "Supprimer ce(tte) légende/sous-titre"
diff --git a/pod/locale/nl/LC_MESSAGES/django.po b/pod/locale/nl/LC_MESSAGES/django.po
index e6de858326..e3b82299ed 100644
--- a/pod/locale/nl/LC_MESSAGES/django.po
+++ b/pod/locale/nl/LC_MESSAGES/django.po
@@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Pod\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-09-28 09:06+0000\n"
+"POT-Creation-Date: 2023-10-16 13:36+0000\n"
"PO-Revision-Date: 2023-06-08 14:37+0200\n"
"Last-Translator: obado \n"
"Language-Team: \n"
@@ -190,6 +190,7 @@ msgstr ""
#: pod/podfile/templates/podfile/customfilewidget.html
#: pod/podfile/templates/podfile/home_content.html
#: pod/podfile/templates/podfile/userfolder.html
+#: pod/progressive_web_app/templates/notification_toast.html
#: pod/recorder/templates/recorder/claim_record.html
#: pod/video/templates/videos/category_modal.html
#: pod/video/templates/videos/video-iframe.html
@@ -1509,7 +1510,7 @@ msgid "No captions"
msgstr ""
#: pod/completion/templates/video_caption_maker.html
-msgid "Add subtitle"
+msgid "Add a caption/subtitle"
msgstr ""
#: pod/completion/templates/video_caption_maker.html
@@ -2481,8 +2482,8 @@ msgstr ""
#: pod/import_video/views.py
#, python-format
msgid ""
-"This video '%(name)s' was uploaded to Pod; its origin is Youtube: %(url)s "
+"This video '%(name)s' was uploaded to Pod; its origin is Youtube: %(url)s "
msgstr ""
#: pod/import_video/views.py
@@ -5451,6 +5452,10 @@ msgstr ""
msgid "Update date"
msgstr ""
+#: pod/playlist/models.py
+msgid "Password is required for a password-protected playlist."
+msgstr ""
+
#: pod/playlist/models.py
msgid "Addition date"
msgstr ""
@@ -5764,10 +5769,19 @@ msgstr ""
msgid "The playlist has been deleted."
msgstr ""
+#: pod/playlist/views.py
+#, python-format
+msgid "Edit the playlist “%(pname)s”"
+msgstr ""
+
#: pod/playlist/views.py
msgid "The playlist has been created and the video has been added in it."
msgstr ""
+#: pod/playlist/views.py
+msgid "The data sent to create the playlist are invalid."
+msgstr ""
+
#: pod/playlist/views.py
msgid "JSON in wrong format"
msgstr ""
@@ -5986,6 +6000,10 @@ msgstr ""
msgid "Get application notifications"
msgstr ""
+#: pod/progressive_web_app/templates/notification_toast.html
+msgid "Close notification panel"
+msgstr ""
+
#: pod/progressive_web_app/templates/notification_toast.html
msgid ""
"Get notified for specific events (when one of your video encoding is "
@@ -6257,8 +6275,8 @@ msgstr ""
#: pod/video/templates/videos/video-element.html
msgid ""
"To view this video please enable JavaScript, and consider upgrading to a web "
-"browser that supports HTML5 video "
+"browser that supports HTML5 video "
msgstr ""
#: pod/recorder/templates/recorder/link_record.html
diff --git a/pod/locale/nl/LC_MESSAGES/djangojs.po b/pod/locale/nl/LC_MESSAGES/djangojs.po
index 7a125682d8..8f3c82fab4 100644
--- a/pod/locale/nl/LC_MESSAGES/djangojs.po
+++ b/pod/locale/nl/LC_MESSAGES/djangojs.po
@@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Esup-Pod\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-09-27 12:16+0000\n"
+"POT-Creation-Date: 2023-10-16 13:36+0000\n"
"PO-Revision-Date: 2023-02-08 15:22+0100\n"
"Last-Translator: obado \n"
"Language-Team: \n"
@@ -88,7 +88,11 @@ msgid "Unrecognized caption file format."
msgstr ""
#: pod/completion/static/js/caption_maker.js
-msgid "There is no captions to save."
+msgid "There are errors in your captions/subtitles. Please review."
+msgstr ""
+
+#: pod/completion/static/js/caption_maker.js
+msgid "There is no caption/subtitle to save."
msgstr ""
#: pod/completion/static/js/caption_maker.js
@@ -155,6 +159,10 @@ msgstr ""
msgid "Pause to enter caption for segment from %s to %s."
msgstr ""
+#: pod/completion/static/js/caption_maker.js
+msgid "A caption cannot has more than 80 characters."
+msgstr ""
+
#: pod/completion/static/js/caption_maker.js
#: pod/podfile/static/podfile/js/filewidget.js
msgid "Add"
@@ -166,7 +174,7 @@ msgid "Delete"
msgstr ""
#: pod/completion/static/js/caption_maker.js
-msgid "Caption"
+msgid "Caption / Subtitle"
msgstr ""
#: pod/completion/static/js/caption_maker.js
@@ -181,18 +189,6 @@ msgstr ""
msgid "Time stamps"
msgstr ""
-#: pod/completion/static/js/caption_maker.js
-msgid "Error reading caption file. Code = "
-msgstr ""
-
-#: pod/completion/static/js/caption_maker.js
-msgid "Exception thrown reading caption file. Code = "
-msgstr ""
-
-#: pod/completion/static/js/caption_maker.js
-msgid "Your browser does not support FileReader."
-msgstr ""
-
#: pod/completion/static/js/caption_maker.js
msgid "Error loading caption file: "
msgstr ""
@@ -487,11 +483,6 @@ msgstr ""
msgid "Network response was not ok."
msgstr ""
-#: pod/podfile/static/podfile/js/filewidget.js
-#: pod/video/static/js/change_video_owner.js
-msgid "Loading…"
-msgstr ""
-
#: pod/podfile/static/podfile/js/filewidget.js
msgid "Change image"
msgstr ""
@@ -576,26 +567,18 @@ msgstr ""
msgid "Error while subscribing to push notifications."
msgstr ""
-#: pod/video/static/js/ajax-display-channels.js
-msgid "%(count)s channel"
-msgid_plural "%(count)s channels"
-msgstr[0] ""
-msgstr[1] ""
-
#: pod/video/static/js/ajax-display-channels.js
msgid "No channels found"
msgstr ""
-#: pod/video/static/js/ajax-display-channels.js
-msgid "%(count)s video"
-msgid_plural "%(count)s videos"
-msgstr[0] ""
-msgstr[1] ""
-
#: pod/video/static/js/change_video_owner.js
msgid "No element found"
msgstr ""
+#: pod/video/static/js/change_video_owner.js
+msgid "Loading…"
+msgstr ""
+
#: pod/video/static/js/change_video_owner.js
msgid "An error occurred during the change of owner"
msgstr ""
@@ -616,37 +599,14 @@ msgstr ""
msgid "Cancel"
msgstr ""
-#: pod/video/static/js/comment-script.js
-#, javascript-format
-msgid "%s vote "
-msgid_plural "%s votes "
-msgstr[0] ""
-msgstr[1] ""
-
#: pod/video/static/js/comment-script.js
msgid "Agree with the comment"
msgstr ""
-#: pod/video/static/js/comment-script.js
-msgid "Reply to comment"
-msgstr ""
-
-#: pod/video/static/js/comment-script.js
-msgid "Reply"
-msgstr ""
-
#: pod/video/static/js/comment-script.js
msgid "Remove this comment"
msgstr ""
-#: pod/video/static/js/comment-script.js
-msgid "Add a public comment"
-msgstr ""
-
-#: pod/video/static/js/comment-script.js
-msgid "Send"
-msgstr ""
-
#: pod/video/static/js/comment-script.js
msgid "Show answers"
msgstr ""
@@ -659,6 +619,13 @@ msgstr ""
msgid "Sorry, you're not allowed to vote by now."
msgstr ""
+#: pod/video/static/js/comment-script.js
+#, javascript-format
+msgid "%s vote "
+msgid_plural "%s votes "
+msgstr[0] ""
+msgstr[1] ""
+
#: pod/video/static/js/comment-script.js
msgid "Sorry, you can't comment this video by now."
msgstr ""
@@ -679,47 +646,38 @@ msgstr[0] ""
msgstr[1] ""
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "This content is password protected."
msgstr ""
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "This content is chaptered."
msgstr ""
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "This content is in draft."
msgstr ""
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Video content."
msgstr ""
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Audio content."
msgstr ""
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Edit the video"
msgstr ""
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Complete the video"
msgstr ""
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Chapter the video"
msgstr ""
#: pod/video/static/js/regroup_videos_by_theme.js
-#: pod/video/static/js/video_category.js
msgid "Delete the video"
msgstr ""
@@ -791,18 +749,6 @@ msgstr ""
msgid "Edit the category"
msgstr ""
-#: pod/video/static/js/video_category.js
-msgid "Delete the category"
-msgstr ""
-
-#: pod/video/static/js/video_category.js
-msgid "Success!"
-msgstr ""
-
-#: pod/video/static/js/video_category.js
-msgid "Error…"
-msgstr ""
-
#: pod/video/static/js/video_category.js
msgid "Category created successfully"
msgstr ""
diff --git a/pod/main/configuration.json b/pod/main/configuration.json
index 4ba77c31c7..c5f646b417 100644
--- a/pod/main/configuration.json
+++ b/pod/main/configuration.json
@@ -859,33 +859,33 @@
]
},
"settings": {
- "RESTRICT_EDIT_IMPORT_VIDEO_ACCESS_TO_STAFF_ONLY": {
- "default_value": true,
+ "MAX_UPLOAD_SIZE_ON_IMPORT": {
+ "default_value": 4,
"description": {
"en": [
- "Only \"staff\" users will be able to import videos"
+ "Maximum size in Gb of video files that can be imported into the platform ",
+ "via the import_video application (0 = no maximum size)."
],
"fr": [
- "Seuls les utilisateurs \"staff\" pourront importer des vidéos"
+ "Taille maximum en Go des fichiers vidéos qui peuvent être importés sur la plateforme ",
+ "via l'application import_video (0 = pas de taille maximum)."
]
},
"pod_version_end": "",
- "pod_version_init": "3.3.0"
+ "pod_version_init": "3.4.0"
},
- "MAX_UPLOAD_SIZE_ON_IMPORT": {
- "default_value": 4,
+ "RESTRICT_EDIT_IMPORT_VIDEO_ACCESS_TO_STAFF_ONLY": {
+ "default_value": true,
"description": {
"en": [
- "Maximum size in Gb of video files that can be imported into the platform ",
- "via the import_video application (0 = no maximum size)."
+ "Only \"staff\" users will be able to import videos"
],
"fr": [
- "Taille maximum en Go des fichiers vidéos qui peuvent être importés sur la plateforme ",
- "via l'application import_video (0 = pas de taille maximum)."
+ "Seuls les utilisateurs \"staff\" pourront importer des vidéos"
]
},
"pod_version_end": "",
- "pod_version_init": "3.4.0"
+ "pod_version_init": "3.3.0"
},
"USE_IMPORT_VIDEO": {
"default_value": true,
@@ -1018,31 +1018,31 @@
"pod_version_end": "",
"pod_version_init": "3.1"
},
- "EVENT_GROUP_ADMIN": {
- "default_value": "event admin",
+ "EVENT_CHECK_MAX_ATTEMPT": {
+ "default_value": 10,
"description": {
"en": [
""
],
"fr": [
- "Permet de préciser le nom du groupe dans lequel les utilisateurs peuvent planifier un évènement sur plusieurs jours."
+ "Nombre de tentatives maximum pour vérifier la présence / taille d'un fichier sur le filesystem"
]
},
"pod_version_end": "",
- "pod_version_init": "3.1"
+ "pod_version_init": "3.4"
},
- "EVENT_CHECK_MAX_ATTEMPT": {
- "default_value": 10,
+ "EVENT_GROUP_ADMIN": {
+ "default_value": "event admin",
"description": {
"en": [
""
],
"fr": [
- "Nombre de tentatives maximum pour vérifier la présence / taille d'un fichier sur le filesystem"
+ "Permet de préciser le nom du groupe dans lequel les utilisateurs peuvent planifier un évènement sur plusieurs jours."
]
},
"pod_version_end": "",
- "pod_version_init": "3.4"
+ "pod_version_init": "3.1"
},
"HEARTBEAT_DELAY": {
"default_value": 45,
@@ -1602,31 +1602,31 @@
]
},
"settings": {
- "DEFAULT_PLAYLIST_THUMBNAIL": {
- "default_value": "/static/playlist/img/default-playlist.svg",
+ "COUNTDOWN_PLAYLIST_PLAYER": {
+ "default_value": 0,
"description": {
"en": [
- "Default image displayed as a poster or thumbnail, used to present the playlist.",
- "This image must be located in the `static` directory."
+ "Countdown used between each video when playing an autoplay playlist.",
+ "The coutdown is not present if it at 0."
],
"fr": [
- "Image par défaut affichée comme poster ou vignette, utilisée pour présenter la playlist.",
- "Cette image doit se situer dans le répertoire `static`."
+ "Compte à rebours utilisé entre chaque vidéo lors de la lecture d'une playlist en lecture automatique.",
+ "Le compte à rebours n'est pas présent s'il est à 0."
]
},
"pod_version_end": "",
"pod_version_init": "3.4"
},
- "COUNTDOWN_PLAYLIST_PLAYER": {
- "default_value": 0,
+ "DEFAULT_PLAYLIST_THUMBNAIL": {
+ "default_value": "/static/playlist/img/default-playlist.svg",
"description": {
"en": [
- "Countdown used between each video when playing an autoplay playlist.",
- "The coutdown is not present if it at 0."
+ "Default image displayed as a poster or thumbnail, used to present the playlist.",
+ "This image must be located in the `static` directory."
],
"fr": [
- "Compte à rebours utilisé entre chaque vidéo lors de la lecture d'une playlist en lecture automatique.",
- "Le compte à rebours n'est pas présent s'il est à 0."
+ "Image par défaut affichée comme poster ou vignette, utilisée pour présenter la playlist.",
+ "Cette image doit se situer dans le répertoire `static`."
]
},
"pod_version_end": "",
@@ -1730,6 +1730,19 @@
"progressive_web_app": {
"description": {},
"settings": {
+ "USE_NOTIFICATIONS": {
+ "default_value": true,
+ "description": {
+ "en": [
+ ""
+ ],
+ "fr": [
+ "Activation des notifications, attention, elles sont actives par défaut."
+ ]
+ },
+ "pod_version_end": "",
+ "pod_version_init": "3.5.0"
+ },
"WEBPUSH_SETTINGS": {
"default_value": "```python\n{\n 'VAPID_PUBLIC_KEY': '',\n 'VAPID_PRIVATE_KEY': '',\n 'VAPID_ADMIN_EMAIL': 'contact@esup-portail.org'\n}\n```",
"description": {
@@ -1741,7 +1754,7 @@
]
},
"pod_version_end": "",
- "pod_version_init": ""
+ "pod_version_init": "3.4.0"
}
},
"title": {
@@ -2037,6 +2050,21 @@
"pod_version_end": "",
"pod_version_init": "3.1.0"
},
+ "CACHE_VIDEO_DEFAULT_TIMEOUT": {
+ "default_value": 600,
+ "description": {
+ "en": [
+ "",
+ "Time in second to cache video data"
+ ],
+ "fr": [
+ "",
+ "Temps en seconde de conservation des données de l'application video"
+ ]
+ },
+ "pod_version_end": "",
+ "pod_version_init": "3.5.0"
+ },
"CHANNEL_FORM_FIELDS_HELP_TEXT": {
"default_value": "",
"description": {
@@ -2756,7 +2784,6 @@
"pod_version_end": "",
"pod_version_init": "3.1.0"
},
-
"VIDEO_REQUIRED_FIELDS": {
"default_value": "[]",
"description": {
@@ -2870,6 +2897,32 @@
"pod_version_end": "",
"pod_version_init": "3.1.0"
},
+ "ENCODE_STUDIO": {
+ "default_value": "start_encode_studio",
+ "description": {
+ "en": [
+ ""
+ ],
+ "fr": [
+ "Fonction appelée pour lancer l’encodage du studio (merge and cut)."
+ ]
+ },
+ "pod_version_end": "",
+ "pod_version_init": "3.1.0"
+ },
+ "ENCODE_VIDEO": {
+ "default_value": "start_encode",
+ "description": {
+ "en": [
+ ""
+ ],
+ "fr": [
+ "Fonction appelée pour lancer l’encodage des vidéos direct par thread ou distant par celery"
+ ]
+ },
+ "pod_version_end": "",
+ "pod_version_init": "3.1.0"
+ },
"ENCODING_CHOICES": {
"default_value": "()",
"description": {
@@ -2893,6 +2946,21 @@
"pod_version_end": "",
"pod_version_init": "3.1.0"
},
+ "ENCODING_TRANSCODING_CELERY_BROKER_URL": {
+ "default_value": false,
+ "description": {
+ "en": [
+ ""
+ ],
+ "fr": [
+ "",
+ "Il faut renseigner l'url du redis sur lequel Celery va chercher les ordres d'encodage et de transcription",
+ "par exemple : \"redis://redis:6379/7\""
+ ]
+ },
+ "pod_version_end": "",
+ "pod_version_init": "3.3.1"
+ },
"FORMAT_CHOICES": {
"default_value": "()",
"description": {
@@ -2916,31 +2984,19 @@
"pod_version_end": "",
"pod_version_init": "3.1.0"
},
- "ENCODE_STUDIO": {
- "default_value": "start_encode_studio",
- "description": {
- "en": [
- ""
- ],
- "fr": [
- "Fonction appelée pour lancer l’encodage du studio (merge and cut)."
- ]
- },
- "pod_version_end": "",
- "pod_version_init": "3.1.0"
- },
- "ENCODE_VIDEO": {
- "default_value": "start_encode",
+ "USE_DISTANT_ENCODING_TRANSCODING": {
+ "default_value": false,
"description": {
"en": [
""
],
"fr": [
- "Fonction appelée pour lancer l’encodage des vidéos direct par thread ou distant par celery"
+ "",
+ "Si True, active l'encodage et la transcription sur un environnement distant via redis+celery"
]
},
"pod_version_end": "",
- "pod_version_init": "3.1.0"
+ "pod_version_init": "3.4.0"
},
"VIDEO_RENDITIONS": {
"default_value": "[]",
@@ -2987,35 +3043,6 @@
},
"pod_version_end": "",
"pod_version_init": "3.1.0"
- },
- "ENCODING_TRANSCODING_CELERY_BROKER_URL": {
- "default_value": false,
- "description": {
- "en": [
- ""
- ],
- "fr": [
- "",
- "Il faut renseigner l'url du redis sur lequel Celery va chercher les ordres d'encodage et de transcription",
- "par exemple : \"redis://redis:6379/7\""
- ]
- },
- "pod_version_end": "",
- "pod_version_init": "3.3.1"
- },
- "USE_DISTANT_ENCODING_TRANSCODING": {
- "default_value": false,
- "description": {
- "en": [
- ""
- ],
- "fr": [
- "",
- "Si True, active l'encodage et la transcription sur un environnement distant via redis+celery"
- ]
- },
- "pod_version_end": "",
- "pod_version_init": "3.4.0"
}
},
"title": {
@@ -4363,31 +4390,31 @@
"pod_version_end": "",
"pod_version_init": "3.1.0"
},
- "HIDE_DISCIPLINES": {
+ "HIDE_CURSUS": {
"default_value": false,
"description": {
"en": [
""
],
"fr": [
- "Si True, permet de ne pas afficher les disciplines dans la colonne de droite"
+ "Si True, permet de ne pas afficher les cursus dans la colonne de droite"
]
},
"pod_version_end": "",
- "pod_version_init": "3.1.0"
+ "pod_version_init": "3.4.0"
},
- "HIDE_CURSUS": {
+ "HIDE_DISCIPLINES": {
"default_value": false,
"description": {
"en": [
""
],
"fr": [
- "Si True, permet de ne pas afficher les cursus dans la colonne de droite"
+ "Si True, permet de ne pas afficher les disciplines dans la colonne de droite"
]
},
"pod_version_end": "",
- "pod_version_init": "3.4.0"
+ "pod_version_init": "3.1.0"
},
"HIDE_LANGUAGE_SELECTOR": {
"default_value": false,
@@ -4766,7 +4793,7 @@
"default_value": 0.5,
"description": {
"en": [
- ""
+ "Maximum time in seconds of gaps between each word for cutting subtitles with the STT tool."
],
"fr": [
"Temps maximum en secondes des blancs entre chaque mot pour le decoupage des sous-titres avec l’outil STT."
@@ -4776,10 +4803,10 @@
"pod_version_init": "3.1.0"
},
"TRANSCRIPTION_STT_SENTENCE_MAX_LENGTH": {
- "default_value": 3,
+ "default_value": 2,
"description": {
"en": [
- ""
+ "Maximum time in seconds for a sentence when transcribing with the STT tool."
],
"fr": [
"Temps en secondes maximum pour une phrase lors de la transcription avec l’outil STT."
@@ -4850,7 +4877,7 @@
"fr": [
"",
"La plateforme Esup-Pod se base sur le framework Django écrit en Python.",
- "Elle supporte les versions 3.7, 3.8 et 3.9 de Python.",
+ "Elle est compatible avec les versions 3.8, 3.9 et 3.10 de Python.",
"",
"**Django Version : 3.2 LTS**",
"",
@@ -4958,6 +4985,35 @@
"pod_version_end": "",
"pod_version_init": "3.1"
},
+ "pwa": {
+ "default_value": "1.1.0",
+ "description": {
+ "en": "",
+ "fr": [
+ "Mise en place du mode PWA grâce à l'application Django-pwa",
+ "Voici la configuration par défaut pour Pod, vous pouvez surcharger chaque variable dans votre fichier de configuration.",
+ "PWA_APP_NAME = \"Pod\"",
+ "PWA_APP_DESCRIPTION = _(",
+ " \"Pod is aimed at users of our institutions, by allowing the publication of \"",
+ " \"videos in the fields of research (promotion of platforms, etc.), training \"",
+ " \"(tutorials, distance training, student reports, etc.), institutional life (video \"",
+ " \"of events), offering several days of content.\"",
+ ")",
+ "PWA_APP_THEME_COLOR = \"#0A0302\"",
+ "PWA_APP_BACKGROUND_COLOR = \"#ffffff\"",
+ "PWA_APP_DISPLAY = \"standalone\"",
+ "PWA_APP_SCOPE = \"/\"",
+ "PWA_APP_ORIENTATION = \"any\"",
+ "PWA_APP_START_URL = \"/\"",
+ "PWA_APP_STATUS_BAR_COLOR = \"default\"",
+ "PWA_APP_DIR = \"ltr\"",
+ "PWA_APP_LANG = \"fr-FR\"",
+ "Pour en savoir plus : [https://github.com/silviolleite/django-pwa]()"
+ ]
+ },
+ "pod_version_end": "",
+ "pod_version_init": "3.4"
+ },
"rest_framework": {
"default_value": "3.14.0",
"description": {
@@ -5013,4 +5069,4 @@
}
}
}
-]
+]
\ No newline at end of file
diff --git a/pod/main/context_processors.py b/pod/main/context_processors.py
index 80ab843538..e85ef10476 100644
--- a/pod/main/context_processors.py
+++ b/pod/main/context_processors.py
@@ -83,6 +83,7 @@
RESTRICT_EDIT_MEETING_ACCESS_TO_STAFF_ONLY = getattr(
django_settings, "RESTRICT_EDIT_MEETING_ACCESS_TO_STAFF_ONLY", False
)
+USE_NOTIFICATIONS = getattr(django_settings, "USE_NOTIFICATIONS", True)
def context_settings(request):
@@ -144,6 +145,7 @@ def context_settings(request):
new_settings[
"RESTRICT_EDIT_MEETING_ACCESS_TO_STAFF_ONLY"
] = RESTRICT_EDIT_MEETING_ACCESS_TO_STAFF_ONLY
+ new_settings["USE_NOTIFICATIONS"] = USE_NOTIFICATIONS
return new_settings
diff --git a/pod/main/management/commands/compareconfiguration.py b/pod/main/management/commands/compareconfiguration.py
new file mode 100644
index 0000000000..df9a1754fb
--- /dev/null
+++ b/pod/main/management/commands/compareconfiguration.py
@@ -0,0 +1,84 @@
+from django.core.management.base import BaseCommand, CommandError
+from typing import List
+import urllib.request
+import json
+import os
+
+__CONFIGURATION_POD_URL__ = "https://raw.githubusercontent.com/EsupPortail/Esup-Pod/__pod_version__/pod/main/configuration.json"
+
+
+class Command(BaseCommand):
+ help = "Compare configuration from specified version"
+
+ def add_arguments(self, parser):
+ parser.add_argument("pod_version", type=str)
+
+ def handle(self, *args, **options):
+ """Get confiuration from specific version passed in args and compare it to the local configuration."""
+ configuration_url = __CONFIGURATION_POD_URL__.replace(
+ "__pod_version__", options["pod_version"]
+ )
+ distant_configuration = []
+ try:
+ response = urllib.request.urlopen(configuration_url)
+ configuration_distant_data = json.loads(response.read().decode())
+ distant_configuration = self.get_all_settings(configuration_distant_data)
+ except urllib.error.HTTPError as err:
+ if err.code == 404:
+ raise CommandError(
+ "The configuration file for %s was not found" % options["pod_version"]
+ )
+ raise CommandError(f"A HTTPError was thrown: {err.code} {err.reason}")
+ local_configuration = []
+ with open(os.path.join("pod", "main", "configuration.json"), "r") as json_file:
+ configuration_local_data = json.load(json_file)
+ local_configuration = self.get_all_settings(configuration_local_data)
+ local_missing = self.get_local_missing(distant_configuration, local_configuration)
+ distant_missing = self.get_url_missing(distant_configuration, local_configuration)
+
+ self.print_log(
+ "New configuration from %s not in local" % options["pod_version"],
+ local_missing,
+ )
+ self.print_log(
+ "Configuration found in local file but missing in %s version of pod"
+ % options["pod_version"],
+ distant_missing,
+ )
+
+ self.stdout.write(self.style.SUCCESS("End compare configuration"))
+
+ def print_log(self, title: str, data: List[str]) -> None:
+ """Pretty print of array with title."""
+ print(20 * "-")
+ print(f"{title} :")
+ print("\n - " + "\n - ".join(data))
+
+ def get_local_missing(self, distant_configuration, local_configuration):
+ """Return key from distant configuration not found in local configuration."""
+ local_missing = []
+ for key in distant_configuration:
+ if key not in local_configuration:
+ local_missing.append(key)
+ return local_missing
+
+ def get_url_missing(self, distant_configuration, local_configuration):
+ """Return key from local configuration not found in distant configuration."""
+ url_missing = []
+ for key in local_configuration:
+ if key not in distant_configuration:
+ url_missing.append(key)
+ return url_missing
+
+ def get_all_settings(self, data):
+ """Get all settings from json configuration."""
+ json_settings = []
+ pod_settings = data[0]["configuration_pod"]["description"]
+ for keys in pod_settings.keys():
+ keys_settings = pod_settings[keys]["settings"]
+ json_settings += keys_settings.keys()
+ app_settings = data[0]["configuration_apps"]["description"]
+ for keys in app_settings.keys():
+ keys_settings = app_settings[keys]["settings"]
+ json_settings += keys_settings.keys()
+ return json_settings
diff --git a/pod/main/static/css/dark.css b/pod/main/static/css/dark.css
index a71ea0a7d5..63120ddd07 100644
--- a/pod/main/static/css/dark.css
+++ b/pod/main/static/css/dark.css
@@ -1,22 +1,6 @@
/** Dark mode for Esup Pod **/
-:root[data-theme="dark"] {
- --pod-primary: var(--pod-primary-dark);
- --pod-primary-lighten: var(--pod-primary-lighten-dark);
- --pod-primary-darken: var(--pod-primary-darken-dark);
- --pod-background: var(--pod-background-dark);
- --pod-font-color: var(--pod-font-color-dark);
- --pod-background-neutre1-bloc: var(--pod-background-neutre1-bloc-dark);
- --pod-background-neutre2-bloc: var(--pod-background-neutre2-bloc-dark);
- --pod-btn-text: var(--pod-btn-text-dark);
- --pod-alert: var(--pod-alert-dark);
- --pod-link-color: var(--pod-primary-lighten-dark);
- --pod-link-color-rgb: var(--pod-primary-lighten-dark-rgb);
- --pod-activelink-color: var(--pod-primary);
-}
-
[data-theme="dark"] {
-
/* CUSTOM COLORS */
--color-shark: #212529;
--bg-color: #303238;
@@ -26,15 +10,15 @@
--bs-dark: #202025;
--bs-light: var(--bs-dark);
--bs-gray-dark: var(--bs-dark);
- --bs-danger: #FE4C53;
-
+ --bs-danger: #fe4c53;
--color-formfields: #454c52;
--color-silver-chalice: #000;
--color-alto: var(--pod-background);
- --color-black: #FFF;
- --color-black-alpha: #FFFA;
+ --color-black: #fff;
+ --color-black-alpha: #fffa;
/* Video Comment variable */
+
/*
--primary-background-color: var(--pod-background) !important;
--third-background-color: var(--pod-background) !important;
@@ -42,6 +26,21 @@
*/
}
+:root[data-theme="dark"] {
+ --pod-primary: var(--pod-primary-dark);
+ --pod-primary-lighten: var(--pod-primary-lighten-dark);
+ --pod-primary-darken: var(--pod-primary-darken-dark);
+ --pod-background: var(--pod-background-dark);
+ --pod-font-color: var(--pod-font-color-dark);
+ --pod-background-neutre1-bloc: var(--pod-background-neutre1-bloc-dark);
+ --pod-background-neutre2-bloc: var(--pod-background-neutre2-bloc-dark);
+ --pod-btn-text: var(--pod-btn-text-dark);
+ --pod-alert: var(--pod-alert-dark);
+ --pod-link-color: var(--pod-primary-lighten-dark);
+ --pod-link-color-rgb: var(--pod-primary-lighten-dark-rgb);
+ --pod-activelink-color: var(--pod-primary);
+}
+
[data-theme="dark"] .table {
/* copied from .table-dark class */
--bs-table-color: #fff;
@@ -60,6 +59,7 @@
}
/***** Auto DARK MODE (use browser setting) *****/
+
/*
@media (prefers-color-scheme: dark) {
body[data-admin-utc-offset] {
@@ -68,23 +68,25 @@
--pod-font-color: #eeeeee;
--bg-color: #121212;
}
-}*/
+}
+*/
/* switch logoPod color on dark theme */
[data-theme="dark"] .pod-navbar__brand img {
- filter: invert(100%) saturate(2908%) hue-rotate(27deg) brightness(121%) contrast(99%);
+ filter: invert(100%) saturate(2908%) hue-rotate(27deg) brightness(121%)
+ contrast(99%);
}
[data-theme="dark"] .vjs-logo-button {
filter: brightness(0) invert(1);
}
-[data-theme="dark"] :not(.alert)>.btn-close {
+[data-theme="dark"] :not(.alert) > .btn-close {
filter: invert(100%);
}
[data-theme="dark"] .form-control::placeholder {
- color: #BEC1C6;
+ color: #bec1c6;
}
[data-theme="dark"] .text-muted {
@@ -96,23 +98,26 @@
background-color: var(--background-color);
color: var(--pod-font-color);
border-color: var(--pod-primary);
- box-shadow: 0 0 0 .2rem rgba(126, 126, 126, .25);
+ box-shadow: 0 0 0 0.2rem rgba(126 126 126 0.25);
}
-[data-theme="dark"] .category_modal_videos_list .infinite-item .checked_overlay {
- background-color: rgba(0, 0, 0, .8);
+[data-theme="dark"]
+ .category_modal_videos_list
+ .infinite-item
+ .checked_overlay {
+ background-color: rgba(0 0 0 0.8);
}
[data-theme="dark"] #card-takenote .header:hover {
- background-color: var(--pod-background)
+ background-color: var(--pod-background);
}
-[data-theme="dark"] .breadcrumb-item+.breadcrumb-item::before {
+[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
color: var(--bs-white);
}
[data-theme="dark"] .breadcrumb-item.active {
- color: #A8ABB3;
+ color: #a8abb3;
}
[data-theme="dark"] .nav-tabs .nav-item.show .nav-link,
@@ -128,10 +133,12 @@
border-color: var(--pod-background);
}
-/*[data-theme="dark"] .navbar-nav .nav-link:focus,
+/*
+[data-theme="dark"] .navbar-nav .nav-link:focus,
[data-theme="dark"] .navbar-nav .nav-link:hover {
color: var(--pod-activelink-color);
-}*/
+}
+*/
[data-theme="dark"] .btn-link.disabled,
[data-theme="dark"] .dropdown-item,
@@ -141,20 +148,22 @@
}
[data-theme="dark"] .btn-link.disabled {
- opacity: .7;
+ opacity: 0.7;
}
-/*[data-theme="dark"] .btn:hover,
+/*
+[data-theme="dark"] .btn:hover,
[data-theme="dark"] .btn:active,
[data-theme="dark"] .btn:focus {
color: inherit;
-}*/
+}
-/*[data-theme="dark"] .btn-link:focus,
+[data-theme="dark"] .btn-link:focus,
[data-theme="dark"] .btn-link:active,
[data-theme="dark"] .btn-link:hover {
color: var(--pod-activelink-color);
-}*/
+}
+*/
[data-theme="dark"] .btn-light {
background-color: var(--bs-dark);
@@ -172,27 +181,31 @@
[data-theme="dark"] .btn-secondary {
color: var(--bs-white);
}
+
[data-theme="dark"] .btn-outline-secondary {
- color: #A8AFB5;
+ color: #a8afb5;
}
[data-theme="dark"] .btn-outline-primary {
- --bs-btn-hover-bg: var(--pod-primary-darken-dark);
color: var(--pod-font-color);
+
+ --bs-btn-hover-bg: var(--pod-primary-darken-dark);
}
-[data-theme="dark"] .btn-outline-primary>svg {
+[data-theme="dark"] .btn-outline-primary > svg {
color: var(--pod-primary);
}
-[data-theme="dark"] .btn-outline-primary:hover>svg,
-[data-theme="dark"] .btn-outline-primary:focus>svg {
+[data-theme="dark"] .btn-outline-primary:hover > svg,
+[data-theme="dark"] .btn-outline-primary:focus > svg {
color: var(--bs-white);
}
[data-theme="dark"] .card {
- /*background-color: var(--bs-dark);
- border-color: var(--bs-dark);*/
+ /*
+ background-color: var(--bs-dark);
+ border-color: var(--bs-dark);
+ */
color: var(--pod-font-color);
}
@@ -245,8 +258,8 @@ body.dark {
/** Admin widgets styles **/
[data-theme="dark"] .selector .selector-filter,
-[data-theme="dark"] .selector .selector-available h2,
-[data-theme="dark"] .selector-chosen h2 {
+[data-theme="dark"] .selector-chosen h2,
+[data-theme="dark"] .selector .selector-available h2 {
color: var(--pod-font-color);
border-color: var(--background-color);
}
@@ -255,12 +268,11 @@ body.dark {
background-color: var(--pod-background);
}
-[data-theme="dark"] .selector .selector-available h2,
-[data-theme="dark"] .selector-chosen h2 {
+[data-theme="dark"] .selector-chosen h2,
+[data-theme="dark"] .selector .selector-available h2 {
background-color: var(--color-silver-chalice);
}
-
/* INPUT TEXT-AREA SELECT dark mode */
[data-theme="dark"] select,
[data-theme="dark"] input:not(.btn),
@@ -268,29 +280,49 @@ body.dark {
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-control[readonly],
[data-theme="dark"] .select2-container,
-[data-theme="dark"] .select2-container-multi .select2-choices .select2-search-field input,
+[data-theme="dark"]
+ .select2-container-multi
+ .select2-choices
+ .select2-search-field
+ input,
[data-theme="dark"] .select2-container-multi .select2-choices,
[data-theme="dark"] .select2-drop-active,
[data-theme="dark"] .select2-choice,
-[data-theme="dark"] .select2-choice .select2-search-choice-close+div,
+[data-theme="dark"] .select2-choice .select2-search-choice-close + div,
[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);
- /*box-shadow: none;*/
+
+ /* box-shadow: none; */
}
-[data-theme="dark"] .select2-selection--multiple .select2-selection__choice{
+
+[data-theme="dark"] .select2-selection--multiple .select2-selection__choice {
color: #000;
}
-[data-theme="dark"] .form-select{
+[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");
}
-/*.theme-switch-wrapper {
+/*
+.theme-switch-wrapper {
display: flex;
align-items: center;
}
@@ -298,7 +330,8 @@ body.dark {
.theme-switch-wrapper em {
margin-left: 10px;
font-size: 1rem;
-}*/
+}
+*/
.theme-switch {
display: inline-block;
@@ -314,16 +347,13 @@ body.dark {
.slider {
background-color: var(--pod-background-neutre1-bloc);
- bottom: 0;
cursor: pointer;
- left: 0;
- position: absolute;
- right: 0;
- top: 0;
- transition: .4s;
- border-radius: 24px;
display: flex;
justify-content: space-around;
+ inset: 0;
+ position: absolute;
+ transition: 0.4s;
+ border-radius: 24px;
}
.slider:focus,
@@ -331,26 +361,26 @@ body.dark {
box-shadow: 0 0 3px var(--pod-primary-lighten);
}
-.slider:before {
+.slider::before {
background-color: var(--bs-white);
bottom: 2px;
content: "";
height: 20px;
left: 2px;
position: absolute;
- transition: .4s;
+ transition: 0.4s;
width: 20px;
border-radius: 50%;
}
-input:checked+.slider {
+input:checked + .slider {
background-color: var(--pod-primary);
}
-input:checked+.slider:before {
+input:checked + .slider::before {
transform: translateX(26px);
}
[data-theme="dark"] input.pod-multi-range {
background-color: transparent;
-}
\ No newline at end of file
+}
diff --git a/pod/main/static/css/dyslexia.css b/pod/main/static/css/dyslexia.css
index b222251ae1..bf4d915787 100644
--- a/pod/main/static/css/dyslexia.css
+++ b/pod/main/static/css/dyslexia.css
@@ -3,10 +3,10 @@
/* OpenDyslexic Font via CDN */
@font-face {
font-family: "Open Dyslexic";
- src: url("https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/woff/OpenDyslexic-Regular.woff") format("woff");
+ src: url("https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/woff/OpenDyslexic-Regular.woff")
+ format("woff");
}
-
.dyslexia-switch-wrapper {
display: flex;
align-items: center;
diff --git a/pod/main/static/css/iframe.css b/pod/main/static/css/iframe.css
index 3212c09221..b1dd327487 100644
--- a/pod/main/static/css/iframe.css
+++ b/pod/main/static/css/iframe.css
@@ -8,5 +8,5 @@ body,
#livename,
.pod-navbar,
#event_add {
- display:none !important;
+ display: none !important;
}
diff --git a/pod/main/static/css/pod-admin.css b/pod/main/static/css/pod-admin.css
index 85336f8cd2..7578ce18d4 100644
--- a/pod/main/static/css/pod-admin.css
+++ b/pod/main/static/css/pod-admin.css
@@ -1,16 +1,23 @@
@media (prefers-color-scheme: dark) {
- .select2-container--default .select2-selection--multiple, .select2-dropdown,
- .select2-container--default .select2-selection--multiple .select2-selection__choice {
+ .select2-container--default .select2-selection--multiple,
+ .select2-dropdown,
+ .select2-container--default
+ .select2-selection--multiple
+ .select2-selection__choice {
background-color: #121212 !important;
}
- .select2-container--default.select2-container--focus .select2-selection--multiple {
+
+ .select2-container--default.select2-container--focus
+ .select2-selection--multiple {
border: solid white 1px !important;
}
+
.select2-search__field {
color: white !important;
}
+
:root {
- --pod-font-color : white;
+ --pod-font-color: white;
}
}
@@ -20,31 +27,24 @@
:root[data-theme="dark"] {
--primary: #264b5d;
--primary-fg: #eee;
-
--body-fg: #eee;
--body-bg: #121212;
--body-quiet-color: #e0e0e0;
--body-loud-color: #fff;
-
--breadcrumbs-link-fg: #e0e0e0;
--breadcrumbs-bg: var(--primary);
-
--link-fg: #81d4fa;
--link-hover-color: #4ac1f7;
--link-selected-fg: #6f94c6;
-
--hairline-color: #272727;
--border-color: #353535;
-
--error-fg: #e35f5f;
--message-success-bg: #006b1b;
--message-warning-bg: #583305;
--message-error-bg: #570808;
-
--darkened-bg: #212121;
--selected-bg: #1b1b1b;
--selected-row: #00363a;
-
--close-button-bg: #333;
--close-button-hover-bg: #666;
}
@@ -54,7 +54,8 @@
color: #000;
}
-.deletelink, .cancel-link {
+.deletelink,
+.cancel-link {
box-sizing: revert;
}
diff --git a/pod/main/static/css/pod.css b/pod/main/static/css/pod.css
index 479878d392..9b9f406faa 100755
--- a/pod/main/static/css/pod.css
+++ b/pod/main/static/css/pod.css
@@ -3,7 +3,7 @@
:root {
/* COMMON COLORS */
--color-black: #000;
- --color-black-alpha: rgba(0, 0, 0, .6);
+ --color-black-alpha: rgba(0 0 0 0.6);
--color-alto: #ddd;
--color-silver: #ccc;
--color-silver-chalice: #aaa;
@@ -11,19 +11,22 @@
/***
* exemple vert 'univ-lille.fr' 2022
***/
+
/*** Theme primary color ***/
- --pod-primary: #1F7C85;
+ --pod-primary: #1f7c85;
--pod-primary-rgb: 31, 124, 133;
/* a light variant of primary color, used for button hover */
--pod-primary-lighten: #08b0a0;
+
/* a dark variant of primary color, used for active links and disabled buttons */
- --pod-primary-darken: #18575D;
- /* les valeurs '...-dark' ci-dessous sont pour le mode sombre.*/
- --pod-primary-dark: #1F7C85;
+ --pod-primary-darken: #18575d;
+
+ /* les valeurs '...-dark' ci-dessous sont pour le mode sombre. */
+ --pod-primary-dark: #1f7c85;
--pod-primary-lighten-dark: #08b0a0;
--pod-primary-lighten-dark-rgb: 8, 176, 160;
- --pod-primary-darken-dark: #18575D;
+ --pod-primary-darken-dark: #18575d;
/***
* Esup-Pod default colors
@@ -57,12 +60,13 @@
/* couleur d'un élément actif (ex. : survol de bouton) */
--pod-primary-focus: var(--pod-primary-darken);
- /* Couleur d'alerte*/
- --pod-alert: #FC8670;
- --pod-alert-dark: #B11030;
+ /* Couleur d'alerte */
+ --pod-alert: #fc8670;
+ --pod-alert-dark: #b11030;
/**** font family ****/
- /* For better accessibility, avoid fonts where 1,i,L / O,0 are the same. */
+
+ /* For better accessibility, avoid fonts where [1, i, L] or [O, 0] are the same. */
--bs-body-font-family: "Verdana", sans-serif;
--bs-body-font-size: 11pt;
--pod-font-family-dyslexie: "Open Dyslexic";
@@ -77,13 +81,16 @@
--bs-link-color-rgb: var(--pod-link-color-rgb);
--bs-link-hover-color: var(--pod-activelink-color);
--bs-card-color: var(--pod-font-color);
+
/* better contrast on sidebar background */
- --bs-danger: #DC2028;
+ --bs-danger: #dc2028;
+
/* better contrasts */
- --bs-border-color: #8E969D;
+ --bs-border-color: #8e969d;
/* Use system font (faster load) */
- --font-family-sans-serif: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
+ --font-family-sans-serif: -apple-system, system-ui, "BlinkMacSystemFont",
+ "Segoe UI", "Roboto", "Verdana", sans-serif;
/** reinit before cleaning all old css vars ***/
--primary-background-color: var(--pod-background-neutre1-bloc) !important;
@@ -94,54 +101,28 @@
--bs-body-font-family: var(--pod-font-family-dyslexie);
}
-.pod-card--video a:not(.btn) {
- color: inherit;
-}
-
/* copy "alert-danger" style from Bootstrap 4 */
.alert-error {
- color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
+ color: #721c24;
}
-.navbar-light .navbar-nav .nav-link,
-.navbar-light .navbar-toggler {
- transition: background-color .3s ease-in-out, color .3s ease-in-out;
- color: var(--pod-font-color);
- box-shadow: .05rem .05rem .2rem .05rem rgba(0, 0, 0, .2);
- border-radius: .15rem;
- margin-top: 1rem;
+tr,
+.rowl {
+ display: table-row !important;
}
.table-hover tbody tr {
- transition: background-color .5s;
-}
-
-/*.table-hover tbody tr:hover {
- color: var(--pod-font-color);
- background-color: var(--pod-background);
-}*/
-
-.navbar-toggler:focus,
-.navbar-toggler:hover {
- transition: background-color .3s ease-in-out, color .3s ease-in-out;
- color: var(--bs-link-color);
- border-color: var(--bs-link-color);
+ transition: background-color 0.5s;
}
.navbar-light .navbar-brand:focus,
.navbar-light .navbar-brand:hover {
- transition: background-color .3s ease-in-out, color .3s ease-in-out;
- color: var(--color-black)
-}
-
-.btn-lang:focus,
-.btn-lang:hover,
-.btn-lang:active {
- box-shadow: 0 0 3px var(--pod-primary);
- --bs-btn-hover-color: var(--pod-font-color);
- --bs-btn-active-color: var(--pod-font-color);
+ transition:
+ background-color 0.3s ease-in-out,
+ color 0.3s ease-in-out;
+ color: var(--color-black);
}
.pod-nav-link-icon,
@@ -149,10 +130,6 @@
font-size: 120%;
}
-.modal-title svg {
- color: var(--pod-primary) !important;
-}
-
.bg-light {
background-color: var(--bs-light) !important;
}
@@ -165,7 +142,7 @@
font-size: 85%;
}
-.pod-meta-title+ul {
+.pod-meta-title + ul {
display: inline-block;
}
@@ -173,39 +150,48 @@
vertical-align: top;
}
+.title-chaine > a {
+ margin-left: 0.5em;
+ margin-right: 0.5em;
+}
+
+.pod-card--video a:not(.btn) {
+ color: inherit;
+}
+
+a:not(.btn):hover,
+a:not(.btn):focus {
+ color: var(--pod-activelink-color);
+ text-decoration: underline;
+}
+
.btn-link {
- /*font-weight: 400;*/
- /*color: var(--pod-link-color);*/
text-decoration: none;
}
+.btn-link:hover,
+.btn-link:focus,
+.nav-link:hover,
+.nav-link:focus {
+ text-decoration: underline;
+}
+
.btn-outline-primary {
color: var(--pod-primary);
border-color: var(--pod-primary);
}
-a.btn-outline-primary:not(:hover) svg {
- fill: var(--pod-primary)
-}
-
-
-#collapseAside .card>.btn {
+#collapseAside .card > .btn {
white-space: normal !important;
word-wrap: break-word;
word-break: normal;
- padding: .5rem;
+ padding: 0.5rem;
}
.submit-row a.deletelink {
height: 35px;
}
-tr,
-.rowl {
- display: table-row !important;
-}
-
-
.pod-mt-7 {
margin-top: 3.5rem;
}
@@ -219,18 +205,19 @@ tr,
margin-bottom: 1.5rem;
}
-:not(footer)>.pod-btn-social {
+:not(footer) > .pod-btn-social {
font-size: 2rem;
}
.btn.pod-btn-social {
color: var(--pod-font-color);
+
--bs-btn-hover-color: var(--pod-font-color);
--bs-btn-active-color: var(--pod-font-color);
}
.pod-btn-social i {
- transition: all .2s ease;
+ transition: all 0.2s ease;
}
.pod-btn-social:hover i,
@@ -241,15 +228,15 @@ tr,
.list-group-item {
background: var(--pod-background);
- padding: .25rem 1.25rem;
+ padding: 0.25rem 1.25rem;
}
/***
* video *
***/
#myTabContent #info p {
- margin-top: .5rem;
- margin-bottom: .5rem;
+ margin-top: 0.5rem;
+ margin-bottom: 0.5rem;
}
#share legend {
@@ -265,37 +252,31 @@ tr,
margin-right: auto;
}
-@media (max-width: 576px) {
-
- .link-center-pod,
- .file-image {
- display: block;
- overflow: hidden;
- max-height: auto;
- }
+.link-center-pod,
+.file-image {
+ display: block;
+ overflow: hidden;
+ max-height: auto;
}
@media (min-width: 576px) {
-
.link-center-pod,
.file-image {
- display: block;
- overflow: hidden;
max-height: 10rem;
}
}
-.link-center-pod>img {
+.link-center-pod > img {
min-width: 100%;
height: 100%;
}
-/***
+/*********
* navbar
- ***/
+ *********/
.btn-lang {
- padding: .2rem .25rem;
+ padding: 0.2rem 0.25rem;
width: 100%;
text-align: left;
}
@@ -305,16 +286,45 @@ tr,
color: var(--pod-font-color);
}
+.btn-lang:focus,
+.btn-lang:hover,
+.btn-lang:active {
+ box-shadow: 0 0 3px var(--pod-primary);
+
+ --bs-btn-hover-color: var(--pod-font-color);
+ --bs-btn-active-color: var(--pod-font-color);
+}
+
.navbar-inner-pod {
position: relative;
}
.navbar-toggler {
- padding: .5rem;
+ padding: 0.5rem;
line-height: inherit;
font-size: 1rem;
}
+.navbar-light .navbar-nav .nav-link,
+.navbar-light .navbar-toggler {
+ transition:
+ background-color 0.3s ease-in-out,
+ color 0.3s ease-in-out;
+ color: var(--pod-font-color);
+ box-shadow: 0.05rem 0.05rem 0.2rem 0.05rem rgba(0 0 0 0.2);
+ border-radius: 0.15rem;
+ margin-top: 1rem;
+}
+
+.navbar-toggler:focus,
+.navbar-toggler:hover {
+ transition:
+ background-color 0.3s ease-in-out,
+ color 0.3s ease-in-out;
+ color: var(--bs-link-color);
+ border-color: var(--bs-link-color);
+}
+
.userpicture {
height: 34px;
line-height: 2.5em; /* Align username if no image available */
@@ -322,9 +332,9 @@ tr,
/** modal **/
.modal-title svg {
+ /* color:var(--pod-primary); */
height: 40px;
width: 40px;
- /*color:var(--pod-primary);*/
}
.modal-content {
@@ -340,17 +350,18 @@ tr,
font-size: 3rem;
}
+/** end modal **/
+
+a.btn-outline-primary:not(:hover) svg {
+ fill: var(--pod-primary);
+}
+
.title-chaine {
- margin-right: .5rem;
+ margin-right: 0.5rem;
font-weight: 600;
flex-direction: row;
}
-.title-chaine>a {
- margin-left: .5em;
- margin-right: .5em;
-}
-
#listeChaines {
max-height: 30rem;
overflow: auto;
@@ -361,12 +372,10 @@ tr,
z-index: 900;
}
-/**end modal **/
-
/***
* tab
***/
-.tab-content>.active {
+.tab-content > .active {
border: 1px solid var(--color-alto);
padding: 1.5rem;
background: var(--pod-background);
@@ -378,7 +387,7 @@ tr,
border-top: 1px solid var(--color-alto) !important;
padding: 1.5rem;
background: var(--pod-background);
- margin-top: .75rem;
+ margin-top: 0.75rem;
}
.nav-tabs {
@@ -395,24 +404,21 @@ tr,
color: var(--color-black);
}
-/***aside ***/
-/*.open-aside {
- margin-right: 15px;
-}*/
+/*** aside ***/
#card-takenote .dropdown-menu {
border: none;
}
/* general search */
-#s+button {
+#s + button {
opacity: 0;
- transition: opacity .8s ease-in;
+ transition: opacity 0.8s ease-in;
}
-#s:focus+button,
-#s+button:focus,
-#s+button:hover {
+#s:focus + button,
+#s + button:focus,
+#s + button:hover {
opacity: 1;
}
@@ -421,11 +427,6 @@ tr,
.navbar-brand img {
height: 35px;
}
-
- /* .navbar-brand,
- .nav-item>.btn {
- font-size: .9rem;
- } */
}
@media (max-width: 992px) {
@@ -438,17 +439,6 @@ tr,
color: var(--bs-white);
}
- /*.navbar-items-pod {
- position: absolute;
- top: 60px;
- left: 0;
- padding: 1rem;
- width: 100%;
- background-color: var(--bs-light);
- box-shadow: 1px 1px 3px gray;
- z-index: 100;
- }*/
-
.navbar-nav .login .dropdown-menu {
position: absolute;
float: left;
@@ -463,7 +453,7 @@ tr,
#s {
border-radius: 0;
- transition: height .5s;
+ transition: height 0.5s;
}
.hide-search-input {
@@ -476,7 +466,7 @@ tr,
opacity: 0;
}
- #s.hide-search-input+button {
+ #s.hide-search-input + button {
height: 1px;
}
@@ -485,7 +475,7 @@ tr,
width: calc(100% - 4em);
opacity: 1;
display: inline-block;
- padding: .5rem 1rem;
+ padding: 0.5rem 1rem;
z-index: 99;
height: 3rem;
margin-top: 0;
@@ -499,38 +489,26 @@ tr,
.navbar label {
padding-left: 1px;
- /*display: inline-block;*/
- /*margin-top: .3em;*/
position: relative;
- left: .1em;
+ left: 0.1em;
cursor: pointer;
}
-
}
/*** end MQueries **/
-.login>.initials {
+.login > .initials {
font-weight: 600;
}
-/*.nav-link {
- padding: .25rem .5rem;
-}*/
-
-/*button.nav-link {
- background: none;
- border: none;
-}*/
-
.btn .userpicture {
border: 1px solid transparent;
}
.btn:hover .userpicture,
.btn:focus .userpicture {
- opacity: .8;
- border-color: #CCC;
+ opacity: 0.8;
+ border-color: #ccc;
}
/*** Videos list header ***/
@@ -540,23 +518,22 @@ tr,
/*** CARD ***/
.infinite-item .card-body {
- padding: .9rem;
+ padding: 0.9rem;
height: 3.5rem;
overflow: hidden;
}
.infinite-item .card-header .octicon {
- height: .9rem;
- margin: .1rem;
+ height: 0.9rem;
+ margin: 0.1rem;
+}
+
+.card-header {
+ background: none;
}
#videos_list .card-header {
- /*position: absolute;
- width: 100%;
- background: var(--color-black-alpha);
- padding: 0 .25rem;
- z-index: 9;*/
- padding: .4rem !important;
+ padding: 0.4rem !important;
}
.pod-card--video .video-title {
@@ -575,39 +552,22 @@ tr,
}
/* prevent default thumbnail to be too small on some screens */
-.video-card>.card-thumbnail {
+.video-card > .card-thumbnail {
min-height: 146px;
background-color: #000;
}
.video-card .d-flex {
- /*position:relative;*/
top: 0;
- gap: .5rem;
-}
-
-a:not(.btn):hover,
-a:not(.btn):focus {
- color: var(--pod-activelink-color);
- text-decoration: underline;
-}
-
-.btn-link:hover,
-.btn-link:focus,
-.nav-link:hover,
-.nav-link:focus {
- text-decoration: underline;
+ gap: 0.5rem;
}
div.card a img {
- transition: -webkit-transform .5s ease;
- transition: transform .5s ease;
- transition: transform .5s ease, -webkit-transform .5s ease;
+ transition: transform 0.5s ease;
background: #000;
}
-.card .link-center-pod:hover>img {
- -webkit-transform: scale(1.1);
+.card .link-center-pod:hover > img {
transform: scale(1.1);
z-index: 0;
}
@@ -626,12 +586,13 @@ div.card a img {
border: none;
color: white;
background: none;
- --bs-btn-hover-color: #FFF;
- --bs-btn-active-color: #FFF;
+
+ --bs-btn-hover-color: #fff;
+ --bs-btn-active-color: #fff;
}
.card-footer-pod a.btn i {
- transition: .2s all ease;
+ transition: 0.2s all ease;
display: inline-block;
}
@@ -640,46 +601,10 @@ div.card a img {
transform: rotate(10deg);
}
-/*.video-card .card-footer,
-.video-card .card-header {
- height: 1rem;
-}*/
-
-/** menu channels **/
-/*.dropdown-submenu>.dropdown-menu {
- top: 0;
- left: 100%;
- margin-top: -6px;
- margin-left: -1px;
- border-radius: 0 6px 6px 6px;
-}
-
-.dropdown-submenu:hover {
- background-color: var(--bs-white);
-}
-
-.dropdown-submenu:hover>.dropdown-menu {
- display: block;
-}
-
-.dropdown-submenu>a:after {
- display: block;
- content: " ";
- float: right;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
- border-width: 5px 0 5px 5px;
- border-left-color: var(--color-silver);
- margin-top: 5px;
- margin-right: -10px;
-}*/
-
/** aside list video **/
#collapseAside .card-body .card-title {
position: relative;
- padding-bottom: .8em;
+ padding-bottom: 0.8em;
}
#collapseAside .card-body .card-title::after {
@@ -702,12 +627,9 @@ div.card a img {
#filterTag div.collapse:not(.show) {
height: 148px !important;
overflow: hidden;
- display: -webkit-box;
display: flex;
flex-direction: column;
- display: -ms-flexbox;
-webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
}
#filterType div.collapsing,
@@ -717,18 +639,18 @@ div.card a img {
min-height: 148px !important;
}
-#filterType a.collapsed:after,
-#filterDiscipline a.collapsed:after,
-#filterCursus a.collapsed:after,
-#filterTag a.collapsed:after {
- content: '+';
+#filterType a.collapsed::after,
+#filterDiscipline a.collapsed::after,
+#filterCursus a.collapsed::after,
+#filterTag a.collapsed::after {
+ content: "+";
}
-#filterType a:not(.collapsed):after,
-#filterDiscipline a:not(.collapsed):after,
-#filterCursus a:not(.collapsed):after,
-#filterTag a:not(.collapsed):after {
- content: '-';
+#filterType a:not(.collapsed)::after,
+#filterDiscipline a:not(.collapsed)::after,
+#filterCursus a:not(.collapsed)::after,
+#filterTag a:not(.collapsed)::after {
+ content: "-";
}
/** ckeditor **/
@@ -758,8 +680,8 @@ div.card a img {
overflow-x: hidden;
}
-.errors>.form-control:focus {
- box-shadow: 0 0 0 .25rem rgba(var(--bs-danger-rgb), .25);
+.errors > .form-control:focus {
+ box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb) 0.25);
border-color: var(--bs-danger);
}
@@ -771,7 +693,6 @@ div.card a img {
.form-group-required .errors,
.form-group .errorlist {
- /*background-color: rgba(var(--bs-danger-rgb),.2);*/
color: var(--bs-danger);
}
@@ -793,71 +714,23 @@ div.card a img {
.flashing_field {
border-color: var(--pod-primary);
box-shadow: 0 0 4px var(--pod-primary);
- transition: box-shadow .5s, border-color .5s;
-}
-
-/** channel form **/
-
-#channel_form .selector,
-#enrichment_group_form .selector {
- width: 100%;
-}
-
-#channel_form .selector select,
-#enrichment_group_form .selector select {
- width: 100%;
-}
-
-#channel_form .selector-available,
-#channel_form .selector-chosen,
-#enrichment_group_form .selector-available,
-#enrichment_group_form .selector-chosen {
- width: 88%;
-}
-
-@media screen and (min-width:992px) {
-
- #channel_form .selector-available,
- #channel_form .selector-chosen,
- #enrichment_group_form .selector-available,
- #enrichment_group_form .selector-chosen {
- width: 47%;
- }
-}
-
-#channel_form .selector .selector-available input,
-#enrichment_group_form .selector .selector-available input {
- width: 90%;
-}
-
-#channel_form .selector .selector-filter label #enrichment_group_form .selector .selector-filter label {
- margin-top: 0;
-}
-
-#channel_form .selector-available h2,
-#channel_form .selector-chosen h2,
-#enrichment_group_form .selector-available h2,
-#enrichment_group_form .selector-chosen h2 {
- margin: 0;
- padding: 8px;
- font-weight: 400;
- font-size: 13px;
- text-align: left;
+ transition:
+ box-shadow 0.5s,
+ border-color 0.5s;
}
-/** vignettes video **/
+/** video thumbnails **/
@media (max-width: 575.98px) {
.pod-flex-direction {
flex-direction: column;
}
}
-/*@media screen and (min-width:768px) {
- .card-img-top {
- max-height: 184.13px;
- }
-}*/
-@media screen and (min-width:992px) {
+/*
+@media screen and (min-width:768px) { }
+*/
+
+@media screen and (min-width: 992px) {
.card-img-top {
max-height: 195.36px;
}
@@ -867,11 +740,11 @@ div.card a img {
}
}
-.footer_links>li:before {
+.footer_links > li::before {
margin-right: 2px;
content: "\F234";
font-family: bootstrap-icons;
- vertical-align: -.125em;
+ vertical-align: -0.125em;
}
#view-counter-icon {
@@ -888,7 +761,6 @@ div.card a img {
background-color: var(--pod-background-neutre1-bloc);
padding: 10px 0;
z-index: 2147483647;
- /*bottom: 100px;*/
display: none;
}
@@ -900,9 +772,6 @@ div.card a img {
height: 200px;
list-style-type: none;
padding-left: 0;
-}
-
-#viewers-ul {
overflow: hidden;
overflow-y: scroll;
}
@@ -920,97 +789,8 @@ div.card a img {
margin: 0 !important;
}
-/** Django 3 Admin pages
- * (must be set after Bootsrap to reset Django defaults)
- **/
-body[data-admin-utc-offset] {
- padding-top: 0;
- --primary: var(--pod-primary);
- --breadcrumbs-bg: var(--pod-primary);
- --button-bg: var(--pod-primary);
- background-color: var(--body-bg);
-}
-
-body[data-admin-utc-offset] textarea.cke_source {
- background-color: var(--pod-background);
-}
-
-body[data-admin-utc-offset] caption {
- caption-side: top;
-}
-
-body[data-admin-utc-offset] h1 {
- font-size: 20px;
-}
-
-body[data-admin-utc-offset] h2 {
- font-size: 18px;
-}
-
-body[data-admin-utc-offset] h3 {
- font-size: 16px;
-}
-
-body[data-admin-utc-offset] .hidden {
- display: none;
-}
-
-body[data-admin-utc-offset] .btn-outline-primary {
- color: var(--link-fg);
-}
-
-body[data-admin-utc-offset] .btn-outline-primary:hover,
-body[data-admin-utc-offset] .btn-outline-primary:focus {
- background-color: var(--pod-primary);
- color: var(--bs-light);
-}
-
-body[data-admin-utc-offset] .form-row.errors {
- display: block;
-}
-
-/* css corrections for select2 autocompletion Multiple in dark theme.
- * (see "additional owners", or "disciplines" for sample.)
- */
-body[data-admin-utc-offset] .select2-selection--multiple {
- background-color: var(--pod-background);
- border-color: var(--border-color);
-}
-
-body[data-admin-utc-offset] .select2-dropdown {
- background-color: var(--pod-background);
-}
-
-body[data-admin-utc-offset] .select2-container--open .select2-selection--multiple {
- border-color: var(--body-quiet-color);
-}
-
-body[data-admin-utc-offset] .select2-search--inline .select2-search__field {
- color: var(--pod-font-color);
-}
-
-body[data-admin-utc-offset] .select2-selection--multiple .select2-selection__choice,
-body[data-admin-utc-offset] .select2-selection--multiple .select2-results__option[aria-selected="true"] {
- color: #333;
-}
-
-
-.select2-container--focus,
-.cke_focus {
- box-shadow: 0 0 0 .25rem rgba(var(--pod-primary-rgb), .25);
- border-radius: 5px;
-}
-
-.select2-container--default.select2-container--focus .select2-selection--multiple.select2-selection {
- border: solid 1px var(--pod-primary);
-}
-
-/* end select2 multiple corrections */
-
-/* System/browser dark mode */
-
-
/*** CUSTOM CLASSES POD - bootstrap5 - 2022/04 ****/
+
/**** vers methodo BEM .element__souselement--variante ***/
body {
display: flex;
@@ -1022,20 +802,14 @@ body {
background-color: var(--pod-background);
}
-/***reinit bootstrap 5***/
+/*** reinit bootstrap 5 ***/
.nav {
--bs-nav-link-color: var(--pod-font-color);
}
-/*
-.nav-link:focus,
-.nav-link:hover {
- color: inherit;
-}*/
-
.accordion {
--bs-accordion-active-color: var(--pod-link-color);
- --bs-accordion-active-bg: rgba(var(--bs-primary-rgb), .1);
+ --bs-accordion-active-bg: rgba(var(--bs-primary-rgb) 0.1);
--bs-accordion-btn-focus-border-color: var(--pod-primary);
}
@@ -1045,15 +819,6 @@ body {
font-style: italic;
}
-/*.btn{
- --bs-btn-hover-color: #FFF;
-}
-
-.btn-link {
- --bs-btn-hover-color: var(--pod-activelink-color);
- --bs-btn-active-color: var(--pod-activelink-color);
-}*/
-
.btn-primary,
.btn-outline-primary {
--bs-btn-hover-color: var(--pod-btn-text);
@@ -1072,7 +837,7 @@ body {
/* dark navbars (see in "my files") */
.bg-primary {
- --bs-link-color: #F5F5F5;
+ --bs-link-color: #f5f5f5;
}
.bg-primary .nav-link {
@@ -1094,20 +859,16 @@ body {
background: var(--pod-primary-darken);
}
-
.btn-close {
color: var(--pod-font-color);
}
-.card-header {
- background: none;
-}
-
.pod-params-button {
color: var(--pod-font-color);
- --bs-btn-hover-color: var(--bs-link-color);
font-size: 1.4rem;
display: flex;
+
+ --bs-btn-hover-color: var(--bs-link-color);
}
.pod-params-button:focus,
@@ -1115,14 +876,14 @@ body {
text-decoration: none;
}
-.pod-params-button:focus>i::before,
-.pod-params-button:hover>i::before {
- transform: rotate(20deg);
+/* Make icon rotate and button remain still */
+.pod-params-button > i::before {
+ transition: transform ease-in-out 0.3s;
}
-/* Make icon rotate and button remain still */
-.pod-params-button>i::before {
- transition: transform ease-in-out .3s;
+.pod-params-button:focus > i::before,
+.pod-params-button:hover > i::before {
+ transform: rotate(20deg);
}
.pod-gotoup {
@@ -1135,7 +896,7 @@ body {
.pod-aside-collapse {
position: absolute;
- right: .5rem;
+ right: 0.5rem;
z-index: 6;
}
@@ -1147,7 +908,7 @@ body {
align-items: center;
justify-content: center;
font-size: 1.4rem;
- transition: all .5s ease-in;
+ transition: all 0.5s ease-in;
background: none;
border: 1px solid silver;
color: var(--pod-font-color);
@@ -1185,13 +946,16 @@ body {
.pod-footer__credits {
font-size: 85%;
- /*opacity: .8;*/
+
+ /*
+ opacity: .8;
+ */
}
.pod-footer__links {
display: flex;
justify-content: space-around;
- gap: .5rem;
+ gap: 0.5rem;
font-weight: 600;
flex-wrap: wrap;
}
@@ -1214,21 +978,22 @@ body {
.pod-card__title,
.pod-card__title label {
display: flex;
- gap: .5rem;
+ gap: 0.5rem;
align-items: center;
}
@media (min-width: 992px) {
-
.pod-card__title,
.pod-card__title label {
- flex-flow: wrap
+ flex-flow: wrap;
}
}
.pod-navbar {
background: var(--pod-background);
- box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
+ box-shadow:
+ 0 1px 3px rgba(0 0 0 0.12),
+ 0 1px 2px rgba(0 0 0 0.24);
}
.pod-info-video {
@@ -1253,11 +1018,11 @@ body {
.video-info_duration-view-share {
display: flex;
font-size: 90%;
- gap: .75rem;
+ gap: 0.75rem;
align-items: center;
justify-content: flex-start;
border-bottom: 1px solid var(--pod-background-neutre1-bloc);
- padding-bottom: .75rem;
+ padding-bottom: 0.75rem;
}
.pod-info-video__info {
@@ -1280,7 +1045,7 @@ body {
}
/* Additional class for modal element */
-/* -- */
+
/* Download modal */
.pod-download-title {
@@ -1288,9 +1053,8 @@ body {
padding: 1rem 0 0 1rem;
}
-
-.pod-download-title>.bi {
- padding-right: .5rem;
+.pod-download-title > .bi {
+ padding-right: 0.5rem;
}
/* ------ */
@@ -1303,26 +1067,9 @@ body {
margin-left: auto;
}
-/*.pod-btn {
- color: var(--pod-font-color);
- text-decoration: none;
-}
-
-.pod-btn:hover,
-.pod-btn:focus {
- color: var(--pod-primary);
- text-decoration: underline;
-}*/
-
-/*.pod-btn-share {
- border: 1px solid silver;
- transition: all .2s ease-in;
- color: var(--pod-font-color);
-}*/
-
.pod-btn-share i,
.pod-info-video__signal i {
- transition: all .2s ease-in;
+ transition: all 0.2s ease-in;
display: inline-block;
}
@@ -1350,9 +1097,9 @@ body {
.pod-navbar__brand {
display: flex;
align-items: center;
- gap: .5rem;
+ gap: 0.5rem;
color: var(--pod-font-color) !important;
- transition: transform .4s ease;
+ transition: transform 0.4s ease;
}
.pod-navbar__brand:hover,
@@ -1376,7 +1123,7 @@ body {
margin-bottom: 1.5rem;
}
-.pod-navbar__theme-switch__item>* {
+.pod-navbar__theme-switch__item > * {
display: flex;
align-items: center;
margin: 1rem 2rem;
@@ -1390,38 +1137,16 @@ body {
position: absolute;
}
-/*.pod-navbar-nav {
- margin-left: auto;
- justify-content: space-around;
-}
-
-.pod-navbar-nav .dropdown-menu {
- position: absolute;
-}*/
-
.pod-navbar__form {
margin-left: auto;
}
-@media(min-width:992px) {
+@media (min-width: 992px) {
.pod-navbar__form {
flex-basis: 350px;
}
}
-/*.pod-navbar__nav-item {
- margin-right: .25rem;
- margin-left: .25rem;
-}
-
-.pod-navbar .pod-navbar-nav .pod-navbar__nav-item__nav-link {
- text-decoration: none;
- display: flex;
- align-items: center;
- gap: .25rem;
- font-size: .8rem;
-}*/
-
/* small screens */
.pod-grid-content {
display: grid;
@@ -1430,7 +1155,7 @@ body {
}
/* medium screens */
-@media(min-width:992px) {
+@media (min-width: 992px) {
.pod-grid-content {
gap: 2rem;
grid-template-columns: minmax(0%, 100%) repeat(auto-fit, 33%);
@@ -1438,34 +1163,19 @@ body {
}
/* large screens */
-@media(min-width:1200px) {
+@media (min-width: 1200px) {
.pod-grid-content {
grid-template-columns: minmax(0%, 100%) repeat(auto-fit, 25%);
}
}
-/*.pod-navbar .pod-navbar-nav .pod-navbar__nav-item__nav-link:hover,
-.pod-navbar .pod-navbar-nav .pod-navbar__nav-item__nav-link:focus {
- text-decoration: underline;
-}*/
-
/**** static content homepage ***/
-/*.pod-content-static {}
-
-.pod-dropdown-item {
- display: flex;
- align-items: center;
- gap: .5rem;
-}
-
-.pod-dropdown-item:hover,
-.pod-dropdown-item:focus {
- text-decoration: underline;
-}*/
.pod-card--video {
border: none;
- box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(0, 0, 0, .23);
+ box-shadow:
+ 0 3px 6px rgba(0 0 0 0.16),
+ 0 3px 6px rgba(0 0 0 0.23);
background: var(--pod-background);
}
@@ -1485,10 +1195,10 @@ body {
width: 0;
overflow: hidden;
margin-left: 100%;
- transition: all .15s ease;
+ transition: all 0.15s ease;
z-index: 5;
padding-top: 5rem;
- box-shadow: .05rem .05rem .2rem .05rem rgba(0, 0, 0, .2);
+ box-shadow: 0.05rem 0.05rem 0.2rem 0.05rem rgba(0 0 0 0.2);
}
.pod-aside.show {
@@ -1496,17 +1206,17 @@ body {
width: auto;
}
-@media(min-width:992px) {
+@media (min-width: 992px) {
.pod-show-lg {
margin-left: 0;
width: auto;
}
}
-@media(max-width:992px) {
+@media (max-width: 992px) {
.pod-aside {
- width: 101% !important;
/* THIS IS NORMAL, it's to fit with pod-aside-collapse */
+ width: 101% !important;
min-height: 100%;
position: absolute;
}
@@ -1516,7 +1226,7 @@ body {
}
}
-@media(min-width:1450px) {
+@media (min-width: 1450px) {
.pod-mainContent {
padding-left: 5rem;
padding-right: 5rem;
@@ -1525,19 +1235,16 @@ body {
.pod-grid-content {
gap: 0;
}
-
}
.pod-aside.collapsing {
height: auto;
}
-
.pod-aside .card {
background: none;
border-radius: 0;
border: none;
- ;
}
.pod-navbar__button-toggler {
@@ -1546,7 +1253,7 @@ body {
font-size: 1.8rem;
margin: 0;
border: 0;
- margin-right: .3rem;
+ margin-right: 0.3rem;
background: none;
width: 2.5rem;
height: 2.5rem;
@@ -1573,52 +1280,33 @@ body {
min-width: 9rem;
}
-/* ---------------------------------------------------------------------*/
+/* --------------------------------------------------------------------- */
+
/* Minor corrections */
/* Buttons side by side under the title */
#event_add {
display: inline-block !important;
- padding-right: .5rem;
+ padding-right: 0.5rem;
}
-/*Fix table on "My meetings" */
+/* Fix table on "My meetings" */
-.table> :not(caption)>*>* {
- padding: .5rem .25rem;
+.table > :not(caption) > * > * {
+ padding: 0.5rem 0.25rem;
border-bottom-width: 0 !important;
}
-table :not(footer)>.pod-btn-social {
+table :not(footer) > .pod-btn-social {
font-size: 1.5rem;
width: 3rem !important;
height: 3rem !important;
}
-/*table .btn:hover {
- background-color: var(--pod-primary) !important;
- color: var(--pod-font-color);
-}*/
-
-th+td+td+td+td {
- /* border-right: .15rem solid var(--pod-link-color); */
+th + td + td + td + td {
text-align: center;
}
-/* .table, .navbar-light .navbar-nav .nav-link, .navbar-light .navbar-toggler {
- color: var(--pod-font-color);
-} */
-
-/*.table-hover > tbody > tr > * {
- --bs-table-accent-bg: var(--bs-table-hover-bg) !important;
- color: var(--pod-font-color) !important;
-}*/
-
-/*.table-hover > tbody > tr:hover > * {
- --bs-table-accent-bg: var(--bs-table-hover-bg) !important;
- color: var(--pod-font-color) !important;
-}*/
-
table .alert.alert-danger.btn.pod-btn-social {
background-color: var(--pod-alert) !important;
}
@@ -1628,6 +1316,13 @@ table .alert.alert-danger.btn.pod-btn-social {
background-size: cover !important;
}
+/* Custom subtitles block on Firefox & Chrome (Safari use it's own subtitle style) */
+.vjs-text-track-cue > div {
+ display: block;
+ padding: 0.3rem 0.5rem;
+ border-radius: 8px;
+}
+
.vjs-logo-button {
filter: invert(100%);
}
@@ -1643,24 +1338,23 @@ table .alert.alert-danger.btn.pod-btn-social {
font-size: 11px;
}
-
/* Upload page */
.form-group.hide-on-processing {
border: dotted var(--pod-link-color);
- margin-bottom: .5rem;
+ margin-bottom: 0.5rem;
border-radius: 1rem;
width: fit-content;
}
/** Esup-Pod callout messages **/
.pod-callout {
- padding: .7rem 1rem;
+ padding: 0.7rem 1rem;
margin-top: 1.25rem;
margin-bottom: 1.25rem;
border: 1px solid #eee;
- border-left-width: .33rem;
- border-radius: .25rem;
+ border-left-width: 0.33rem;
+ border-radius: 0.25rem;
}
.pod-callout-primary {
@@ -1711,7 +1405,7 @@ table .alert.alert-danger.btn.pod-btn-social {
margin: 6px;
border: 6px solid var(--pod-font-color);
border-radius: 50%;
- animation: lds-ring 1.2s cubic-bezier(.5, 0, .5, 1) infinite;
+ animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: var(--pod-font-color) transparent transparent transparent;
}
@@ -1749,55 +1443,197 @@ table .alert.alert-danger.btn.pod-btn-social {
div.disabled,
a.player-element.disabled {
- background-image: linear-gradient(45deg, rgba(0, 0, 0, .2) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .2) 50%, rgba(0, 0, 0, .2) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(
+ 45deg,
+ rgba(0 0 0 0.2) 25%,
+ transparent 25%,
+ transparent 50%,
+ rgba(0 0 0 0.2) 50%,
+ rgba(0 0 0 0.2) 75%,
+ transparent 75%,
+ transparent
+ );
background-size: 4px 4px;
background-repeat: repeat;
}
.progress {
- height: .6em;
+ height: 0.6em;
}
.progress .progress-bar {
width: 100%;
}
-/*.podfile-icon-selector::file-selector-button {
- margin-right: 20px;
- border: none;
- background: #084cdf;
- padding: 10px 20px;
- border-radius: 10px;
- color: #fff;
- cursor: pointer;
- transition: background .2s ease-in-out;
-}*/
-
.podfile-icon-selector {
- /*display: inline-block;*/
+ /* display: inline-block; */
width: 1.6em;
- padding: 1.7em 1em 0 1em;
- margin-top: .1em;
+ padding: 1.7em 1em 0;
+ margin-top: 0.1em;
height: 1.6em;
overflow: hidden;
box-sizing: border-box;
- background: url('/static/bootstrap-icons/icons/cloud-arrow-up.svg') center center no-repeat transparent;
+ background: url("/static/bootstrap-icons/icons/cloud-arrow-up.svg") center
+ center no-repeat transparent;
border-radius: 5px;
background-size: 1.6em 1.6em;
}
.navbar-expand-lg .navbar-nav .nav-link.podfile-icon-selector {
- padding: 1.7em 1em 0 1em;
+ padding: 1.7em 1em 0;
}
.bg-primary .podfile-icon-selector {
filter: invert(1);
}
+.podfile-icon-selector:hover {
+ opacity: 0.66;
+}
+
.bg-primary .podfile-icon-selector:focus-visible {
- box-shadow: 0 0 0 .25rem rgba(0, 0, 0, .5);
+ box-shadow: 0 0 0 0.25rem rgba(0 0 0 0.5);
}
-.podfile-icon-selector:hover {
- opacity: .66;
+/** Django 3 Admin pages
+ * (must be set after Bootsrap to reset Django defaults)
+ **/
+body[data-admin-utc-offset] {
+ background-color: var(--body-bg);
+ padding-top: 0;
+
+ --primary: var(--pod-primary);
+ --breadcrumbs-bg: var(--pod-primary);
+ --button-bg: var(--pod-primary);
+}
+
+body[data-admin-utc-offset] textarea.cke_source {
+ background-color: var(--pod-background);
+}
+
+body[data-admin-utc-offset] caption {
+ caption-side: top;
+}
+
+body[data-admin-utc-offset] h1 {
+ font-size: 20px;
+}
+
+body[data-admin-utc-offset] h2 {
+ font-size: 18px;
+}
+
+body[data-admin-utc-offset] h3 {
+ font-size: 16px;
+}
+
+body[data-admin-utc-offset] .hidden {
+ display: none;
+}
+
+body[data-admin-utc-offset] .btn-outline-primary {
+ color: var(--link-fg);
+}
+
+body[data-admin-utc-offset] .btn-outline-primary:hover,
+body[data-admin-utc-offset] .btn-outline-primary:focus {
+ background-color: var(--pod-primary);
+ color: var(--bs-light);
+}
+
+body[data-admin-utc-offset] .form-row.errors {
+ display: block;
+}
+
+/* css corrections for select2 autocompletion Multiple in dark theme.
+ * (see "additional owners", or "disciplines" for sample.)
+ */
+body[data-admin-utc-offset] .select2-selection--multiple {
+ background-color: var(--pod-background);
+ border-color: var(--border-color);
+}
+
+body[data-admin-utc-offset] .select2-dropdown {
+ background-color: var(--pod-background);
+}
+
+body[data-admin-utc-offset]
+ .select2-container--open
+ .select2-selection--multiple {
+ border-color: var(--body-quiet-color);
+}
+
+body[data-admin-utc-offset] .select2-search--inline .select2-search__field {
+ color: var(--pod-font-color);
+}
+
+body[data-admin-utc-offset]
+ .select2-selection--multiple
+ .select2-selection__choice,
+body[data-admin-utc-offset]
+ .select2-selection--multiple
+ .select2-results__option[aria-selected="true"] {
+ color: #333;
+}
+
+.select2-container--focus,
+.cke_focus {
+ box-shadow: 0 0 0 0.25rem rgba(var(--pod-primary-rgb) 0.25);
+ border-radius: 5px;
+}
+
+.select2-container--default.select2-container--focus
+ .select2-selection--multiple.select2-selection {
+ border: solid 1px var(--pod-primary);
+}
+
+/* end select2 multiple corrections */
+
+/** channel form **/
+
+#channel_form .selector,
+#enrichment_group_form .selector {
+ width: 100%;
+}
+
+#channel_form .selector select,
+#enrichment_group_form .selector select {
+ width: 100%;
+}
+
+#channel_form .selector-available,
+#channel_form .selector-chosen,
+#enrichment_group_form .selector-available,
+#enrichment_group_form .selector-chosen {
+ width: 88%;
+}
+
+@media screen and (min-width: 992px) {
+ #channel_form .selector-available,
+ #channel_form .selector-chosen,
+ #enrichment_group_form .selector-available,
+ #enrichment_group_form .selector-chosen {
+ width: 47%;
+ }
+}
+
+#channel_form .selector .selector-available input,
+#enrichment_group_form .selector .selector-available input {
+ width: 90%;
+}
+
+#channel_form .selector .selector-filter label,
+#enrichment_group_form .selector .selector-filter label {
+ margin-top: 0;
+}
+
+#channel_form .selector-available h2,
+#channel_form .selector-chosen h2,
+#enrichment_group_form .selector-available h2,
+#enrichment_group_form .selector-chosen h2 {
+ margin: 0;
+ padding: 8px;
+ font-weight: 400;
+ font-size: 13px;
+ text-align: left;
}
diff --git a/pod/main/templates/base.html b/pod/main/templates/base.html
index ba8912352f..fbbe9fc608 100644
--- a/pod/main/templates/base.html
+++ b/pod/main/templates/base.html
@@ -50,7 +50,9 @@
{% endif %}
{% progressive_web_app_meta %}
{% endspaceless %}
- {% webpush_header %}
+ {% if USE_NOTIFICATIONS %}
+ {% webpush_header %}
+ {% endif %}
@@ -129,10 +131,12 @@ {{page_title|capfirst}}
{% endblock page_aside %}
{% endif %}
-
+
- {% include "notification_toast.html" %}
-
+ {% if USE_NOTIFICATIONS %}
+ {% include "notification_toast.html" %}
+ {% endif %}
+
{% endblock content %}
{% if not request.GET.is_iframe %}