From: Charles Connell Date: Sun, 22 Dec 2013 22:23:34 +0000 (-0500) Subject: Make autocomplete more clear #198 X-Git-Tag: release-20150131~366^2~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3a82dd12757034ea6158e8bd02454a2c7ae26c4d;p=oweals%2Fkarmaworld.git Make autocomplete more clear #198 --- diff --git a/karmaworld/assets/js/add-course.js b/karmaworld/assets/js/add-course.js index f005670..bec4290 100644 --- a/karmaworld/assets/js/add-course.js +++ b/karmaworld/assets/js/add-course.js @@ -19,29 +19,24 @@ $(function() { } } - // Set up the "Add Course" button at bottom - // of page - $('#add-course-btn').click(function() { + 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(); // Put focus in first input field $('#str_school').focus(); - }); + }; + + // Set up the "Add Course" button at bottom + // of page + $('#add-course-btn').click(addCourse); // Set up the "Add Course" button in the // page header - $('#add_course_header_button').click(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(); - // Put focus in first input field - $('#str_school').focus(); - }); + $('#add_course_header_button').click(addCourse); // Dismiss on exit x click FIXME $(".lightbox_close").click(function() { diff --git a/karmaworld/templates/partial/add_course.html b/karmaworld/templates/partial/add_course.html index 590f356..07e37a7 100644 --- a/karmaworld/templates/partial/add_course.html +++ b/karmaworld/templates/partial/add_course.html @@ -24,12 +24,12 @@ School {% if course_form.school.errors %} - * there was an error with this field + Please select a school from the drop-down {% endif %}
- +