first commit symfony 6
This commit is contained in:
62
assets/js/app.js
Normal file
62
assets/js/app.js
Normal file
@ -0,0 +1,62 @@
|
||||
$(document).ready(function() {
|
||||
// Color
|
||||
$(".pick-a-color").spectrum(
|
||||
{
|
||||
type: "text",
|
||||
showAlpha: false
|
||||
}
|
||||
);
|
||||
$(".pick-a-color").attr("autocomplete","off");
|
||||
|
||||
// method confirm
|
||||
var doit = true;
|
||||
$("a[data-method]").on('click',function(){
|
||||
if($(this).data('confirm')){
|
||||
doit = confirm($(this).data('confirm'));
|
||||
if(!doit) return false;
|
||||
}
|
||||
});
|
||||
$("button[data-method]").on('click',function(){
|
||||
if($(this).data('confirm')){
|
||||
doit = confirm($(this).data('confirm'));
|
||||
if(!doit) return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Modal
|
||||
$(".btn-modal").click(function() {
|
||||
$("#"+$(this).data("modalid")+" .modal-title").text($(this).data("modaltitle"));
|
||||
$("#"+$(this).data("modalid")+" iframe").attr("src",$(this).data("modalurl"));
|
||||
$("#"+$(this).data("modalid")).modal("show");
|
||||
});
|
||||
|
||||
// Resize
|
||||
resize();
|
||||
|
||||
|
||||
// Focus
|
||||
$("#page").focus();
|
||||
});
|
||||
|
||||
$( window ).resize(function() {
|
||||
resize();
|
||||
});
|
||||
|
||||
|
||||
function resize() {
|
||||
if($("#header").is(":visible")){
|
||||
$(".navbar-logo").hide();
|
||||
$("#menulink").hide();
|
||||
$("#header").hide();
|
||||
}
|
||||
else {
|
||||
$(".navbar-logo").show();
|
||||
$("#menulink").show();
|
||||
$("#header").show();
|
||||
}
|
||||
|
||||
$("main").css("height",$(window).height()-$(".header").height());
|
||||
$("#page").css("height",$(window).height()-$(".header").height());
|
||||
$("#sidebar").css("min-height",$("body").height()-$(".header").height());
|
||||
}
|
||||
|
30
assets/js/datatables.init.js
Normal file
30
assets/js/datatables.init.js
Normal file
@ -0,0 +1,30 @@
|
||||
$(document).ready(function() {
|
||||
$.extend( $.fn.dataTable.defaults, {
|
||||
responsive: true,
|
||||
"iDisplayLength": 1000,
|
||||
"oLanguage": {
|
||||
"sThousands": " ",
|
||||
"sProcessing": "Traitement en cours...",
|
||||
"sSearch": "Rechercher :",
|
||||
"sLengthMenu": "Afficher _MENU_ éléments",
|
||||
"sInfo": "Affichage de l'élement _START_ à _END_ sur _TOTAL_ éléments",
|
||||
"sInfoEmpty": "Affichage de l'élement 0 à 0 sur 0 éléments",
|
||||
"sInfoFiltered": "(filtré de _MAX_ éléments au total)",
|
||||
"sInfoPostFix": "",
|
||||
"sLoadingRecords": "Chargement en cours...",
|
||||
"sZeroRecords": "Aucun élément à afficher",
|
||||
"sEmptyTable": "Aucune donnée disponible dans le tableau",
|
||||
"oPaginate": {
|
||||
"sFirst": "Premier",
|
||||
"sPrevious": "Précédent",
|
||||
"sNext": "Suivant",
|
||||
"sLast": "Dernier"
|
||||
},
|
||||
"oAria": {
|
||||
"sSortAscending": ": activer pour trier la colonne par ordre croissant",
|
||||
"sSortDescending": ": activer pour trier la colonne par ordre décroissant"
|
||||
}
|
||||
},
|
||||
//"stateSave": true
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user