I have most of my calendar project working but one quirk the database updates
just fine I am using the scheduler_connector.php on the server side IE:
scheduler_connector->sql->query() for updates and the updates work fine.
However on the calendar itself they do not show up until I reload the html page containing the
calendar ?
Any help would be appreciated…
Jim
=============== CLIENT SIDE CODE BELOW========================
html, body{
margin:0px;
padding:0px;
height:100%;
overflow:hidden;
}
.dhx_cal_event_line.custom, .dhx_cal_event.custom div{
background-color:#fd7;
border-color:#da6;
color:#444;
}
<script type="text/javascript" charset="utf-8">
function init() {
window.resizeTo(824,900);
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.first_hour = 8;
scheduler.locale.labels.section_location="Location";
scheduler.config.prevent_cache=false;
scheduler.config.positive_closing=true;
scheduler.config.details_on_create=true;
scheduler.config.details_on_dblclick=true;
scheduler.config.drag_create=true;
scheduler.config.multi_day = true;
scheduler.config.date_step = "5";
scheduler.config.show_loading = true;
scheduler.init('scheduler_here',null,"month");
scheduler.load("../dhtmlx/codebase/account_bonds_maturing_init.php?eid=350&uid="+scheduler.uid());
var dp = new dataProcessor("../dhtmlx/codebase/account_bonds_maturing_update.php?eid=350");
dp.init(scheduler);
dp.defineAction("invalid",function(response){
var message = response.getAttribute("message");
alert(message);
return true;
});
}
</script>
<script>
function modSchedHeight(){
var headHeight = 100;
var sch = document.getElementById("scheduler_here");
sch.style.height = (parseInt(document.body.offsetHeight)-headHeight)+"px";
var contbox = document.getElementById("contbox");
contbox.style.width = (parseInt(document.body.offsetWidth)-300)+"px";
}
</script>
<script>
scheduler.templates.tooltip_text = function(start,end,ev){
return "<b>Event:</b> "+event.text+"<br/><b>Start date:</b> "+scheduler.templates.tooltip_date_format(start)+"<br/><b>End date:</b> "+scheduler.templates.tooltip_date_format(end);
};
</script>
<script type="text/javascript" charset="utf-8">
scheduler.form_blocks["my_editor"]={
render:function(sns){
return "<div class='dhx_cal_ltext' style='height:360px;'>Event Name <input id='event_name' type='text'><br/>Bond Details <textarea id='details' rows='10' cols='15'></textarea></div>";
},
set_value:function(node,value,ev){
node.childNodes[1].value=value||"";
node.childNodes[4].value=ev.details||"";
},
get_value:function(node,ev){
ev.location = node.childNodes[4].value;
return node.childNodes[1].value;
},
focus:function(node){
var a=node.childNodes[1]; a.select(); a.focus();
}
}
scheduler.config.lightbox.sections=[
{ name:"description", height:600, map_to:"text", type:"my_editor" , focus:true},
{ name:"time", height:72, type:"time", map_to:"auto"}
];
Bond Event Calendar |