mirror of https://github.com/espruino/BangleApps
Update interface.html
parent
aaee5f3c06
commit
be7af68455
|
@ -1,61 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
html, body, #map {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
#controls {
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
border: 1px solid black;
|
||||
position:absolute;
|
||||
right:0px;bottom:0px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
z-index: 100;
|
||||
}
|
||||
</style>
|
||||
<div id="controls">
|
||||
<p>Create your events on the current week. Keep in note that your events repeat weekly.</p>
|
||||
<p>One you have created your events, Click <button id="upload" class="btn btn-primary">Upload</button></p>
|
||||
<p>All day events are not supported. A feature that lets you get the calendar from your watch will be added in a future update.</p>
|
||||
</div>
|
||||
<meta charset='utf-8' />
|
||||
<link rel="stylesheet" href="../../css/spectre.min.css">
|
||||
<link href='fullcalendar/main.css' rel='stylesheet' />
|
||||
<script src='fullcalendar/main.js'></script>
|
||||
<script src="../../core/lib/customize.js"></script>
|
||||
<script>
|
||||
|
||||
var calendarEvents = calendar.getEvents();
|
||||
let schedule = []
|
||||
|
||||
for(i=0;i>calendarEvents.length;i++){
|
||||
var calendarEntry = {}
|
||||
calendarEntry['cn'] = calendarEvents[i].title;
|
||||
calendarEntry['dow'] = calendarEvents[i].start.getDate();
|
||||
calendarEntry['sh'] = calendarEvents[i].start.getHours();
|
||||
calendarEntry['sm'] = calendarEvents[i].start.getMinutes();
|
||||
calendarEntry['eh'] = calendarEvents[i].end.getHours();
|
||||
calendarEntry['em'] = calendarEvents[i].end.getMinutes();
|
||||
schedule.push(calendarEntry)
|
||||
}
|
||||
|
||||
content = schedule
|
||||
|
||||
document.getElementById("upload").addEventListener("click", function() {
|
||||
sendCustomizedApp({
|
||||
id : "schoolCalender",
|
||||
storage:[
|
||||
{"name":"customFile.app.json",url:"app.js",content:content}
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var calendarEl = document.getElementById('calendar');
|
||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||
|
|
Loading…
Reference in New Issue