2012-10-30 5 views
0

저는 mvc3 프로젝트에 DhtmlxScheduler Standard Edition v.3.5를 구현하려고했습니다. http://www.dhtmlx.com/blog/?p=639dhtmlxScheduler with mvc 3

자습서를 읽었습니다. 자습서는 mvc2에 있습니다. 나는 그것을 믿고 난 후 약간의 문제가 있습니다.

내보기 페이지입니다.

@*@Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>";*@ 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" > 
    <head runat="server"> 
    <title>Index</title> 

    <script src="@Url.Content("~/Scripts/dhtmlxscheduler.js")" type="text/javascript"></script> 
    <link href="@Url.Content("~/Scripts/dhtmlxscheduler.css")" rel="stylesheet" type="text/css" /> 

    <style type="text/css"> 
     html, body 
     { 
      height:100%; 
      padding:0px; 
      margin:0px; 
     } 
    </style> 
    <script type="text/javascript"> 
     function init() { 
      scheduler.init("scheduler_here", new Date(2010, 6, 1), "month"); 
     } 
    </script> 
</head> 
<body onload="init()"> 
    <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'> 
     <div class="dhx_cal_navline"> 
      <div class="dhx_cal_prev_button">&nbsp;</div> 
      <div class="dhx_cal_next_button">&nbsp;</div> 
      <div class="dhx_cal_today_button"></div> 
      <div class="dhx_cal_date"></div> 
      <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div> 
      <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div> 
      <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div> 
     </div> 
     <div class="dhx_cal_header"> 
     </div> 
     <div class="dhx_cal_data"> 
     </div> 
    </div> 
</body> 
</html> 

나는 그것이 캘린더를로드하지만 사방에있는 스타일 시트에서이 페이지를 실행, 그래서는 CSS를 추가하고 나는 아무것도 얻을?

+0

아무 의미가 있습니까? 빈 페이지? 이벤트가 없습니까? 개똥 벌레 콘솔에있는 건요? –

답변

0

정확히 무엇이 잘못 되었나요? 이 코드는 페이지 맨 위에 @ {Layout = null;}을 추가해야하는 것을 제외하고 mvc3에서 작동합니다. 스케줄러는 컨테이너의 전체 크기 (div # scheduler_here)를 차지해야합니다. 스케줄러가 페이지의 일부분 만 가져 오도록하려면 "scheduler_here"의 크기를 설정할 수 있습니다. 예 : < div id = "scheduler_here"class = "dhx_cal_container"style = 'width : 960px; margin : 0 auto; height : 100 %; > 도움이 되길 바랍니다.