Showing
6 changed files
with
50 additions
and
38 deletions
File moved
... | @@ -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 |
15 | - var events = | 12 | + |
16 | - [ | 13 | + //console.log(<%- pl %>); |
17 | - { | 14 | + |
18 | - content: '런닝맨', | 15 | + var events = |
19 | - endDate: new Date(2018, 11, 9, 5, 45), | 16 | + [ |
20 | - startDate: new Date(2018, 11, 9, 1, 30), | 17 | + { |
21 | - disabled: true | 18 | + content: '<%- pl[0].content%>', |
22 | - } | 19 | + endDate: new Date(2018, 11, 9, 5, 30), |
23 | - ]; | 20 | + startDate: new Date(2018, 11, 9, 1, 30), |
21 | + disabled: true | ||
22 | + } | ||
23 | + ]; | ||
24 | 24 | ||
25 | - var weekView = new Y.SchedulerWeekView(); | 25 | + var weekView = new Y.SchedulerWeekView(); |
26 | 26 | ||
27 | - myScheduler = new Y.Scheduler( | 27 | + myScheduler = new Y.Scheduler( |
28 | - { | 28 | + { |
29 | - boundingBox: '#myScheduler', | 29 | + boundingBox: '#myScheduler', |
30 | - date: new Date(Date.now().getYear, Date.now().getMonth, Date.now().getDay), | 30 | + date: new Date(Date.now().getYear, Date.now().getMonth, Date.now().getDay), |
31 | - items: events, | 31 | + items: events, |
32 | - render: true, | 32 | + render: true, |
33 | - views: [weekView] | 33 | + views: [weekView] |
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 %> | ... | ... |
-
Please register or login to post a comment