forked from vergnet/site-accueil-insa
Improved popups
This commit is contained in:
parent
7c55e66b71
commit
f732238da0
6 changed files with 58 additions and 5 deletions
56
assets/js/init.js
Normal file
56
assets/js/init.js
Normal file
|
@ -0,0 +1,56 @@
|
|||
jconfirm.defaults = {
|
||||
title: '',
|
||||
titleClass: '',
|
||||
type: 'default',
|
||||
typeAnimated: true,
|
||||
draggable: false,
|
||||
animateFromElement: true,
|
||||
smoothContent: true,
|
||||
content: '',
|
||||
buttons: {},
|
||||
defaultButtons: {
|
||||
ok: {
|
||||
text: 'OK',
|
||||
action: function () {
|
||||
}
|
||||
},
|
||||
},
|
||||
contentLoaded: function(data, status, xhr){
|
||||
},
|
||||
icon: '',
|
||||
lazyOpen: false,
|
||||
bgOpacity: null,
|
||||
theme: 'supervan',
|
||||
animation: 'scale',
|
||||
closeAnimation: 'scale',
|
||||
animationSpeed: 400,
|
||||
animationBounce: 1,
|
||||
rtl: false,
|
||||
container: 'body',
|
||||
containerFluid: false,
|
||||
escapeKey: 'ok',
|
||||
backgroundDismiss: true,
|
||||
backgroundDismissAnimation: 'shake',
|
||||
autoClose: false,
|
||||
closeIcon: null,
|
||||
closeIconClass: false,
|
||||
watchInterval: 100,
|
||||
columnClass: 'col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1',
|
||||
boxWidth: '50%',
|
||||
scrollToPreviousElement: true,
|
||||
scrollToPreviousElementAnimate: true,
|
||||
useBootstrap: true,
|
||||
offsetTop: 40,
|
||||
offsetBottom: 40,
|
||||
bootstrapClasses: {
|
||||
container: 'container',
|
||||
containerFluid: 'container-fluid',
|
||||
row: 'row',
|
||||
},
|
||||
onContentReady: function () {},
|
||||
onOpenBefore: function () {},
|
||||
onOpen: function () {},
|
||||
onClose: function () {},
|
||||
onDestroy: function () {},
|
||||
onAction: function () {}
|
||||
};
|
|
@ -9,7 +9,6 @@ function get_name(id){
|
|||
function clicked(elem){
|
||||
$.alert({
|
||||
title: 'Chargement...',
|
||||
theme: 'supervan',
|
||||
content: function () {
|
||||
let self = this;
|
||||
let object = {
|
||||
|
@ -31,7 +30,7 @@ function clicked(elem){
|
|||
}).fail(function(){
|
||||
self.setContent('Something went wrong.');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ function clicked($elem){
|
|||
console.log(data);
|
||||
$.alert({
|
||||
title: data['full_title'],
|
||||
theme: 'supervan',
|
||||
content: data['description'],
|
||||
});
|
||||
}
|
||||
|
|
|
@ -111,7 +111,6 @@ function showInfo(entry) {
|
|||
if (entry !== undefined) {
|
||||
$.alert({
|
||||
title: 'Edition du planning',
|
||||
theme: 'supervan',
|
||||
content: editEntryTemplate,
|
||||
onOpenBefore: function () {
|
||||
$('#startTimeInput').val(entry['start']);
|
||||
|
|
|
@ -20,7 +20,6 @@ function showScores(team) {
|
|||
console.log(team);
|
||||
$.alert({
|
||||
title: nameTeam(team),
|
||||
theme:'supervan',
|
||||
content: function () {
|
||||
let self = this;
|
||||
let object = {
|
||||
|
|
|
@ -88,6 +88,7 @@ include($relativePath."includes/score_counter.php");
|
|||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js"></script>
|
||||
<script type="text/javascript" src="<?= $relativePath ?>assets/js/init.js"></script>
|
||||
<script type="text/javascript" src="<?= $relativePath ?>assets/js/timer.js"></script>
|
||||
<script type="text/javascript" src="<?= $relativePath ?>assets/js/sidenav.js"></script>
|
||||
<?php if (isset($pageScripts)): ?>
|
||||
|
|
Loading…
Reference in a new issue