From 2dbd4874aa84e957671392ea1f0866f6aef4c38c Mon Sep 17 00:00:00 2001
From: Ptitloup iLI=`x
z4I-^C@x9ywxOIimKx6KMl!-<8RisxYy*crRgzu4-%Xan%-;$Pv@-1zfYGWa3Zd?*i
z5YTm!J122n?`fbV74O;#zv5Z)&XBeRXA(b2y%t!Jcu~U7Y&-d>Ux)M?l#RpSkJ8o_
z?oOoXnohZxga^jpw<2|jY#{Ljg>~hyja0GmIW%6@WI6i@Ke6d$X>b$an3#Z0T0}=p
z&KZ`6SbtJGkP=82Q@Q Bonjour,\n"
-" %(owner)s vous invite à une réunion récurrente "
-"%(meeting_title)s. %(owner)s vous invite à une réunion récurrente "
+"%(meeting_title)s. Date de début : %(start_date_time)s Récurrent jusqu’à la date : %(end_date)s 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 Vous avez besoin de ce mot de passe pour entrer : "
-"%(password)s Vous avez besoin de ce mot de passe pour entrer : "
+"%(password)s Cordialement Date de fin : %(end_date)s Voici le lien pour rejoindre la réunion :\n"
" %(join_link)s Vous avez besoin de ce mot de passe pour entrer : "
-"%(password)s Vous avez besoin de ce mot de passe pour entrer : "
+"%(password)s Cordialement Cordialement{{ options.legend|safe }}
advanced_options_btn.click();
}
});
+
+const myModals = document.getElementsByClassName('modal');
+for (let i = 0; i < myModals.length; i++) {
+ myModals[i].addEventListener('shown.bs.modal', () => {
+ // console.log("OPEN");
+ // looking for calendarlink
+ var calendarLinks = myModals[i].querySelectorAll('[id^="calendarlink"]');
+ for(let i = 0; i < calendarLinks.length; i++) {
+ // console.log(calendarLinks[i].getAttribute("id"));
+ var calendarlinkid = calendarLinks[i].getAttribute("id");
+ var targetNode = document.getElementById(calendarlinkid.replace('calendarlink','calendarbox'));
+ var observer = new MutationObserver(function(){
+ if(targetNode.style.display != 'none'){
+ targetNode.style.position = "fixed";
+ }
+ });
+ observer.observe(targetNode, { attributes: true, childList: true });
+ }
+ })
+}
+
{% endblock more_script %}
diff --git a/pod/meeting/templates/meeting/recurring_options_modal_form.html b/pod/meeting/templates/meeting/recurring_options_modal_form.html
index 3128e38e7c..4422bb14ab 100644
--- a/pod/meeting/templates/meeting/recurring_options_modal_form.html
+++ b/pod/meeting/templates/meeting/recurring_options_modal_form.html
@@ -61,7 +61,7 @@
let recurrence = document.getElementById("id_recurrence");
// recurrence.onchange = function() { console.log("Changed!" + recurrence.value);
recurrence.addEventListener('change', function(ev) {
- console.log("Changed!" + recurrence.value);
+ // console.log("Changed!" + recurrence.value);
change_weekdays_display()
})
From 96db51ba1983dc4a2434d5b13f0e3bab84f65dfe Mon Sep 17 00:00:00 2001
From: Ptitloup {{ options.legend|safe }}
advanced_options_btn.click();
}
});
-
+/**
+ * fixed calendar display in a modal
+ * change position from absolute to fixed
+*/
const myModals = document.getElementsByClassName('modal');
for (let i = 0; i < myModals.length; i++) {
myModals[i].addEventListener('shown.bs.modal', () => {
- // console.log("OPEN");
// looking for calendarlink
var calendarLinks = myModals[i].querySelectorAll('[id^="calendarlink"]');
for(let i = 0; i < calendarLinks.length; i++) {
diff --git a/pod/meeting/templates/meeting/recurring_options_modal_form.html b/pod/meeting/templates/meeting/recurring_options_modal_form.html
index 4422bb14ab..cf550113b2 100644
--- a/pod/meeting/templates/meeting/recurring_options_modal_form.html
+++ b/pod/meeting/templates/meeting/recurring_options_modal_form.html
@@ -78,4 +78,13 @@
}
}
change_weekdays_display()
+
+ get_start_date = function() {
+ var start_date = document.querySelector('#id_start');
+ //start_date.value
+ var current_lang = document.querySelector("#pod-lang-select").textContent;
+ var options = { year: "numeric", month: "2-digit", day: "2-digit" };
+ var formatter = new Intl.DateTimeFormat(current_lang, options).formatToParts();
+ return formatter
+ }
From 89cf3e0e0f174b879d758880492d6daae1be52ce Mon Sep 17 00:00:00 2001
From: Ptitloup {{ options.legend|safe }}
/* Add event listener to use advanced options button with keyboard */
var advanced_options_btn = document.getElementById('advanced_options_btn');
-advanced_options_btn.addEventListener("keydown", function(event) {
- if (event.key === "Enter" || event.key === " ") {
- advanced_options_btn.click();
- }
-});
+if (advanced_options_btn) {
+ advanced_options_btn.addEventListener("keydown", function(event) {
+ if (event.key === "Enter" || event.key === " ") {
+ advanced_options_btn.click();
+ }
+ });
+}
+
/**
* fixed calendar display in a modal
* change position from absolute to fixed
@@ -218,6 +221,58 @@ {{ options.legend|safe }}
}
})
}
+var day_of_start_date = -1;
+let id_start = document.querySelector("#id_start");
+let start_date_formats = {{start_date_formats|safe}};
+if(id_start) {
+ function setDayOfWeekForStartDate() {
+ let id_start_value = id_start.value;
+ for(let i = 0; i < start_date_formats.length; i++) {
+ let index_day = start_date_formats[i].indexOf('%d');
+ let index_month = start_date_formats[i].indexOf('%m');
+ let index_little_year = start_date_formats[i].indexOf('%y');
+ let index_year = start_date_formats[i].indexOf('%Y');
+ let regex_date_format = "^" + start_date_formats[i].replace('%d', '\\d{2}').replace('%m', '\\d{2}').replace('%y', '\\d{2}').replace('%Y', '\\d{4}') + "$";
+ regex_date_format = regex_date_format.replace("-", "[-]").replace(".", "[.]").replace("/", "[/]");
+ let match = id_start_value.match(new RegExp(regex_date_format, "g"));
+ if(match) {
+ let day = id_start_value.substring(index_day, index_day+2);
+ let monthIndex = parseInt(id_start_value.substring(index_month, index_month+2))-1;
+ let year = 0;
+ if(index_year == -1) {
+ year = id_start_value.substring(index_little_year, index_little_year+2);
+ } else {
+ year = id_start_value.substring(index_year, index_year+4);
+ }
+ let corresponding_day = [6,0,1,2,3,4,5];
+ day_of_start_date = corresponding_day[new Date(year, monthIndex, day).getDay()];
+ return
+ }
+ }
+ }
+ setDayOfWeekForStartDate();
+}
+
+var modal_recurring_fields = document.getElementById('recurring_fields');
+if(modal_recurring_fields) {
+ modal_recurring_fields.addEventListener('shown.bs.modal', () => {
+ setDayOfWeekForStartDate();
+ change_weekdays_display();
+ });
+ modal_recurring_fields.addEventListener('hidden.bs.modal', function (e) {
+ setDayOfWeekForStartDate();
+ var select_days = document.querySelectorAll('input[name="days_of_week"]:checked');
+ let select_days_values = [];
+ for(let i = 0; i < select_days.length; i++) {
+ select_days_values.push(select_days[i].value);
+ }
+ if(recurrence.value == "weekly" && !select_days_values.includes(""+day_of_start_date)) {
+ alert("{% trans "In case of weekly recurring, the day of the start date have to be checked" %}");
+ let see_recurring_fields_btn = document.getElementById('see_recurring_fields');
+ if (see_recurring_fields_btn) see_recurring_fields_btn.click();
+ }
+ })
+}
{% endblock more_script %}
diff --git a/pod/meeting/templates/meeting/recurring_options_modal_form.html b/pod/meeting/templates/meeting/recurring_options_modal_form.html
index cf550113b2..86cb945ed4 100644
--- a/pod/meeting/templates/meeting/recurring_options_modal_form.html
+++ b/pod/meeting/templates/meeting/recurring_options_modal_form.html
@@ -68,23 +68,24 @@
change_weekdays_display = function() {
if (recurrence.value == "weekly") {
document.getElementById("weekdays_recurring").style.display = 'block';
+ if(day_of_start_date != -1) {
+ let day = document.getElementById("id_days_of_week_" + day_of_start_date);
+ if(day) day.checked = true;
+ }
} else {
document.getElementById("weekdays_recurring").style.display = 'none';
}
if (recurrence.value == "monthly") {
document.getElementById("monthly_recurring").style.display = 'block';
+ /* In case of monthly recurring, we unchecked all days */
+ for(let i = 0; i < 7; i++) {
+ let day = document.getElementById("id_days_of_week_" + i);
+ if(day) day.checked = false;
+ }
} else {
document.getElementById("monthly_recurring").style.display = 'none';
}
}
- change_weekdays_display()
+document.addEventListener("load", change_weekdays_display);
- get_start_date = function() {
- var start_date = document.querySelector('#id_start');
- //start_date.value
- var current_lang = document.querySelector("#pod-lang-select").textContent;
- var options = { year: "numeric", month: "2-digit", day: "2-digit" };
- var formatter = new Intl.DateTimeFormat(current_lang, options).formatToParts();
- return formatter
- }
diff --git a/pod/meeting/views.py b/pod/meeting/views.py
index b8e84a40bd..964b749263 100644
--- a/pod/meeting/views.py
+++ b/pod/meeting/views.py
@@ -184,10 +184,11 @@ def add_or_edit(request, meeting_id=None):
if meeting
else _("Add a new meeting")
)
+ start_date_formats = '["%s"]' % '","'.join(form.fields["start"].input_formats)
return render(
request,
"meeting/add_or_edit.html",
- {"form": form, "page_title": mark_safe(page_title)},
+ {"form": form, "start_date_formats": start_date_formats, "page_title": mark_safe(page_title)},
)
From 1afbc4eea1348470c6355c13962337bcece6ba8a Mon Sep 17 00:00:00 2001
From: Ptitloup 0hOQmj@cvaQ1yGFPR9_`11v!8
z_GPH0JZ-&phxykFHkb-{Yr57oi*sC@U(
z7hfG?{xvlpNKnt>9ygmK73L
3(
zHdKcX+VqR4y>Sc6VC(?zad(~S1auyM!2q0zI*!{>J^c$+z!PY8b2)5Id?vQQPZ$Lo
zrL{AJdckzVKy*
TF?u{xw4C&$*v?gJ9JD@Zv;*#Pn{BkW7~
z3im6*Yq)jk*O|4s&rtVt?&g&CqphNpxk>tCTu*!s=|8U1w*3p%fwrz(*qFRIxqpx1
zeG~IBL8Tdfl*FUl&&asPRye^HE
Pour "
-"l’ajouter, cliquez sur le lien ci dessous.
Si le lien n’est pas actif, il "
-"faut le copier-coller dans la barre d’adresse de votre navigateur."
-"i>
Cordialement
" #: pod/recorder/views.py msgid "New recording added." @@ -6911,8 +6916,8 @@ msgid "" "%(url)s\n" msgstr "" "vous pouvez changer la date de suppression en éditant votre vidéo :\n" -"\n" +"\n" "\n" #: pod/video/management/commands/check_obsolete_videos.py @@ -7665,8 +7670,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 5c3ce79261df81c8eb6f305597a4ce98e900c841..e64905e29b3ce9676e6b30e979aa3c1fc7692f2d 100644 GIT binary patch delta 4117 zcmYk;c~F&A7{~Dk5YPZYO}J{wMPm`s1QQor&;rrICCt*?jZ#U=H3{vixMY@TNSRBR zTZ(I5ORdTDk1(fccbT!7taPko%+#r7YSO;H_nu}v<8wdfeeZkU_nhZE=ar2s!mcd~ z3w+