Hello,
I have created a page to use with Mobile Scheduler and Rails 4.
<html>
<head>
<%=stylesheet_link_tag "dhxscheduler_mobile"%>
<%=javascript_include_tag "dhxscheduler_mobile"%>
<%= csrf_meta_tags %>
<style type="text/css" media="screen">
html, body{
margin:0px;
padding:0px;
height:100%;
overflow:hidden;
}
</style>
<script type="text/javascript">
scheduler.config.init_date = new Date();
scheduler.config.readonly_form = true;
var data = <%=raw @class_list.to_json%>;
dhx.ready(function() {
dhx.ui.fullScreen();
dhx.ui({
view: "scheduler",
id: "scheduler",
save: data
});
$$("scheduler").load(data, "json");
});
</script>
</head>
<body>
</body>
</html>
This is an example of what @class_list.to_json results in:
[{“id”:13,“text”:“Class”,“start_date”:“2014-03-31 06:00:00”,“end_date”:“2014-03-31 07:00:00”}]
Safari on iOS 7 gets an error: Failed to load resource: the server responded with a status of 404 (Not Found) localhost:3000/[object%20Object]. I am not sure what I am doing wrong here.