mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
April 9 update
This commit is contained in:
45
public/js/plugins/course.js
vendored
Normal file
45
public/js/plugins/course.js
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
$('.richeditor').trumbowyg({
|
||||
lang: 'fr',
|
||||
btns: [
|
||||
['viewHTML'],
|
||||
['emoji'],
|
||||
['undo', 'redo'], // Only supported in Blink browsers
|
||||
['strong', 'em', 'del'],
|
||||
['superscript', 'subscript'],
|
||||
['fontfamily'],
|
||||
['fontsize'],
|
||||
['foreColor', 'backColor'],
|
||||
['link'],
|
||||
['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
|
||||
['unorderedList', 'orderedList'],
|
||||
['horizontalRule'],
|
||||
['removeformat'],
|
||||
['fullscreen']
|
||||
]
|
||||
});
|
||||
|
||||
function switchPlanStatus(id)
|
||||
{
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/api/course/'+id+'/plan/validate?api_token='+api_token,
|
||||
success: function (data) {
|
||||
if (data == '1')
|
||||
{
|
||||
showNotification('success','Le plan de cours est maintenant vérifié','top', 'center');
|
||||
$("[name='isPlanCheck']").prop( "checked", true );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
showNotification('warning','Le plan de cours n\'est maintenant plus vérifié','top', 'center');
|
||||
$("[name='isPlanCheck']").prop( "checked", false );
|
||||
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
showNotification('error','Erreur impossible de changer le status du plan de cours','top', 'center');
|
||||
$("[name='isPlanCheck']").prop( "checked", false );
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user