|
 |
|
ต้องการดึงข้อมูลวันที่จาก Calendar ให้มาแสดงเป็น pop-up ช่วยทีครับ |
|
 |
|
|
 |
 |
|
1. หา jquery.fancybox มาเพิ่ม
2. ค่าที่ปฏิทินต้องส่ง url มาด้วย เช่น
$json_data[]=array(
"id"=>$rs->id,
"title"=>$rs->name.",".$rs->locate.",".$rs->driver.",".$rs->typecar,
"start"=>$rs->timego,
"end"=>$rs->timeback,
"url"=>"show2.php?id=".$rs->id, //ต้องส่งไปใช้เพื่อจะเปิด pop-up ของ fancybox
"color"=>$color,
3. ที่หน้าหลักกำหนดการใช้งานปฏิทิน
<script type="text/javascript">
jQuery( document ).ready(function() {
//var currentLangCode = 'th';
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
eventLimit: true, // allow "more" link when too many events
defaultDate: new Date(),
//lang: currentLangCode,
timezone: 'Asia/Bangkok',
events: {
url: 'data_events.php',
},
loading: function(bool) {
$('#loading').toggle(bool);
},
eventClick: function(event) {
if (event.url) {
$.fancybox({
'href' : event.url,
'type' : 'iframe',
'autoScale' : false,
'openEffect' : 'elastic',
'openSpeed' : 'fast',
'closeEffect' : 'elastic',
'closeSpeed' : 'fast',
'closeBtn' : true,
onClosed : function() {
parent.location.reload(true);
},
helpers : {
thumbs : {
width : 50,
height : 50
},
overlay : {
css : {
'background' : 'rgba(49, 176, 213, 0.7)'
}
}
}
});
return false;
}
},
});
});
</script>
-----------------------------------------------------------------------------------
4.ถ้าไม่เข้าใจ มี ตย.อื่น ๆ เช่น
http://www.mikesmithdev.com/blog/jquery-full-calendar-with-ui-modal-dialog/
5.ใช้คำค้นเพิ่มเติมบน google ว่า full calendar add popup แล้วค่อย ๆ หาอ่านว่าของเรากำหนดรูปแบบปฏิทินเหมือนอันไหน
โชคดี!!
|
 |
 |
 |
 |
Date :
2015-06-10 10:44:17 |
By :
apisitp |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|