1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
| $(function(){
$('.accordion').accordion();
});
function checkLength( o, n, min, max ) {
if ( document.getElementById(n).length > max || document.getElementById(n).length < min ) {
//document.getElementById(n).className = "ui-state-error";
//updateTips( "Length of " + n + " must be between " +
//min + " and " + max + "." );
return false;
} else {
return true;
}
}
//Tabs
$(function() {
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#tabs" ).tabs();
});
function ajouteChamp(num){
if($('.fichier'+num).val()==""){
$('.fichier'+num).after('<br/> <input class="fichier'+(num+1)+'" style="width:100%" type="file" name="fichier'+(num+1)+'" onClick="ajouteChamp('+(num+1)+')">');
}
}
function renameGalerie(id){
$('#contenuRename').css('display','block');
$('#dialRename').dialog({
autoOpen : true,
position : new Array('center',150),
resizable : true,
draggable : true,
modal : true,
title:"Modification du nom d'une galerie",
close: function(){
$('#error').css('display','none');
},
buttons: {
Rename: function() {
var bValid = true;
//allFields.removeClass( "ui-state-error" );
bValid = (document.getElementById("rename").value.length>0);
if ( bValid ) {
$('#formRename').attr('action',"renameGalerie.php?id="+id);
$('#formRename').submit();
}else{
$('#error').css('display','block');
}
},
Cancel: function() {
$( this ).dialog( "close" );
}
} //<<<<<<<
});
}
function ouvreGalerie(id){
$('#vueGalerie').css('display','none');
$('#contenuGalerie').css('display','block');
$('#contenuGalerie').text("Chargement...");
$('#contenuGalerie').load('contenuGalerie.php?id='+id);
}
function fermeGalerie(){
$('#vueGalerie').css('display','block');
$('#contenuGalerie').empty();
$('#contenuGalerie').css('display','none');
}
function toutCocher(){
$('.checkBox').each(function(index, element) {
$(element).attr('checked','checked');
});
} |
Partager