mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
hide event
This commit is contained in:
36
public/js/calendar.js
vendored
36
public/js/calendar.js
vendored
@@ -19,7 +19,7 @@ function initFullCalendar(authToken) {
|
||||
right: 'prev,next'
|
||||
},
|
||||
defaultDate: initDate,
|
||||
events: '/api/schedule/events',
|
||||
events: '/api/schedule/events/auth?api_token='+authToken,
|
||||
eventRender: function(event, element) {
|
||||
if (event.event.extendedProps.icon && event.view.type == 'dayGridMonth')
|
||||
{
|
||||
@@ -130,22 +130,32 @@ function deleteEvent(pid){
|
||||
if (result.value) {
|
||||
|
||||
(function($) {
|
||||
$.post('/api/schedule/event/delete/'+pid+'?api_token='+api_token, function(data) {
|
||||
console.log('Delete');
|
||||
$.post('/api/schedule/event/delete/'+pid+'?api_token='+api_token, function(data, status, xhr) {
|
||||
swal(
|
||||
'Supprimé!',
|
||||
"L'évenement a été supprimé",
|
||||
'success'
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}).fail(function (data, status, xhr) {
|
||||
if (xhr == 'Forbidden') {
|
||||
swal(
|
||||
'Oups!',
|
||||
"Vous n'avez pas les permissions nécessaires...",
|
||||
'error'
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
swal(
|
||||
'Supprimé!',
|
||||
"L'évenement a été supprimé",
|
||||
'success'
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
18
public/js/plugins/schedule/editorv2.js
vendored
18
public/js/plugins/schedule/editorv2.js
vendored
@@ -488,6 +488,15 @@ function loadEventType(date,id = 1)
|
||||
switchUseSchedule();
|
||||
}
|
||||
|
||||
if (eventType['hidden'] == 1)
|
||||
{
|
||||
$('#hidden').prop('checked',true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#hidden').removeAttr('checked');
|
||||
}
|
||||
|
||||
if (eventType['use_weekly_msg'] == 1)
|
||||
{
|
||||
$('#use_weekly_msg').prop('checked',true);
|
||||
@@ -604,6 +613,15 @@ function loadEvent(date,id)
|
||||
switchUseSchedule();
|
||||
}
|
||||
|
||||
if (eventType['hidden'] == 1)
|
||||
{
|
||||
$('#hidden').prop('checked',true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#hidden').removeAttr('checked');
|
||||
}
|
||||
|
||||
if (eventType['use_weekly_msg'] == 1)
|
||||
{
|
||||
$('#use_weekly_msg').prop('checked',true);
|
||||
|
||||
Reference in New Issue
Block a user