강상위

머지준비

...@@ -125,7 +125,18 @@ module.exports = function(app, Users) ...@@ -125,7 +125,18 @@ module.exports = function(app, Users)
125 // 나만의 시간표 125 // 나만의 시간표
126 app.get("/timetable", function(req, res) 126 app.get("/timetable", function(req, res)
127 { 127 {
128 - res.render("timetable"); 128 +
129 + var program_list =
130 + [
131 + {
132 + content: '런닝맨',
133 + endDate: new Date(2018, 11, 9, 5, 45),
134 + startDate: new Date(2018, 11, 9, 1, 30),
135 + disabled: true
136 + }
137 + ];
138 +
139 + res.render("timetable", {pl: JSON.stringify(program_list)});
129 }); 140 });
130 141
131 } 142 }
......
1 -<html> 1 +
2 - <head> 2 +<div id="wrapper">
3 - <script src="https://cdn.alloyui.com/3.0.1/aui/aui-min.js"></script> 3 +<div id="myScheduler"></div>
4 - <link href="https://cdn.alloyui.com/3.0.1/aui-css/css/bootstrap.min.css" rel="stylesheet"></link> 4 +</div>
5 - </head> 5 +<script>
6 -<body> 6 + setTimeout(() =>
7 - <div id="wrapper"> 7 + {
8 - <div id="myScheduler"></div>
9 - </div>
10 - <script>
11 YUI().use('aui-scheduler', 8 YUI().use('aui-scheduler',
12 function(Y) 9 function(Y)
13 { 10 {
14 // code goes here 11 // code goes here
12 +
13 + //console.log(<%- pl %>);
14 +
15 var events = 15 var events =
16 [ 16 [
17 { 17 {
18 - content: '런닝맨', 18 + content: '<%- pl[0].content%>',
19 - endDate: new Date(2018, 11, 9, 5, 45), 19 + endDate: new Date(2018, 11, 9, 5, 30),
20 startDate: new Date(2018, 11, 9, 1, 30), 20 startDate: new Date(2018, 11, 9, 1, 30),
21 disabled: true 21 disabled: true
22 } 22 }
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
34 } 34 }
35 ); 35 );
36 36
37 - }
38 - );
39 - </script>
40 -</body>
41 -</html>
...\ No newline at end of file ...\ No newline at end of file
37 + });
38 + }, 1000);
39 +</script>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
8 <% if(val[3] == true) { %> 8 <% if(val[3] == true) { %>
9 <li><%= val[4] %></li> 9 <li><%= val[4] %></li>
10 <li><%= val[5] %></li> 10 <li><%= val[5] %></li>
11 + <button>추가</button>
11 <% } %> 12 <% } %>
12 <% }) %> 13 <% }) %>
13 </div> 14 </div>
...\ No newline at end of file ...\ No newline at end of file
......
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>My Timetable</title> 3 <title>My Timetable</title>
4 + <script src="https://cdn.alloyui.com/3.0.1/aui/aui-min.js"></script>
5 + <link href="https://cdn.alloyui.com/3.0.1/aui-css/css/bootstrap.min.css" rel="stylesheet"></link>
4 </head> 6 </head>
5 <body> 7 <body>
6 <% include ./navigation_main.ejs %> 8 <% include ./navigation_main.ejs %>
......