Commit a5d74531 authored by Zac Wood's avatar Zac Wood
Browse files

Move some global JS from html to application.js

parent 3918e500
......@@ -22,3 +22,11 @@ const elementFromString = string => {
const html = new DOMParser().parseFromString(string, 'text/html');
return html.body.firstChild;
};
document.addEventListener('DOMContentLoaded', () => {
this.schedule = new Schedule();
});
document.addEventListener('turbolinks:load', () => {
FontAwesome.dom.i2svg();
});
......@@ -17,14 +17,4 @@
<%= yield %>
<%= render partial: 'shared/cart'%>
</body>
<%= javascript_tag do %>
document.addEventListener('DOMContentLoaded', () => {
this.schedule = new Schedule();
});
document.addEventListener('turbolinks:load', () => {
FontAwesome.dom.i2svg();
});
<% end %>
</html>
<% expanded = false unless defined? expanded %>
<div class="card" id="course-<%= course.id %>" onclick="toggleSections(this)" data-course="<%= course.to_json %>">
<div class="card" id="course-<%= course.id %>" onclick="toggleSections(this)">
<div class="card-body">
<div>
<h3 style="float: left"><%= "#{course.subject} #{course.course_number}" %></h3>
......
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