From: Seth Woodworth Date: Fri, 16 Dec 2011 10:43:14 +0000 (+0000) Subject: showing create course if auth\'ed and moving it to the right X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c82bbd02b1c3f62450a035afd84bc82f90824d87;p=oweals%2Ffinalsclub.git showing create course if auth\'ed and moving it to the right --- diff --git a/public/assets/css/screen.css b/public/assets/css/screen.css index ca4a2fb..56d10d7 100755 --- a/public/assets/css/screen.css +++ b/public/assets/css/screen.css @@ -704,6 +704,14 @@ div.content h1 { margin-bottom: 1em; } +#pg_courses { + min-height:700px; +} +#pg_courses #right { + float:right; + width:500px; +} + .note, .notes_instructor, .notes_head { margin: 1.0em 0; } diff --git a/public/index.html b/public/index.html index 1789911..b0503e7 100644 --- a/public/index.html +++ b/public/index.html @@ -128,15 +128,8 @@

Courses for

-
-
__department__
- -
+
+
__department__
+ +
diff --git a/public/javascripts/main.js b/public/javascripts/main.js index bae30c0..0aafffe 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -136,7 +136,7 @@ router.add('schools', function(data, cb) { router.add('school', function(data, cb) { $('#school_link').addClass('active'); $('.sub_menu').hide(); - $('#new_course').unbind(); + //$('#new_course').unbind(); $('#form_course').hide().unbind(); var response = { id: 'course', @@ -147,27 +147,23 @@ router.add('school', function(data, cb) { if (data.school.authorized) { $('.sub_menu').show(); - $('#new_course').click(function(e) { - e.preventDefault(); - - var form = $('#form_course'); + var form = $('#form_course'); - form.toggle(); + form.toggle(); - form.submit(function(e) { - e.preventDefault(); + form.submit(function(e) { + e.preventDefault(); - $.post(window.location.pathname, form.serialize(), function(data) { - if (data.status === 'error') { - message('error', data.message); - } else if (data.status === 'ok') { - form.hide(); - goPage(window.location.pathname); - message('info', data.message); - } - }); - }) - }); + $.post(window.location.pathname, form.serialize(), function(data) { + if (data.status === 'error') { + message('error', data.message); + } else if (data.status === 'ok') { + form.hide(); + goPage(window.location.pathname); + message('info', data.message); + } + }); + }) } cb("courses", response) });