Hi,
Very big thanks for your help, I successed to integrate PHP/MySQL !
But I have a small problem with the return of start and end date in
the variables. I have mixed the code of Pimmetje and original code of
Rob for display the dates in a select input form.
The code of interpretation of datas between JS and PHP is :
var editsaverun = false;
function editsave() {
if(!editsaverun) {
editsaverun = true;
/*Read the vars */
var id = $("#id").val();
var end = $("#event_edit_container").find("select
[name='end']").val();
var start = g$("#event_edit_container").find("select
[name='end']").val();
var title = $("#event_edit_container").find("input
[name='title']").val();
var message = $("#event_edit_container").find("input
[name='message']").val();
$.get("serverappli.php",
{
action: "edit",
start: start,
id : id,
end: end,
name: title,
message: message
},
function(json){
$('#calendar').weekCalendar("updateEvent", json);
}, 'json');
editsaverun = false;
}
}
So, I don't manage to recept the dates in good format for stocking in
my DB.
I have "Fri+Sep+04+2009+11%3A00%3A00+GMT%2B0200+(CEST)" and I would
like "2009-08-31T10:00:00+00:00"
For information the code of my EventClick part is :
eventClick : function(calEvent, $event) {
$.get("popup.php", {
page : "edit",
id : calEvent.id,
id_owner : <?php echo $owner; ?>
}, function(data){
$("#event_edit_container").append(data);
var $dialogContent = $("#event_edit_container");
resetForm($dialogContent);
var startField = $dialogContent.find("select
[name='start']").val(calEvent.start);
var endField = $dialogContent.find("select
[name='end']").val(calEvent.end);
var titleField = $dialogContent.find("input
[name='title']").val(calEvent.title);
var messageField = $dialogContent.find("input
[name='message']").val(calEvent.message);
var idField = $dialogContent.find("input[name='id']").val
(calEvent.id);
$dialogContent.find(".date_holder").text
($calendar.weekCalendar("formatDate", calEvent.start));
setupStartAndEndTimeFields(startField, endField, calEvent,
$calendar.weekCalendar("getTimeslotTimes",
calEvent.start));
});
$("#event_edit_container").dialog({
modal: true,
title: "Edition du RDV de " + calEvent.title,
height: 500,
width:500,
close: function() {
$("#event_edit_container").dialog("destroy");
$("#event_edit_container").hide();
$("#event_edit_container").empty();
$calendar.weekCalendar("removeUnsavedEvents");
},
buttons: {
save : function(){
editsave();
$("#event_edit_container").dialog("close");
},
"supprimer" : function() {
deleteappointment();
$("#event_edit_container").dialog("close");
},
cancel : function(){
$("#event_edit_container").dialog("close");
}
}
}).show();
$(window).resize(); //fixes a bug in modal overlay size ??
},
Somebody have an idea for my problem ? I have think to do a function
for convert it in the function editsave() but it's loud on code
no :s ?
Regards.
Aurelien ;)
> As u can see therehttp://
project.parko.org/weekcalendar/u can use