강상위

Feature Skeleton - AlloyUI Scheduler

- 방송 시간표 표시를 위한 AlloyUI Scheduler 테스트
...@@ -122,6 +122,11 @@ module.exports = function(app, Users) ...@@ -122,6 +122,11 @@ module.exports = function(app, Users)
122 res.render("programs", {programs: program_list}); 122 res.render("programs", {programs: program_list});
123 }); 123 });
124 124
125 + // 나만의 시간표
126 + app.get("/timetable", function(req, res)
127 + {
128 + res.render("timetable");
129 + });
125 130
126 } 131 }
127 132
......
1 +<html>
2 + <head>
3 + <script src="https://cdn.alloyui.com/3.0.1/aui/aui-min.js"></script>
4 + <link href="https://cdn.alloyui.com/3.0.1/aui-css/css/bootstrap.min.css" rel="stylesheet"></link>
5 + </head>
6 +<body>
7 + <div id="wrapper">
8 + <div id="myScheduler"></div>
9 + </div>
10 + <script>
11 + YUI().use('aui-scheduler',
12 + function(Y)
13 + {
14 + // code goes here
15 + var events =
16 + [
17 + {
18 + content: '런닝맨',
19 + endDate: new Date(2018, 11, 9, 5, 45),
20 + startDate: new Date(2018, 11, 9, 1, 30),
21 + disabled: true
22 + }
23 + ];
24 +
25 + var weekView = new Y.SchedulerWeekView();
26 +
27 + myScheduler = new Y.Scheduler(
28 + {
29 + boundingBox: '#myScheduler',
30 + date: new Date(Date.now().getYear, Date.now().getMonth, Date.now().getDay),
31 + items: events,
32 + render: true,
33 + views: [weekView]
34 + }
35 + );
36 +
37 + }
38 + );
39 + </script>
40 +</body>
41 +</html>
...\ No newline at end of file ...\ No newline at end of file
1 +<div class="contents_main">
2 + <h1>This is TimeTable</h1>
3 + <table border="1">
4 + <tr>
5 + <td>*</td>
6 + <td>월</td>
7 + <td>화</td>
8 + <td>수</td>
9 + <td>목</td>
10 + <td>금</td>
11 + <td>토</td>
12 + <td>일</td>
13 + </tr>
14 + <% for(var i=0; i<=24; i++) { %>
15 + <tr>
16 + <td><%=i %></td>
17 + <% for(var j=1; j<=7; j++) { %>
18 + <td><%=j %></td>
19 + <% } %>
20 + </tr>
21 + <% } %>
22 +
23 + </table>
24 +</div>
...\ No newline at end of file ...\ No newline at end of file
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
2 <a href="/logout"><button>로그아웃</button></a> 2 <a href="/logout"><button>로그아웃</button></a>
3 <a href="/main"><button>검색</button></a> 3 <a href="/main"><button>검색</button></a>
4 <a href="/mypage"><button>마이페이지</button></a> 4 <a href="/mypage"><button>마이페이지</button></a>
5 - <button>나만의시간표</button> 5 + <a href="/timetable"><button>나만의시간표</button></a>
6 </div> 6 </div>
...\ No newline at end of file ...\ No newline at end of file
......
1 +<html>
2 +<head>
3 + <title>My Timetable</title>
4 +</head>
5 +<body>
6 + <% include ./navigation_main.ejs %>
7 + <% include ./alloyscheulertest.ejs %>
8 +</body>
9 +</html>
...\ No newline at end of file ...\ No newline at end of file