#global_footer {
line-height: 1.5em;
- margin: 10px 0 20px 0;
-}
-
-#footer-links-container {
- border-top: 1px dashed grey;
+ margin: 20px 0 20px 0;
}
}
span.table-course-name {
- font-size: 2em;
- font-weight: bold;
+ font-size: 1.8em;
}
-table.dataTable tbody tr {
- height: 8em;
+div.table-entry-third-line {
border-bottom: 1px solid grey;
+ padding-bottom: 10px;
}
-td.last-td {
- border-bottom: 1px solid grey;
+div.table-entry-first-line {
+ padding-top: 10px;
}
-#add-course-btn {
- text-transform: uppercase;
- font-size: 2.5em;
- text-align: center;
-}
addCourse = function() {
// Show the add a course form
- $('#add-course-form').show();
- // Hide the add a course button
- $('#add-course-btn').hide();
- // Scroll the user's page to here
- $('#add-course-divider').ScrollTo();
+ $('#add-course-form').dialog("open");
// Put focus in first input field
$('#str_school').focus();
};
// of page
$('#add-course-btn').click(addCourse);
- // Set up the "Add Course" button in the
- // page header
- $('#add_course_header_button').click(addCourse);
+ $('#add-course-form').dialog({
+ autoOpen: false,
+ modal: true,
+ show: { effect: 'fade', duration: 500 },
+ width: 700
+ });
+
+ if (jump_to_form) {
+ $("#add-course-form").dialog("open");
+ }
$("#str_school").autocomplete({
source: function(request, response){
$(function() {
- if (jump_to_form) {
- $("#add-course-form").show();
- $('#add-course-btn').hide();
- document.getElementById('add-course-form').scrollIntoView(true);
- }
-
// load dataTable for course data
var dataTable = $('#data_table_list').dataTable({
// we will set column widths explicitly
{% block bodyscripts %}
{% endblock %}
<!-- end block bodyscripts -->
-<script src="{{ STATIC_URL }}js/jquery-scrollto.min.js" ></script>
<script src="{{ STATIC_URL }}js/opentip-jquery-excanvas.min.js"></script>
</body>
{% block pagescripts %}
<script>
// If there were form errors, open the form and jump to it
- var jump_to_form = {% if jump_to_form %} true {% else%} false {% endif %};
+ var jump_to_form = {% if jump_to_form %}true{% else%}false{% endif %};
+ var json_school_list = "{% url 'json_school_list' %}"
+ var json_school_course_list = "{% url 'json_school_course_list' %}"
+ var json_school_course_instructor_list = "{% url 'json_school_course_instructor_list' %}"
+ var csrf_token = "{{ csrf_token }}";
</script>
- <script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
+ <script src="{{ STATIC_URL }}js/setup-ajax.js"></script>
+ <script src="{{ STATIC_URL }}js/course.js"></script>
+ <script src="{{ STATIC_URL }}js/add-course.js"></script>
<script src="{{ STATIC_URL }}js/course-list.js"></script>
{% endblock %}
+{% block bodyscripts %}
+ <script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
+{% endblock %}
+
{% block content %}
<section id="home_content">
<div id="page_header" class="">
<div id="course-search-bar" class="row">
<div class="small-12 columns">
- <button class="add-course" onclick="$('#add-course-btn').click();">Add a Course</button>
+ <button id="add-course-btn" class="add-course">Add a Course</button>
<input class="search-courses" type="text" placeholder="Search Courses" />
<div id="course-sort-wrapper">
Sort By
</div><!-- .ten columns -->
</div> <!-- .row -->
- <div class="row">
- <div id="add-course-divider" class="small-10 columns small-offset-1"> <hr/> </div>
- </div>
-
- <div class="row">
- <div class="small-12 columns large-10 large-offset-1">
- <div id="add-course-btn">
- <i class="fa fa-arrow-circle-o-up"></i> add a course
- </div>
- {% include 'partial/add_course.html' %}
- </div><!-- .ten columns -->
- </div> <!-- .row -->
-
- <div class="row">
- <div class="small-10 columns small-offset-1"> <hr/> </div>
- </div>
+ {% include 'partial/add_course.html' %}
</section> <!-- #results_content -->
{% endblock %}
-{% block bodyscripts %}
-{% endblock bodyscripts %}
<td class="hide">{{ course.get_popularity }}</td>
<td class="small-12 columns">
- <span class="table-school">{{ course.school.name }}</span> •
- {% if course.department %}<span class="table-department">{{ course.department.name }}</span> • {% endif %}
- <span class="table-instructor">{{ course.instructor_name }}</span>
+ <div class="table-entry-first-line">
+ <span class="table-school">{{ course.school.name }}</span> •
+ {% if course.department %}<span class="table-department">{{ course.department.name }}</span> • {% endif %}
+ <span class="table-instructor">{{ course.instructor_name }}</span>
+ </div>
</td>
<td class="small-12 columns">
- <span class="table-course-name"><a href="{{ course.get_absolute_url }}">{{ course.name }}</a></span>
+ <div class="table-entry-second-line">
+ <span class="table-course-name"><a href="{{ course.get_absolute_url }}">{{ course.name }}</a></span>
+ </div>
</td>
- <td class="small-12 columns last-td">
- <span class="table-note-count">{{ course.file_count }} Notes</span> •
- <span class="table-quiz-count">{{ course.quiz_count }} Quizzes </span> •
- <span class="table-thanks-count">{{ course.get_popularity }} Thanks </span> •
- <span>Updated {{ course.updated_at|date:"b d, o"|capfirst }}</span>
+ <td class="small-12 columns">
+ <div class="table-entry-third-line">
+ <span class="table-note-count">{{ course.file_count }} Notes</span> •
+ <span class="table-quiz-count">{{ course.quiz_count }} Quizzes </span> •
+ <span class="table-thanks-count">{{ course.get_popularity }} Thanks </span> •
+ <span>Updated {{ course.updated_at|date:"b d, o"|capfirst }}</span>
+ </div>
</td>
</tr>
{% load url from future %}
-<script>
- var json_school_list = "{% url 'json_school_list' %}"
- var json_school_course_list = "{% url 'json_school_course_list' %}"
- var json_school_course_instructor_list = "{% url 'json_school_course_instructor_list' %}"
- var csrf_token = "{{ csrf_token }}";
-</script>
-<script src="{{ STATIC_URL }}js/setup-ajax.js"></script>
-<script src="{{ STATIC_URL }}js/course.js"></script>
-<script src="{{ STATIC_URL }}js/add-course.js"></script>
<section id="add-course-form" class="hide">
<form method="POST" action="{% url 'home' %}">