mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
Update Laravel to 7.0
This commit is contained in:
204
public/css/app.css
vendored
204
public/css/app.css
vendored
@@ -1,7 +1,7 @@
|
||||
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);/*!
|
||||
* Bootstrap v4.4.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Bootstrap v4.5.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors
|
||||
* Copyright 2011-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
@@ -201,6 +201,7 @@ pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
-ms-overflow-style: scrollbar;
|
||||
}
|
||||
|
||||
figure {
|
||||
@@ -268,6 +269,10 @@ select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
@@ -301,13 +306,6 @@ input[type="checkbox"] {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
input[type="date"],
|
||||
input[type="time"],
|
||||
input[type="datetime-local"],
|
||||
input[type="month"] {
|
||||
-webkit-appearance: listbox;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
@@ -755,6 +753,7 @@ pre code {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@@ -1033,6 +1032,7 @@ pre code {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@@ -1316,6 +1316,7 @@ pre code {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@@ -1599,6 +1600,7 @@ pre code {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@@ -1882,6 +1884,7 @@ pre code {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@@ -2576,6 +2579,15 @@ pre code {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
input[type="date"].form-control,
|
||||
input[type="time"].form-control,
|
||||
input[type="datetime-local"].form-control,
|
||||
input[type="month"].form-control {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
select.form-control:focus::-ms-value {
|
||||
color: #495057;
|
||||
background-color: #fff;
|
||||
@@ -3059,7 +3071,6 @@ textarea.form-control.is-invalid {
|
||||
color: #212529;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
@@ -3100,6 +3111,10 @@ textarea.form-control.is-invalid {
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.btn:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a.btn.disabled,
|
||||
fieldset:disabled a.btn {
|
||||
pointer-events: none;
|
||||
@@ -3767,8 +3782,6 @@ fieldset:disabled a.btn {
|
||||
.btn-link:focus,
|
||||
.btn-link.focus {
|
||||
text-decoration: underline;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.btn-link:disabled,
|
||||
@@ -4259,8 +4272,9 @@ input[type="button"].btn-block {
|
||||
.input-group > .custom-file {
|
||||
position: relative;
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: 1 1 0%;
|
||||
flex: 1 1 0%;
|
||||
-ms-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
width: 1%;
|
||||
min-width: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@@ -5483,7 +5497,7 @@ input[type="button"].btn-block {
|
||||
}
|
||||
|
||||
.navbar-light .navbar-toggler-icon {
|
||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
||||
}
|
||||
|
||||
.navbar-light .navbar-text {
|
||||
@@ -5534,7 +5548,7 @@ input[type="button"].btn-block {
|
||||
}
|
||||
|
||||
.navbar-dark .navbar-toggler-icon {
|
||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
||||
}
|
||||
|
||||
.navbar-dark .navbar-text {
|
||||
@@ -5572,14 +5586,21 @@ input[type="button"].btn-block {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.card > .list-group:first-child .list-group-item:first-child {
|
||||
border-top-left-radius: 0.25rem;
|
||||
border-top-right-radius: 0.25rem;
|
||||
.card > .list-group {
|
||||
border-top: inherit;
|
||||
border-bottom: inherit;
|
||||
}
|
||||
|
||||
.card > .list-group:last-child .list-group-item:last-child {
|
||||
border-bottom-right-radius: 0.25rem;
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
.card > .list-group:first-child {
|
||||
border-top-width: 0;
|
||||
border-top-left-radius: calc(0.25rem - 1px);
|
||||
border-top-right-radius: calc(0.25rem - 1px);
|
||||
}
|
||||
|
||||
.card > .list-group:last-child {
|
||||
border-bottom-width: 0;
|
||||
border-bottom-right-radius: calc(0.25rem - 1px);
|
||||
border-bottom-left-radius: calc(0.25rem - 1px);
|
||||
}
|
||||
|
||||
.card-body {
|
||||
@@ -5817,6 +5838,12 @@ input[type="button"].btn-block {
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.breadcrumb-item {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.breadcrumb-item + .breadcrumb-item {
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
@@ -6305,6 +6332,7 @@ a.badge-dark.focus {
|
||||
display: flex;
|
||||
height: 1rem;
|
||||
overflow: hidden;
|
||||
line-height: 0;
|
||||
font-size: 0.675rem;
|
||||
background-color: #e9ecef;
|
||||
border-radius: 0.25rem;
|
||||
@@ -6379,6 +6407,7 @@ a.badge-dark.focus {
|
||||
flex-direction: column;
|
||||
padding-left: 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.list-group-item-action {
|
||||
@@ -6409,13 +6438,13 @@ a.badge-dark.focus {
|
||||
}
|
||||
|
||||
.list-group-item:first-child {
|
||||
border-top-left-radius: 0.25rem;
|
||||
border-top-right-radius: 0.25rem;
|
||||
border-top-left-radius: inherit;
|
||||
border-top-right-radius: inherit;
|
||||
}
|
||||
|
||||
.list-group-item:last-child {
|
||||
border-bottom-right-radius: 0.25rem;
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
border-bottom-right-radius: inherit;
|
||||
border-bottom-left-radius: inherit;
|
||||
}
|
||||
|
||||
.list-group-item.disabled,
|
||||
@@ -6448,26 +6477,26 @@ a.badge-dark.focus {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.list-group-horizontal .list-group-item:first-child {
|
||||
.list-group-horizontal > .list-group-item:first-child {
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal .list-group-item:last-child {
|
||||
.list-group-horizontal > .list-group-item:last-child {
|
||||
border-top-right-radius: 0.25rem;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal .list-group-item.active {
|
||||
.list-group-horizontal > .list-group-item.active {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal .list-group-item + .list-group-item {
|
||||
.list-group-horizontal > .list-group-item + .list-group-item {
|
||||
border-top-width: 1px;
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal .list-group-item + .list-group-item.active {
|
||||
.list-group-horizontal > .list-group-item + .list-group-item.active {
|
||||
margin-left: -1px;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
@@ -6480,26 +6509,26 @@ a.badge-dark.focus {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.list-group-horizontal-sm .list-group-item:first-child {
|
||||
.list-group-horizontal-sm > .list-group-item:first-child {
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-sm .list-group-item:last-child {
|
||||
.list-group-horizontal-sm > .list-group-item:last-child {
|
||||
border-top-right-radius: 0.25rem;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-sm .list-group-item.active {
|
||||
.list-group-horizontal-sm > .list-group-item.active {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-sm .list-group-item + .list-group-item {
|
||||
.list-group-horizontal-sm > .list-group-item + .list-group-item {
|
||||
border-top-width: 1px;
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-sm .list-group-item + .list-group-item.active {
|
||||
.list-group-horizontal-sm > .list-group-item + .list-group-item.active {
|
||||
margin-left: -1px;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
@@ -6513,26 +6542,26 @@ a.badge-dark.focus {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.list-group-horizontal-md .list-group-item:first-child {
|
||||
.list-group-horizontal-md > .list-group-item:first-child {
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-md .list-group-item:last-child {
|
||||
.list-group-horizontal-md > .list-group-item:last-child {
|
||||
border-top-right-radius: 0.25rem;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-md .list-group-item.active {
|
||||
.list-group-horizontal-md > .list-group-item.active {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-md .list-group-item + .list-group-item {
|
||||
.list-group-horizontal-md > .list-group-item + .list-group-item {
|
||||
border-top-width: 1px;
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-md .list-group-item + .list-group-item.active {
|
||||
.list-group-horizontal-md > .list-group-item + .list-group-item.active {
|
||||
margin-left: -1px;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
@@ -6546,26 +6575,26 @@ a.badge-dark.focus {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.list-group-horizontal-lg .list-group-item:first-child {
|
||||
.list-group-horizontal-lg > .list-group-item:first-child {
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-lg .list-group-item:last-child {
|
||||
.list-group-horizontal-lg > .list-group-item:last-child {
|
||||
border-top-right-radius: 0.25rem;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-lg .list-group-item.active {
|
||||
.list-group-horizontal-lg > .list-group-item.active {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-lg .list-group-item + .list-group-item {
|
||||
.list-group-horizontal-lg > .list-group-item + .list-group-item {
|
||||
border-top-width: 1px;
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-lg .list-group-item + .list-group-item.active {
|
||||
.list-group-horizontal-lg > .list-group-item + .list-group-item.active {
|
||||
margin-left: -1px;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
@@ -6579,42 +6608,40 @@ a.badge-dark.focus {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.list-group-horizontal-xl .list-group-item:first-child {
|
||||
.list-group-horizontal-xl > .list-group-item:first-child {
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-xl .list-group-item:last-child {
|
||||
.list-group-horizontal-xl > .list-group-item:last-child {
|
||||
border-top-right-radius: 0.25rem;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-xl .list-group-item.active {
|
||||
.list-group-horizontal-xl > .list-group-item.active {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-xl .list-group-item + .list-group-item {
|
||||
.list-group-horizontal-xl > .list-group-item + .list-group-item {
|
||||
border-top-width: 1px;
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
.list-group-horizontal-xl .list-group-item + .list-group-item.active {
|
||||
.list-group-horizontal-xl > .list-group-item + .list-group-item.active {
|
||||
margin-left: -1px;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.list-group-flush .list-group-item {
|
||||
border-right-width: 0;
|
||||
border-left-width: 0;
|
||||
.list-group-flush {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-flush .list-group-item:first-child {
|
||||
border-top-width: 0;
|
||||
.list-group-flush > .list-group-item {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
|
||||
.list-group-flush:last-child .list-group-item:last-child {
|
||||
.list-group-flush > .list-group-item:last-child {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
@@ -6778,9 +6805,6 @@ button.close {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
a.close.disabled {
|
||||
@@ -6926,6 +6950,9 @@ a.close.disabled {
|
||||
.modal-dialog-centered::before {
|
||||
display: block;
|
||||
height: calc(100vh - 1rem);
|
||||
height: -webkit-min-content;
|
||||
height: -moz-min-content;
|
||||
height: min-content;
|
||||
content: "";
|
||||
}
|
||||
|
||||
@@ -7068,6 +7095,9 @@ a.close.disabled {
|
||||
|
||||
.modal-dialog-centered::before {
|
||||
height: calc(100vh - 3.5rem);
|
||||
height: -webkit-min-content;
|
||||
height: -moz-min-content;
|
||||
height: min-content;
|
||||
}
|
||||
|
||||
.modal-sm {
|
||||
@@ -7648,6 +7678,8 @@ a.close.disabled {
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7659,6 +7691,8 @@ a.close.disabled {
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9244,6 +9278,27 @@ button.bg-dark:focus {
|
||||
}
|
||||
}
|
||||
|
||||
.user-select-all {
|
||||
-webkit-user-select: all !important;
|
||||
-moz-user-select: all !important;
|
||||
-ms-user-select: all !important;
|
||||
user-select: all !important;
|
||||
}
|
||||
|
||||
.user-select-auto {
|
||||
-webkit-user-select: auto !important;
|
||||
-moz-user-select: auto !important;
|
||||
-ms-user-select: auto !important;
|
||||
user-select: auto !important;
|
||||
}
|
||||
|
||||
.user-select-none {
|
||||
-webkit-user-select: none !important;
|
||||
-moz-user-select: none !important;
|
||||
-ms-user-select: none !important;
|
||||
user-select: none !important;
|
||||
}
|
||||
|
||||
.overflow-auto {
|
||||
overflow: auto !important;
|
||||
}
|
||||
@@ -9404,18 +9459,6 @@ button.bg-dark:focus {
|
||||
height: 100vh !important;
|
||||
}
|
||||
|
||||
.stretched-link::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
pointer-events: auto;
|
||||
content: "";
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.m-0 {
|
||||
margin: 0 !important;
|
||||
}
|
||||
@@ -11584,6 +11627,18 @@ button.bg-dark:focus {
|
||||
}
|
||||
}
|
||||
|
||||
.stretched-link::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
pointer-events: auto;
|
||||
content: "";
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.text-monospace {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
|
||||
}
|
||||
@@ -11815,8 +11870,7 @@ a.text-dark:focus {
|
||||
}
|
||||
|
||||
.text-break {
|
||||
word-break: break-word !important;
|
||||
overflow-wrap: break-word !important;
|
||||
word-wrap: break-word !important;
|
||||
}
|
||||
|
||||
.text-reset {
|
||||
|
||||
14
public/css/custom.css
vendored
14
public/css/custom.css
vendored
@@ -1175,14 +1175,18 @@ a.fc-more:hover {
|
||||
.fc-toolbar {
|
||||
text-align: center;
|
||||
margin-bottom: 1em;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.fc-toolbar .fc-left {
|
||||
float: left;
|
||||
h2{
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.fc-left {
|
||||
float: none !important;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.fc-toolbar .fc-right {
|
||||
@@ -1840,4 +1844,8 @@ h2 {
|
||||
|
||||
tfoot > tr {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.iconpicker-popover {
|
||||
z-index: 15 !important;
|
||||
}
|
||||
222
public/js/plugins/schedule/editorv2.js
vendored
222
public/js/plugins/schedule/editorv2.js
vendored
@@ -4,6 +4,7 @@ var eventType;
|
||||
var editorMode = 'schedule';
|
||||
function initEditor(event_id = 1, mode = 'schedule')
|
||||
{
|
||||
let isLoad = $.Deferred();
|
||||
let editor = $('#editor');
|
||||
editorMode = mode;
|
||||
eventType = null;
|
||||
@@ -24,8 +25,27 @@ function initEditor(event_id = 1, mode = 'schedule')
|
||||
nbOfPeriode = eventType['schedule_model']['periodes'].length;
|
||||
updateWidth();
|
||||
editor.html(getTemplate(eventType['schedule_model']));
|
||||
|
||||
if (mode == 'eventType')
|
||||
$('.richeditor').trumbowyg({
|
||||
lang: 'fr',
|
||||
btns: [
|
||||
['viewHTML'],
|
||||
['emoji'],
|
||||
['undo', 'redo'], // Only supported in Blink browsers
|
||||
['strong', 'em', 'del'],
|
||||
['superscript', 'subscript'],
|
||||
['fontfamily'],
|
||||
['fontsize'],
|
||||
['foreColor', 'backColor'],
|
||||
['link'],
|
||||
['insertImage'],
|
||||
['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
|
||||
['unorderedList', 'orderedList'],
|
||||
['horizontalRule'],
|
||||
['removeformat'],
|
||||
['fullscreen']
|
||||
]
|
||||
});
|
||||
if (mode == 'eventType' || mode == 'schedule-add')
|
||||
{
|
||||
let scheduleModel = eventType['schedule_model'];
|
||||
if (scheduleModel['default_value'])
|
||||
@@ -39,11 +59,32 @@ function initEditor(event_id = 1, mode = 'schedule')
|
||||
});
|
||||
});
|
||||
}
|
||||
$('.no-mandatory').removeAttr('required')
|
||||
if (mode != 'schedule-add')
|
||||
{
|
||||
$('.scheduleInput').removeAttr('required')
|
||||
}
|
||||
}
|
||||
if (mode == 'schedule-add')
|
||||
{
|
||||
$('.datetimepicker').datetimepicker({
|
||||
icons: {
|
||||
time: "fa fa-clock-o",
|
||||
date: "fa fa-calendar",
|
||||
up: "fa fa-chevron-up",
|
||||
down: "fa fa-chevron-down",
|
||||
previous: 'fa fa-chevron-left',
|
||||
next: 'fa fa-chevron-right',
|
||||
today: 'fa fa-screenshot',
|
||||
clear: 'fa fa-trash',
|
||||
close: 'fa fa-remove'
|
||||
}
|
||||
});
|
||||
}
|
||||
initAutoComplete("AutoCompleteUser");
|
||||
initAutoCompleteOCOM('AutoCompleteOCOM');
|
||||
isLoad.resolve();
|
||||
});
|
||||
return isLoad.promise();
|
||||
}
|
||||
|
||||
function updateWidth()
|
||||
@@ -167,6 +208,14 @@ function getPeriode(id,periode,niveaux) {
|
||||
|
||||
function getCourse(level_id,periode_id)
|
||||
{
|
||||
let isCourse = "";
|
||||
if (eventType['schedule_model']['default_value'])
|
||||
{
|
||||
if(eventType['schedule_model']['default_value'][periode_id][level_id]['use_course'] != null)
|
||||
{
|
||||
isCourse = "required";
|
||||
}
|
||||
}
|
||||
level_id++;
|
||||
periode_id++;
|
||||
return '<div id="container-'+level_id+'-'+periode_id+'" niveau="'+level_id+'" periode="'+periode_id+'" class="col m-0 border-bottom border-right scheduleEditor-course">\n' +
|
||||
@@ -191,14 +240,13 @@ function getCourse(level_id,periode_id)
|
||||
' <div class="row pt-2">\n' +
|
||||
' <div class="col-12 d-none" id="descContainer'+level_id+'-'+periode_id+'">\n' +
|
||||
' <div class="form-group">\n' +
|
||||
' <label for="exampleFormControlTextarea1">Description de la période</label>\n' +
|
||||
' <textarea class="form-control" id="desc_n'+level_id+'_p'+periode_id+' name="desc_n'+level_id+'_p'+periode_id+' no-mandatory" id="exampleFormControlTextarea1" rows="2"></textarea>\n' +
|
||||
' <textarea class="form-control scheduleInput" id="desc_n'+level_id+'_p'+periode_id+'" name="desc_n'+level_id+'_p'+periode_id+'" rows="2" placeholder="Description de la période"></textarea>\n' +
|
||||
' </div>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="col-6 mb-1" id="OCOMContainer'+level_id+'-'+periode_id+'">\n' +
|
||||
' <div class="form-group label-floating">\n' +
|
||||
' <div class="autocomplete">\n' +
|
||||
' <input type="text" placeholder="OCOM du cours" id="ocom_n'+level_id+'_p'+periode_id+'" name="ocom_n'+level_id+'_p'+periode_id+'" class="form-control AutoCompleteOCOM no-mandatory" aria-describedby="nameHelp" autocomplete="off" required onblur="updateCourseName(\''+level_id+'\',\''+periode_id+'\')">\n' +
|
||||
' <input type="text" placeholder="OCOM du cours" id="ocom_n'+level_id+'_p'+periode_id+'" name="ocom_n'+level_id+'_p'+periode_id+'" class="form-control AutoCompleteOCOM scheduleInput" aria-describedby="nameHelp" autocomplete="off" '+isCourse+' onblur="updateCourseName(\''+level_id+'\',\''+periode_id+'\')">\n' +
|
||||
' </div>\n' +
|
||||
' <span class="form-control-feedback">\n' +
|
||||
' <i class="material-icons">done</i>\n' +
|
||||
@@ -207,7 +255,7 @@ function getCourse(level_id,periode_id)
|
||||
' </div>\n' +
|
||||
' <div class="col-6" id="nameContainer'+level_id+'-'+periode_id+'">\n' +
|
||||
' <div class="form-group label-floating">\n' +
|
||||
' <input type="text" placeholder="Nom du cours" id="name_n'+level_id+'_p'+periode_id+'" name="name_n'+level_id+'_p'+periode_id+'" class="form-control no-mandatory" required />\n' +
|
||||
' <input type="text" placeholder="Nom du cours" id="name_n'+level_id+'_p'+periode_id+'" name="name_n'+level_id+'_p'+periode_id+'" class="form-control scheduleInput" '+isCourse+' />\n' +
|
||||
' <span class="form-control-feedback">\n' +
|
||||
' <i class="material-icons">clear</i>\n' +
|
||||
' </span>\n' +
|
||||
@@ -215,7 +263,7 @@ function getCourse(level_id,periode_id)
|
||||
' </div>\n' +
|
||||
' <div class="col-6 mb-1">\n' +
|
||||
' <div class="form-group label-floating">\n' +
|
||||
' <input type="text" placeholder="Lieu du cours" id="location_n'+level_id+'_p'+periode_id+'" name="location_n'+level_id+'_p'+periode_id+'" class="form-control no-mandatory" required/>\n' +
|
||||
' <input type="text" placeholder="Lieu du cours" id="location_n'+level_id+'_p'+periode_id+'" name="location_n'+level_id+'_p'+periode_id+'" class="form-control scheduleInput" '+isCourse+'/>\n' +
|
||||
' <span class="form-control-feedback">\n' +
|
||||
' <i class="material-icons">done</i>\n' +
|
||||
' </span>\n' +
|
||||
@@ -224,7 +272,7 @@ function getCourse(level_id,periode_id)
|
||||
' <div class="col-6">\n' +
|
||||
' <div class="form-group label-floating">\n' +
|
||||
' <div class="autocomplete">\n' +
|
||||
' <input type="text" placeholder="Nom de l\'instructeur" id="instruc_n'+level_id+'_p'+periode_id+'" name="instruc_n'+level_id+'_p'+periode_id+'" class="form-control AutoCompleteUser no-mandatory" aria-describedby="nameHelp" autocomplete="off" required>\n' +
|
||||
' <input type="text" placeholder="Nom de l\'instructeur" id="instruc_n'+level_id+'_p'+periode_id+'" name="instruc_n'+level_id+'_p'+periode_id+'" class="form-control AutoCompleteUser scheduleInput" aria-describedby="nameHelp" autocomplete="off" '+isCourse+'>\n' +
|
||||
' </div>\n' +
|
||||
' <span class="form-control-feedback">\n' +
|
||||
' <i class="material-icons">done</i>\n' +
|
||||
@@ -288,7 +336,7 @@ function addLevel()
|
||||
initAutoCompleteOCOM('AutoCompleteOCOM');
|
||||
if (editorMode == 'eventType')
|
||||
{
|
||||
$('.no-mandatory').removeAttr('required')
|
||||
$('.scheduleInput').removeAttr('required')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,7 +358,7 @@ function addPeriode()
|
||||
initAutoCompleteOCOM('AutoCompleteOCOM');
|
||||
if (editorMode == 'eventType')
|
||||
{
|
||||
$('.no-mandatory').removeAttr('required')
|
||||
$('.scheduleInput').removeAttr('required')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,6 +371,9 @@ function selectCourseMode(mode, niveau, periode)
|
||||
$('#isDoneContainer'+niveau+'-'+periode).addClass('d-flex');
|
||||
$('#OCOMContainer'+niveau+'-'+periode).removeClass('d-none');
|
||||
$('#nameContainer'+niveau+'-'+periode).removeClass('d-none');
|
||||
$('#ocom_n'+niveau+'_p'+periode).prop('required',true);
|
||||
$('#name_n'+niveau+'_p'+periode).prop('required',true);
|
||||
$('#instruc_n'+niveau+'_p'+periode).prop('required',true);
|
||||
$('#modeSwitchC'+niveau+'-'+periode).addClass('active');
|
||||
$('#modeSwitchO'+niveau+'-'+periode).removeClass('active');
|
||||
$('#use_course_n'+niveau+'_p'+periode).prop("checked", true);
|
||||
@@ -334,6 +385,9 @@ function selectCourseMode(mode, niveau, periode)
|
||||
$('#isDoneContainer'+niveau+'-'+periode).removeClass('d-flex');
|
||||
$('#OCOMContainer'+niveau+'-'+periode).addClass('d-none');
|
||||
$('#nameContainer'+niveau+'-'+periode).addClass('d-none');
|
||||
$('#ocom_n'+niveau+'_p'+periode).removeAttr('required');
|
||||
$('#name_n'+niveau+'_p'+periode).removeAttr('required');
|
||||
$('#instruc_n'+niveau+'_p'+periode).prop('required',true);
|
||||
$('#modeSwitchC'+niveau+'-'+periode).removeClass('active');
|
||||
$('#modeSwitchO'+niveau+'-'+periode).addClass('active');
|
||||
$('#use_course_n'+niveau+'_p'+periode).prop("checked", false);
|
||||
@@ -390,4 +444,150 @@ function updateCourseName(niveau, periode) {
|
||||
})
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function loadEventType(date,id = 1)
|
||||
{
|
||||
if ($('#type'))
|
||||
{
|
||||
id = $('#type').val();
|
||||
}
|
||||
initEditor(id,'schedule-add').done(function () {
|
||||
|
||||
if (eventType['is_mandatory'] == 1)
|
||||
{
|
||||
$('#is_mandatory').prop('checked',true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#is_mandatory').removeAttr('checked');
|
||||
}
|
||||
|
||||
if (eventType['use_schedule'] == 1)
|
||||
{
|
||||
$('#use_schedule').prop('checked',true);
|
||||
switchUseSchedule();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#use_schedule').removeAttr('checked');
|
||||
switchUseSchedule();
|
||||
}
|
||||
|
||||
if (eventType['use_weekly_msg'] == 1)
|
||||
{
|
||||
$('#use_weekly_msg').prop('checked',true);
|
||||
switchUseWeeklyMsg();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#use_weekly_msg').removeAttr('checked');
|
||||
switchUseWeeklyMsg();
|
||||
}
|
||||
let begin_time = $('#begin_time');
|
||||
begin_time.data("DateTimePicker").destroy();
|
||||
begin_time.datetimepicker({
|
||||
icons: {
|
||||
time: "fa fa-clock-o",
|
||||
date: "fa fa-calendar",
|
||||
up: "fa fa-chevron-up",
|
||||
down: "fa fa-chevron-down",
|
||||
previous: 'fa fa-chevron-left',
|
||||
next: 'fa fa-chevron-right',
|
||||
today: 'fa fa-screenshot',
|
||||
clear: 'fa fa-trash',
|
||||
close: 'fa fa-remove'
|
||||
},
|
||||
date: new Date(moment(date+" "+eventType['begin_time']))
|
||||
});
|
||||
let end_time = $('#end_time');
|
||||
end_time.data("DateTimePicker").destroy();
|
||||
end_time.datetimepicker({
|
||||
icons: {
|
||||
time: "fa fa-clock-o",
|
||||
date: "fa fa-calendar",
|
||||
up: "fa fa-chevron-up",
|
||||
down: "fa fa-chevron-down",
|
||||
previous: 'fa fa-chevron-left',
|
||||
next: 'fa fa-chevron-right',
|
||||
today: 'fa fa-screenshot',
|
||||
clear: 'fa fa-trash',
|
||||
close: 'fa fa-remove'
|
||||
},
|
||||
date: new Date(moment(date+" "+eventType['end_time']))
|
||||
});
|
||||
let weekly_msg_publication_time = $('#weekly_msg_publication_time');
|
||||
weekly_msg_publication_time.data("DateTimePicker").destroy();
|
||||
if (eventType['weekly_msg_publication_time'].match(/\d+/) != null || eventType['weekly_msg_publication_time'].match(/\d+/) != null)
|
||||
{
|
||||
weekly_msg_publication_time.datetimepicker({
|
||||
icons: {
|
||||
time: "fa fa-clock-o",
|
||||
date: "fa fa-calendar",
|
||||
up: "fa fa-chevron-up",
|
||||
down: "fa fa-chevron-down",
|
||||
previous: 'fa fa-chevron-left',
|
||||
next: 'fa fa-chevron-right',
|
||||
today: 'fa fa-screenshot',
|
||||
clear: 'fa fa-trash',
|
||||
close: 'fa fa-remove'
|
||||
},
|
||||
date: new Date(moment(date+" "+eventType['begin_time']).subtract(
|
||||
eventType['weekly_msg_publication_time'].match(/\d+/)[0],
|
||||
eventType['weekly_msg_publication_time'].match(/[a-z]+/)[0]
|
||||
))
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
weekly_msg_publication_time.datetimepicker({
|
||||
icons: {
|
||||
time: "fa fa-clock-o",
|
||||
date: "fa fa-calendar",
|
||||
up: "fa fa-chevron-up",
|
||||
down: "fa fa-chevron-down",
|
||||
previous: 'fa fa-chevron-left',
|
||||
next: 'fa fa-chevron-right',
|
||||
today: 'fa fa-screenshot',
|
||||
clear: 'fa fa-trash',
|
||||
close: 'fa fa-remove'
|
||||
},
|
||||
date: new Date(moment(date+" "+eventType['begin_time']).subtract(1,'days'))
|
||||
});
|
||||
}
|
||||
$('#location').val(eventType['location']);
|
||||
$('#name').val(eventType['name']);
|
||||
$('#admin_desc').trumbowyg('html', eventType['admin_desc']);
|
||||
$('#calendar_color').val(eventType['calendar_color']);
|
||||
pickr.setColor(eventType['calendar_color']);
|
||||
$('#calendar_icon').val(eventType['calendar_icon']);
|
||||
$('#calendar_icon_display').removeAttr('class');
|
||||
$('#calendar_icon_display').addClass(eventType['calendar_icon']);
|
||||
})
|
||||
}
|
||||
|
||||
function switchUseSchedule()
|
||||
{
|
||||
if($('#use_schedule').is(":checked"))
|
||||
{
|
||||
$('#collschedule').removeClass('d-none');
|
||||
$('.scheduleInput').removeAttr('disabled')
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#collschedule').addClass('d-none');
|
||||
$('.scheduleInput').prop('disabled',true)
|
||||
}
|
||||
}
|
||||
|
||||
function switchUseWeeklyMsg()
|
||||
{
|
||||
if($('#use_weekly_msg').is(":checked"))
|
||||
{
|
||||
$('#collmessagedelasemaine').removeClass('d-none');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#collmessagedelasemaine').addClass('d-none');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user