2011-11-04 4 views
0

JSON을 사용하여 전체 일정을로드하고 각 이벤트에 대한 설명을 사용자 지정 매개 변수에 포함시킵니다. eventClick 함수에서 jQuery 대화 상자를 사용하고 싶지만이를 지정하는 방법을 모른다. 여기에 내가하려고하는 것이 있습니다 :어떻게 jQuery 대화 상자에 cal.Event.something을 넣을 수 있습니까?

eventClick: function(calEvent, jsEvent, view) { 

     $("#cal_event").dialog({ 
      title: calEvent.title, 
      content: calEvent.description 
     }); 
} 

"콘텐츠"를 표시 한 곳에서 사용할 대상이 있습니까? 그렇지 않다면 어떻게 대화 상자에 calEvent.description을 가져 옵니까?

도움을 주셔서 감사합니다.

답변

1

생각 나는이 게시물을 읽는 다른 사람들을 돕기 위해이 일을 끝내는 방법을 게시 할 것입니다.

$(document).ready(function() { 
    $('#calendar').fullCalendar({ 
     theme: "true", 
     aspectRatio: 1.8, 
     weekMode: 'liquid', 
     header: { 
      left: "", 
      center: "prev title next", 
      right: "" 
     }, 
     buttonIcons:{ 
      prev: "triangle-1-w", 
      next: "triangle-1-e" 
     }, 
     eventSources: [ 
      { 
       url: 'file1.php', // Event Source One // 
       type: 'POST', 
       error: function() { 
        alert('there was an error while fetching events!'); 
       }, 
       color: '#006600', 
       textColor: 'white' 
      }, 
      { 
       url: 'file2.php', // Event Source Two // 
       type: 'POST', 
       error: function() { 
        alert('there was an error while fetching events!'); 
       }, 
       borderColor: '#006600', 
       color: 'white', 
       textColor: '#333333' 
      } 
     ], 
     eventClick: function(calEvent, jsEvent, view) { 
      $("#dialog_frame").css("visibility", "visible"); 
      $("#dialog_frame").draggable("enable"); 
      $(".dialog_content").html(calEvent.description); 
      $(".dialog_title").html(calEvent.title);   
     } 
    }) 
}); 
:

나는 다음을 사용
관련 문제