Commit 432c7d48 authored by Zac Wood's avatar Zac Wood

Change instructions for Google Calendar upload, attempt TZ fix

parent 98cd5ae0
Pipeline #3601 passed with stages
in 28 minutes and 15 seconds
......@@ -63,7 +63,7 @@ const initListeners = () => {
const items = Array.from(document.querySelectorAll('.section-item'));
items.forEach(item => (item.onclick = () => remove(item)));
document.getElementById('open-modal-btn').onclick = setUrlInModal;
// document.getElementById('open-modal-btn').onclick = setUrlInModal;
document.getElementById('download-ics').onclick = downloadIcs;
document.getElementById('add-to-system').onclick = addToSystemCalendar;
document.getElementById('save-image').onclick = saveImage;
......
......@@ -60,7 +60,7 @@ const saveImage = () => {
};
const initListeners = () => {
document.getElementById('open-modal-btn').onclick = setUrlInModal;
// document.getElementById('open-modal-btn').onclick = setUrlInModal;
document.getElementById('download-ics').onclick = downloadIcs;
document.getElementById('add-to-system').onclick = addToSystemCalendar;
document.getElementById('save-image').onclick = saveImage;
......
require 'icalendar'
require 'icalendar/tzinfo'
require 'time'
# Creates a iCal object given a list of section ids
......@@ -7,6 +8,10 @@ class Schedule
@cal = Icalendar::Calendar.new
@cal.x_wr_calname = 'GMU Schedule'
tzid = "America/New_York"
tz = TZInfo::Timezone.get tzid
@cal.add_timezone tz.ical_timezone(Time.now)
@course_sections = crns.map { |crn|
CourseSection.latest_by_crn(crn)
}
......
......@@ -4,12 +4,10 @@
<%= javascript_include_tag 'moment.min' %>
<%= stylesheet_link_tag 'fullcalendar.min' %>
<button id="open-modal-btn" type="button" class="btn btn-primary" data-toggle="modal" data-target="#exportModal">
Export Schedule
</button>
<button id="save-image" class="btn btn-secondary">Save as PNG</button>
<button id="save-image" class="btn btn-secondary">Save Image</button>
<div id="calendar"></div>
......@@ -63,10 +61,8 @@ Want to share your schedule with your friends? Send them this link:<br/>
<h5>Google Calendar</h5>
<strong>On desktop:</strong>
<br />
Open your <a href="https://calendar.google.com/">Google Calendar</a>. Click the "Settings" button in the top
right, and then click the Settings tab. In the menu on the left, click "Add calendar" and "From URL". Now,
paste the following link inside the text box: <br />
<code id="calendar-link"></code>
First, download the calendar file using the "Download calendar file" below. Open your <a href="https://calendar.google.com/" target="_blank">Google Calendar</a>. Click the "Settings" button in the top
right, and then click the Settings tab. In the menu on the left, click "Import & export" and "Import". Now, upload the calendar file you downloaded and click "Import".
<br />
<strong>On mobile (Android only):</strong>
<br />
......
......@@ -7,7 +7,7 @@
<button id="open-modal-btn" type="button" class="btn btn-primary" data-toggle="modal" data-target="#exportModal">
Export Schedule
</button>
<button id="save-image" class="btn btn-secondary" onclick="saveImage()">Save as PNG</button>
<button id="save-image" class="btn btn-secondary" onclick="saveImage()">Save Image</button>
<div id="calendar"></div>
......@@ -35,10 +35,8 @@
<h5>Google Calendar</h5>
<strong>On desktop:</strong>
<br />
Open your <a href="https://calendar.google.com/">Google Calendar</a>. Click the "Settings" button in the top
right, and then click the Settings tab. In the menu on the left, click "Add calendar" and "From URL". Now,
paste the following link inside the text box: <br />
<code id="calendar-link"></code>
First, download the calendar file using the "Download calendar file" below. Open your <a href="https://calendar.google.com/" target="_blank">Google Calendar</a>. Click the "Settings" button in the top
right, and then click the Settings tab. In the menu on the left, click "Import & export" and "Import". Now, upload the calendar file you downloaded and click "Import".
<br />
<strong>On mobile (Android only):</strong>
<br />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment