Commit cb127d47 by Brian Talbot

studio - page headers: revised where new course form fields are placed in dashboard

parent c5d041a7
...@@ -640,9 +640,10 @@ function addNewCourse(e) { ...@@ -640,9 +640,10 @@ function addNewCourse(e) {
e.preventDefault(); e.preventDefault();
$(e.target).hide(); $(e.target).hide();
$('.content .introduction').hide();
var $newCourse = $($('#new-course-template').html()); var $newCourse = $($('#new-course-template').html());
var $cancelButton = $newCourse.find('.new-course-cancel'); var $cancelButton = $newCourse.find('.new-course-cancel');
$('.new-course-button').after($newCourse); $('.inner-wrapper').prepend($newCourse);
$newCourse.find('.new-course-name').focus().select(); $newCourse.find('.new-course-name').focus().select();
$newCourse.find('form').bind('submit', saveNewCourse); $newCourse.find('form').bind('submit', saveNewCourse);
$cancelButton.bind('click', cancelNewCourse); $cancelButton.bind('click', cancelNewCourse);
...@@ -681,6 +682,7 @@ function saveNewCourse(e) { ...@@ -681,6 +682,7 @@ function saveNewCourse(e) {
function cancelNewCourse(e) { function cancelNewCourse(e) {
e.preventDefault(); e.preventDefault();
$('.new-course-button').show(); $('.new-course-button').show();
$('.content .introduction').show();
$(this).parents('section.new-course').remove(); $(this).parents('section.new-course').remove();
} }
......
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