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){
|
function clicked(elem){
|
||||||
$.alert({
|
$.alert({
|
||||||
title: 'Chargement...',
|
title: 'Chargement...',
|
||||||
theme: 'supervan',
|
|
||||||
content: function () {
|
content: function () {
|
||||||
let self = this;
|
let self = this;
|
||||||
let object = {
|
let object = {
|
||||||
|
@ -31,7 +30,7 @@ function clicked(elem){
|
||||||
}).fail(function(){
|
}).fail(function(){
|
||||||
self.setContent('Something went wrong.');
|
self.setContent('Something went wrong.');
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,6 @@ function clicked($elem){
|
||||||
console.log(data);
|
console.log(data);
|
||||||
$.alert({
|
$.alert({
|
||||||
title: data['full_title'],
|
title: data['full_title'],
|
||||||
theme: 'supervan',
|
|
||||||
content: data['description'],
|
content: data['description'],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,6 @@ function showInfo(entry) {
|
||||||
if (entry !== undefined) {
|
if (entry !== undefined) {
|
||||||
$.alert({
|
$.alert({
|
||||||
title: 'Edition du planning',
|
title: 'Edition du planning',
|
||||||
theme: 'supervan',
|
|
||||||
content: editEntryTemplate,
|
content: editEntryTemplate,
|
||||||
onOpenBefore: function () {
|
onOpenBefore: function () {
|
||||||
$('#startTimeInput').val(entry['start']);
|
$('#startTimeInput').val(entry['start']);
|
||||||
|
|
|
@ -20,7 +20,6 @@ function showScores(team) {
|
||||||
console.log(team);
|
console.log(team);
|
||||||
$.alert({
|
$.alert({
|
||||||
title: nameTeam(team),
|
title: nameTeam(team),
|
||||||
theme:'supervan',
|
|
||||||
content: function () {
|
content: function () {
|
||||||
let self = this;
|
let self = this;
|
||||||
let object = {
|
let object = {
|
||||||
|
|
|
@ -88,6 +88,7 @@ include($relativePath."includes/score_counter.php");
|
||||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js"></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/timer.js"></script>
|
||||||
<script type="text/javascript" src="<?= $relativePath ?>assets/js/sidenav.js"></script>
|
<script type="text/javascript" src="<?= $relativePath ?>assets/js/sidenav.js"></script>
|
||||||
<?php if (isset($pageScripts)): ?>
|
<?php if (isset($pageScripts)): ?>
|
||||||
|
|
Loading…
Reference in a new issue