mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-21 15:56:10 +08:00
fix(examples): Small fixes for Send Availability plugin
This commit is contained in:
parent
abb6378bd5
commit
690dca50cb
|
@ -20,10 +20,6 @@ app = Flask(__name__)
|
|||
|
||||
m.init_db()
|
||||
|
||||
@app.route('/', methods=["GET", "POST"])
|
||||
def hello_world():
|
||||
return render_template("success.html")
|
||||
|
||||
|
||||
@app.route('/register-events', methods=["POST"])
|
||||
def register_events():
|
||||
|
@ -154,12 +150,12 @@ def _make_ics(event, etime):
|
|||
evt.add('summary', event.title)
|
||||
evt.add('location', event.location)
|
||||
evt.add('description', event.description)
|
||||
evt.add('dtstart', etime.start)
|
||||
evt.add('dtend', etime.end)
|
||||
evt.add('dtstamp', datetime.now())
|
||||
evt.add('dtstart', etime.start.replace(tzinfo=pytz.UTC))
|
||||
evt.add('dtend', etime.end.replace(tzinfo=pytz.UTC))
|
||||
evt.add('dtstamp', datetime.now(pytz.UTC))
|
||||
|
||||
evt['uid'] = '{timestamp}/{email}'.format(
|
||||
timestamp=time.mktime(datetime.now().timetuple()),
|
||||
timestamp=time.mktime(datetime.now(pytz.UTC).timetuple()),
|
||||
email=event.organizer.email
|
||||
)
|
||||
evt.add('priority', 5)
|
||||
|
|
7
examples/N1-Send-Availability/backend/static/js/moment-timezone-with-data.min.js
vendored
Normal file
7
examples/N1-Send-Availability/backend/static/js/moment-timezone-with-data.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -14,6 +14,7 @@
|
|||
.content {
|
||||
font-size: 18px;
|
||||
margin-top: 20px;
|
||||
color: #AAA;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="title"><span style="color:#AAA">Invitation:</span> {{ event.title }}</h1>
|
||||
<h3 class="location"><span style="color:#AAA">Location:</span> {{ event.location }}</h3>
|
||||
<h1 class="title">{{ event.title }}</h1>
|
||||
<h3 class="location">{{ event.location }}</h3>
|
||||
<div class="description">{{ event.description }}</div>
|
||||
</body>
|
||||
</html>
|
|
@ -2,9 +2,10 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<title>Schedule: {{ event.title }}</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
|
||||
<script src='/static/js/moment.min.js'></script>
|
||||
<script src='/static/js/moment-timezone-with-data.min.js'></script>
|
||||
<style>
|
||||
.selected {
|
||||
background: #8CF;
|
||||
|
@ -45,7 +46,7 @@
|
|||
return {
|
||||
date: moment(e.start*1000).format("dddd, MMM Do"),
|
||||
time: moment(e.start*1000).format("h:mma") + "-" +
|
||||
moment(e.end*1000).format("h:mma"),
|
||||
moment(e.end*1000).format("h:mma")+ " (" + moment().tz(moment.tz.guess()).format("z") + ")",
|
||||
serverKey: e.key
|
||||
};
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<title>Event Scheduled</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
|
||||
<style>
|
||||
.icon {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel='stylesheet' href='fullcalendar/fullcalendar.css' />
|
||||
<script src='nylas://N1-Send-Availability/fullcalendar/lib/jquery.min.js'></script>
|
||||
<script src='nylas://N1-Send-Availability/fullcalendar/lib/moment.min.js'></script>
|
||||
<script src='nylas://N1-Send-Availability/fullcalendar/lib/moment-timezone-with-data.min.js'></script>
|
||||
<script src='nylas://N1-Send-Availability/fullcalendar/fullcalendar.js'></script>
|
||||
|
||||
<script>
|
||||
|
@ -146,7 +147,8 @@
|
|||
start: e.start.unix(),
|
||||
end: e.end.unix(),
|
||||
date: e.start.format("dddd, MMM Do"), //event date, in local timezone
|
||||
time: e.start.format("h:mma")+"-"+e.end.format("h:mma"), //event duration, in local time
|
||||
time: e.start.format("h:mma")+"-"+e.end.format("h:mma")+ //event duration, in local time
|
||||
" ("+moment().tz(moment.tz.guess()).format("z")+")", //local time zone abbrev
|
||||
serverKey: randomId(128) //string to access this time slot on the server
|
||||
}
|
||||
})
|
||||
|
|
7
examples/N1-Send-Availability/fullcalendar/lib/moment-timezone-with-data.min.js
vendored
Normal file
7
examples/N1-Send-Availability/fullcalendar/lib/moment-timezone-with-data.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue