function newCoffre(){
var html =
'
' +
' ' +
'
';
new $.flavr({
title : 'NOUVEAU COFFRE',
iconPath : '/web/img/',
closeOverlay : true,
closeEsc : true,
icon : 'picto_coffre.png',
content : 'Donnez un nom à votre nouveau coffre',
dialog : 'form',
titleSubmit : 'Créer',
titleCancel : 'Annuler',
form : { content: html, action: 'monCoffre.do?a=newCoffre', method: 'post'}
});
}
function chgtNomCoffre(idCoffre){
var html =
' ' +
' ' +
'
';
new $.flavr({
content : 'Indiquez un nom pour votre coffre',
dialog : 'prompt',
prompt : { placeholder: 'Nom du coffre' },
onConfirm : function( $container, $prompt ){
$.post('monCoffre.do?a=saveNomCoffre',{"idc": idCoffre, "intitule": $prompt.val()},
function() { // on success
window.location.reload();
}).fail(function() { //on failure
alert("Erreur d'enregistrement.");
});
this.closeAll();
},
onCancel : function(){
this.close();
}
});
}