\n\t\t\t\t
\n\t\t\t\t°F \/\t\t\t\t°F\t\t\t\t
mm<\/span>\n\t\t\t<\/div>\n\t\t<\/div>\n"});
function showOptions(){
document.getElementById('optional_details').style.display='block';
document.getElementById('optional_details').previousSibling.style.display='block';
document.getElementById('optional_details').parentNode.style.height='275px';
document.getElementById('optional_details').parentNode.parentNode.style.height='325px';
document.getElementById('details').previousSibling.childNodes[0].childNodes[1].innerHTML=" Hide Options";
scheduler.form_blocks.my_editor.button_click=function(index, src, sec, data){
hideOptions();
}
}
function hideOptions(){
document.getElementById('optional_details').style.display='none';
document.getElementById('optional_details').previousSibling.style.display='none';
document.getElementById('optional_details').parentNode.style.height='275px';
document.getElementById('optional_details').parentNode.parentNode.style.height='325px';
document.getElementById('details').previousSibling.childNodes[0].childNodes[1].innerHTML=" Show Options";
scheduler.form_blocks.my_editor.button_click=function(index, src, sec, data){
showOptions();
}
}
function scheduler_init() {
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.hour_date="%h:%i %A";
scheduler.config.multi_day = true;
scheduler.config.start_on_monday=true
scheduler.config.details_on_dblclick=true;
scheduler.config.dblclick_create = false;
scheduler.config.drag_create = false;
scheduler.config.details_on_create=false;
scheduler.locale.labels.icon_delete=""; scheduler.locale.labels.icon_save=""; scheduler.config.icons_edit=["icon_cancel"];
scheduler.config.icons_details=["icon_cancel"];
scheduler.config.icons_select=["icon_details"];
scheduler.locale.labels.icon_recur = "Recurrences";
scheduler._click.buttons.recur = function(event_id){
location.href='changeeinfo.php?httpreferer=main.php&eventid='+event_id;
}
scheduler.locale.labels.icon_copy = "Copy Event";
scheduler._click.buttons.copy = function(event_id){
location.href='changeeinfo.php?copy=1&httpreferer=main.php&eventid='+event_id;
}
scheduler.config.show_loading=true;
//scheduler.config.cascade_event_display = true;
scheduler.config.full_day = true;
scheduler.config.event_duration =60;
//scheduler.config.first_hour=0;
scheduler.config.scroll_hour=8;
scheduler.config.auto_end_date = true;
scheduler.config.update_render=true;
var members=[
];
var categories=[
{key:1, label:"Practice"},{key:3, label:"Trip"},{key:4, label:"Show"},{key:5, label:"Holiday/Birthday"},{key:6, label:"Game/Recital"} ];
scheduler.locale.labels.section_description="Description";
scheduler.locale.labels.section_details="Details";
scheduler.locale.labels.button_options=" Show Options";
scheduler.form_blocks["my_editor"]={
render:function(sns){
return "Family Member: Category: Send Reminder
";
},
set_value:function(node,value,ev){
node.childNodes[1].value=ev.sponsorid||"";
node.childNodes[3].value=ev.categoryid||"";
if (ev.reminder==1) {node.childNodes[5].checked=true; } else {node.childNodes[5].checked=false; }
node.childNodes[6].value=ev.calendarid||"default";
if (!document.getElementById('send_note')){
var x=document.getElementById('details');
x.previousSibling.style.height='40px';
x.previousSibling.innerHTML +='
';
x.style.marginTop='12px';
newanchor = document.createElement("a");
newanchor.id='import';
newanchorimg=document.createElement('img');
newanchorimg.src='/images/vcalendar.gif';
newanchorimg.setAttribute('alt', 'import to Outlook');
newanchorimg.setAttribute('title','import to Outlook');
newanchorimg.style.marginLeft='0px';
newanchorimg.style.border='none';
newanchor.appendChild(newanchorimg);
x.previousSibling.appendChild(newanchor);
newanchor = document.createElement("a");
newanchor.id='edit';
newanchorimg=document.createElement('img');
newanchorimg.src='/images/edit.gif';
newanchorimg.setAttribute('alt','edit event');
newanchorimg.setAttribute('title','edit event');
newanchorimg.style.marginLeft='10px';
newanchorimg.style.border='none';
newanchor.appendChild(newanchorimg);
x.previousSibling.appendChild(newanchor);
newanchor = document.createElement("a");
newanchor.id='copy';
newanchorimg=document.createElement('img');
newanchorimg.src='/images/copy.gif';
newanchorimg.setAttribute('alt','copy event');
newanchorimg.setAttribute('title','copy event');
newanchorimg.style.border='none';
newanchor.appendChild(newanchorimg);
x.previousSibling.appendChild(newanchor);
newanchor = document.createElement("a");
newanchor.id='send_note';
newanchorimg=document.createElement('img');
newanchorimg.src='/images/email.gif';
newanchorimg.setAttribute('alt','send immediate reminder or invitation');
newanchorimg.setAttribute('title','send immediate reminder or invitation');
newanchorimg.style.border='none';
newanchor.appendChild(newanchorimg);
x.previousSibling.appendChild(newanchor);
var y=$('.dhx_section_time');
newanchor = document.createElement("a");
newanchorimg=document.createElement('img');
newanchor.id='recur';
newanchor.setAttribute('onClick','scheduler.save_lightbox(); alert("Saving any changes you just made..."); return true;');
newanchorimg.src='/images/recur.gif';
newanchorimg.setAttribute('alt','recurring event');
newanchorimg.setAttribute('title','recurring event');
newanchorimg.style.border='none';
newanchorimg.style.margin='0px 25px';
newanchor.appendChild(newanchorimg);
y[0].appendChild(newanchor);
$('.dhx_custom_button').css('marginTop','18px');
}
document.getElementById('import').href='icalendar.php?eventid='+ev.id;
document.getElementById('edit').href='changeeinfo.php?eventid='+ev.id;
document.getElementById('copy').href='changeeinfo.php?copy=1&eventid='+ev.id;
document.getElementById('send_note').href='note_sent.php?eventid='+ev.id;
document.getElementById('recur').href='changeeinfo.php?eventid='+ev.id;
},
get_value:function(node,ev){
ev.sponsorid=node.childNodes[1].value;
ev.categoryid=node.childNodes[3].value;
ev.reminder=node.childNodes[5].checked;
ev.calendarid=node.childNodes[6].value;
return
},
focus:function(node){
var a=node.childNodes[1]; a.focus();
}
}
scheduler.form_blocks.my_editor.button_click=function(index, src, sec, data){
showOptions();
}
scheduler.locale.labels.section_otherdetails="Optional Details";
scheduler.form_blocks["optional_details"]={
render:function(sns){
return "";
},
set_value:function(node,value,ev){
document.getElementById('c_name').value=ev.contact_name||"";
document.getElementById('location').value=ev.location||"";
document.getElementById('c_phone').value=ev.contact_phone||"";
document.getElementById('price').checked=ev.price||"";
document.getElementById('c_email').value=ev.contact_email||"";
document.getElementById('url').value=ev.url||"";
if (ev.contact_name||ev.location||ev.contact_phone||ev.price||ev.contact_email||ev.url){ showOptions(); } else { hideOptions(); }
},
get_value:function(node,ev){
ev.contact_name=document.getElementById('c_name').value;
ev.location=document.getElementById('location').value;
ev.contact_phone=document.getElementById('c_phone').value;
ev.price=document.getElementById('price').value;
ev.contact_email=document.getElementById('c_email').value;
ev.url=document.getElementById('url').value;
return;
},
focus:function(node){
var a=node.childNodes[1]; a.focus();
}
}
scheduler.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:false },
{name:"details", height:23, map_to:"details", type:"my_editor" , focus:true, button:"options" },
{name:"otherdetails", height:23, map_to:"details", type:"optional_details" , focus:false },
//{name:"recurring", height:115, type:"recurring", map_to:"rec_type", button:"recurring"},
{name:"time", height:72, type:"calendar_time", start_on_monday:0, map_to:"auto"}
];
scheduler.templates.event_class=function(start,end,event){
return 's'+event.sponsorid+' c'+event.categoryid;
};
scheduler.templates.calendar_time=scheduler.date.date_to_str("%m-%d-%Y");
scheduler.attachEvent("onXLE", function (){
hideCategories(document.categorylist,'filtercategories');
} );
scheduler.attachEvent("onLightbox", function (event_id){
scheduler.config.start_on_monday=false;
if (scheduler.getEvent(event_id).readonly=='true') {
document.getElementById('details').parentNode.nextSibling.style.display='none';
document.getElementById('details').parentNode.nextSibling.nextSibling.nextSibling.style.display='none';
} else {
document.getElementById('details').parentNode.nextSibling.style.display='inline';
// document.getElementById('details').parentNode.nextSibling.nextSibling.nextSibling.style.display='inline';
}
return;
} );
scheduler.attachEvent("onClick", function (event_id, native_event_object){
if (scheduler.getEvent(event_id).readonly=='true') {
scheduler.config.icons_select=["icon_details"];
} else {
scheduler.config.icons_select=["icon_details"]
}
return true;
} );
scheduler.attachEvent("onEventSave",function(id,data,is_new_event){
if (!data.sponsorid) {
alert("You must select a Family Member");
return false;
}
if (!data.categoryid) {
alert("You must select a Category");
return false;
}
return true;
} );
scheduler.attachEvent("onBeforeViewChange", function(old_mode, old_date, mode , date){
if (mode=='month'){
document.getElementById('calendar_view').style.height='957px';
scheduler.config.start_on_monday =false;
} else {
document.getElementById('calendar_view').style.height='800px';
scheduler.config.start_on_monday =true;
}
return true;
} );
var format = scheduler.date.date_to_str("%D, %F %j");
scheduler.init('scheduler_here',new Date(,-1,),'');
scheduler.setLoadMode("month");
scheduler.load("events.php");
var dp = new dataProcessor("events.php");
dp.init(scheduler);
}