Javascript arborescence ok

This commit is contained in:
Michael RICOIS 2012-01-18 08:24:47 +00:00
parent 16127bd775
commit cf50bc0374

View File

@ -128,14 +128,19 @@ $(document).ready(function(){
}, },
buttons: { buttons: {
Valider: function() { Valider: function() {
alert('ok'); var key = $('div.jstree').attr('id');
alert($('.jstree').get_checked ( null, true)); var elements = [];
$('#'+key).jstree("get_checked").each(function(){
elements.push(this.id);
});
set(key, elements.join(","));
$(this).dialog('close');
}, },
Annuler: function() { $(this).dialog('close'); } Fermer: function() { $(this).dialog('close'); }
}, },
close: function() { $('#dialognaf').remove(); } close: function() { $('#dialogtree').remove(); }
}; };
$('<div id="dialognaf"></div>').dialog(dialogOpts); $('<div id="dialogtree"></div>').dialog(dialogOpts);
return false; return false;
}); });