');
+ }
+ for (let i = 1; i <= nbOfPeriode; i++) {
+ loadCourse(i,levelToAdd);
+ }
+ },
+ error: function () {
+ showNotification('error','Impossible d\'ajouter une nouvelle entête de niveau ...','top', 'center')
+ }
+ })
+ setTimeout(function () {
+ initAutoComplete("AutoCompleteUser");
+ initAutoCompleteOCOM('AutoCompleteOCOM');
+ },1000)
+}
+
function loadEventType(date)
{
var selectInput = $('#type');
@@ -88,6 +140,8 @@ function loadEventType(date)
success: function (data) {
var result = JSON.parse(data);
editorTemplate = result;
+ nbOfLevel = editorTemplate.schedule_model.niveaux.length;
+ nbOfPeriode = editorTemplate.schedule_model.periodes.length;
initScheduleEditor("scheduleEditor",id)
$.each(result, function (i, val) {
if(i == "is_mandatory" || i == "use_schedule" || i == "use_weekly_msg")
@@ -212,16 +266,16 @@ function selectCourseMode(mode, niveau, periode)
function selectCourseModePeriode(mode,periode)
{
- $.each(editorTemplate['schedule_model']['niveaux'], function (i, val) {
+ for (let i = 0; i < nbOfLevel; i++) {
selectCourseMode(mode,i+1,periode);
- });
+ }
}
function selectCourseModeNiveau(mode,niveau)
{
- $.each(editorTemplate['schedule_model']['periodes'], function (i, val) {
+ for (let i = 0; i < nbOfPeriode; i++) {
selectCourseMode(mode,niveau,i+1);
- });
+ }
}
function updatePlantext(toggle,id)
diff --git a/resources/views/admin/schedule/editor/course.blade.php b/resources/views/admin/schedule/editor/course.blade.php
index 17a7b53c..4e7c8361 100644
--- a/resources/views/admin/schedule/editor/course.blade.php
+++ b/resources/views/admin/schedule/editor/course.blade.php
@@ -25,18 +25,18 @@
-
+
-
+
-
+
done
@@ -45,7 +45,7 @@
-
+
clear
@@ -53,7 +53,7 @@
-
+
done
@@ -62,7 +62,7 @@
-
+
done
@@ -71,7 +71,4 @@
-
- Test
-
\ No newline at end of file
diff --git a/resources/views/admin/schedule/editor/level.blade.php b/resources/views/admin/schedule/editor/level.blade.php
new file mode 100644
index 00000000..d4290ba9
--- /dev/null
+++ b/resources/views/admin/schedule/editor/level.blade.php
@@ -0,0 +1,3 @@
+
+ @loaderDot
+
\ No newline at end of file
diff --git a/resources/views/admin/schedule/editor/levelHeader.blade.php b/resources/views/admin/schedule/editor/levelHeader.blade.php
new file mode 100644
index 00000000..0502fe08
--- /dev/null
+++ b/resources/views/admin/schedule/editor/levelHeader.blade.php
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ clear
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/admin/schedule/editor/periode.blade.php b/resources/views/admin/schedule/editor/periode.blade.php
new file mode 100644
index 00000000..06910423
--- /dev/null
+++ b/resources/views/admin/schedule/editor/periode.blade.php
@@ -0,0 +1,43 @@
+
\ No newline at end of file
diff --git a/resources/views/admin/schedule/editor/template.blade.php b/resources/views/admin/schedule/editor/template.blade.php
index d21dd37e..b240caaa 100644
--- a/resources/views/admin/schedule/editor/template.blade.php
+++ b/resources/views/admin/schedule/editor/template.blade.php
@@ -5,84 +5,26 @@
@foreach($eventType->schedule_model['niveaux'] as $niveau)
-