강상위

Feature Skeleton - AlloyUI Scheduler

- 방송 시간표 표시를 위한 AlloyUI Scheduler 테스트
......@@ -122,6 +122,11 @@ module.exports = function(app, Users)
res.render("programs", {programs: program_list});
});
// 나만의 시간표
app.get("/timetable", function(req, res)
{
res.render("timetable");
});
}
......
<html>
<head>
<script src="https://cdn.alloyui.com/3.0.1/aui/aui-min.js"></script>
<link href="https://cdn.alloyui.com/3.0.1/aui-css/css/bootstrap.min.css" rel="stylesheet"></link>
</head>
<body>
<div id="wrapper">
<div id="myScheduler"></div>
</div>
<script>
YUI().use('aui-scheduler',
function(Y)
{
// code goes here
var events =
[
{
content: '런닝맨',
endDate: new Date(2018, 11, 9, 5, 45),
startDate: new Date(2018, 11, 9, 1, 30),
disabled: true
}
];
var weekView = new Y.SchedulerWeekView();
myScheduler = new Y.Scheduler(
{
boundingBox: '#myScheduler',
date: new Date(Date.now().getYear, Date.now().getMonth, Date.now().getDay),
items: events,
render: true,
views: [weekView]
}
);
}
);
</script>
</body>
</html>
\ No newline at end of file
<div class="contents_main">
<h1>This is TimeTable</h1>
<table border="1">
<tr>
<td>*</td>
<td>월</td>
<td>화</td>
<td>수</td>
<td>목</td>
<td>금</td>
<td>토</td>
<td>일</td>
</tr>
<% for(var i=0; i<=24; i++) { %>
<tr>
<td><%=i %></td>
<% for(var j=1; j<=7; j++) { %>
<td><%=j %></td>
<% } %>
</tr>
<% } %>
</table>
</div>
\ No newline at end of file
......@@ -2,5 +2,5 @@
<a href="/logout"><button>로그아웃</button></a>
<a href="/main"><button>검색</button></a>
<a href="/mypage"><button>마이페이지</button></a>
<button>나만의시간표</button>
<a href="/timetable"><button>나만의시간표</button></a>
</div>
\ No newline at end of file
......
<html>
<head>
<title>My Timetable</title>
</head>
<body>
<% include ./navigation_main.ejs %>
<% include ./alloyscheulertest.ejs %>
</body>
</html>
\ No newline at end of file