$(document).ready(function(){
var month;
var c = {
change:function(o1, lx){
mobj.fanmonth(lx);
},
nowchange:function(){
mobj.nowmonth();
},
plusadd:function(){
openinput('日程','schedule','','wfhoew{rand}');
},
loadschedule:function(){ // 改為 loadcustplan
$.get(js.getajaxurl('loadschedule','{mode}','{dir}', {month:month}), function(da){ // 改為 loadcustplan
for(var d1 in da){
var s='',s1,d=da[d1],i;
for(i=0;i<d.length;i++){
s+='<div onclick="openreng_{rand}('+d[i].id+')" style="height:20px;line-height20px;overflow:hidden;cursor:pointer">'+(i+1)+'.['+d[i].time.substr(11,5)+']'+d[i].explain+'</div>';
}
$('#s'+d1+'_{rand}').html('<div style="border-top:1px #eeeeee solid;margin-top:3px;">'+s+'</div>');
}
},'json');
},
};
wfhoew{rand}=function(){
c.loadschedule(); // 改為 loadcustplan
}
openreng_{rand}=function(id1){
openxiangs('日程','schedule', id1); // 改為 custplan
}
var mobj = $('#veiw_{rand}').rockcalendar({
height:viewheight-80,
changemonth:function(y, m){
$('#nowmonth_{rand}').html(''+y+'年'+xy10(m)+'月');
month = ''+y+'-'+xy10(m)+'';
c.loadschedule(); // 改為 loadcustplan
},
renderer:function(dt, s, d){
var v = s;
v+='<div style="font-size:12px;" id="s'+dt+'_{rand}"></div>';
return v;
}
});
js.initbtn(c);
});