강상위

머지준비

......@@ -125,7 +125,18 @@ module.exports = function(app, Users)
// 나만의 시간표
app.get("/timetable", function(req, res)
{
res.render("timetable");
var program_list =
[
{
content: '런닝맨',
endDate: new Date(2018, 11, 9, 5, 45),
startDate: new Date(2018, 11, 9, 1, 30),
disabled: true
}
];
res.render("timetable", {pl: JSON.stringify(program_list)});
});
}
......
<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>
<div id="wrapper">
<div id="myScheduler"></div>
</div>
<script>
setTimeout(() =>
{
YUI().use('aui-scheduler',
function(Y)
{
// code goes here
//console.log(<%- pl %>);
var events =
[
{
content: '런닝맨',
endDate: new Date(2018, 11, 9, 5, 45),
content: '<%- pl[0].content%>',
endDate: new Date(2018, 11, 9, 5, 30),
startDate: new Date(2018, 11, 9, 1, 30),
disabled: true
}
......@@ -34,8 +34,6 @@
}
);
}
);
</script>
</body>
</html>
\ No newline at end of file
});
}, 1000);
</script>
\ No newline at end of file
......
......@@ -8,6 +8,7 @@
<% if(val[3] == true) { %>
<li><%= val[4] %></li>
<li><%= val[5] %></li>
<button>추가</button>
<% } %>
<% }) %>
</div>
\ No newline at end of file
......
<html>
<head>
<title>My Timetable</title>
<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>
<% include ./navigation_main.ejs %>
......