fixed login issue on courses page, tmpl issues
authorSeth Woodworth <seth@sethish.com>
Wed, 29 Feb 2012 05:54:18 +0000 (00:54 -0500)
committerSeth Woodworth <seth@sethish.com>
Wed, 29 Feb 2012 05:54:18 +0000 (00:54 -0500)
public/index.html
public/javascripts/main.js

index adf6ecd6f272a2c79ba81474d3329574ebd653fb..210f58877307e128a1a7746f79d22b598fa53cf4 100644 (file)
                         <h1><span id=school_name></span> Courses</h1>
                     </header>
 
-                    <div id="main-content">
+                    <div class="main-content">
                         <span class="sub_menu" style="display:none;"></span>
 
                         <script id="courseTmpl" type="text/x-jquery-tmpl">
                             </aside>
                         </div> <!-- .course -->
                         </script>
-                        <!--
-                        <div class="proto course" id=PROTO_course>
-                            <div class="course-content">
-                                <a class="course-name" href="/course/___id__">__number__: __name__</a>
-                                <p class="course-description">
-                                    This is placeholder description text, an intro to description in the nature of things that is quite and very and yes!</p>
-                                <div class=dept>__department__</div>
-                            </div>
-                            <aside class="course-data">
-                                <div class="course-data-item">
-                                    <div class="course-data-number">20</div>
-                                    <div class="course-data-description">notes</div>
-                                </div>
-                            </aside>
-                        </div>
-                        -->
-
                     </div>
                                                                                <div class="sidebar">
                                                                                        <form method="POST" id="form_course" style="display:none;">
index 26ea950b1c3e6dc71478c9fa6e8673b736ba442c..a7dc550fbb9a72ee90ac13fcba8641428e705b67 100644 (file)
@@ -191,12 +191,14 @@ router.add('schools', function(data, cb) {
 
 // go to the page that lists the courses for a specific school
 router.add('school', function(data, cb) {
+  console.log(data);
   $('#school_link').addClass('active');
-  $('.sub_menu').hide();
+  tmpl_render();
+  //$('.sub_menu').hide();
   //$('#new_course').unbind();
   $('#form_course').hide().unbind();
 
-  response = {
+  var response = {
     id: 'course',
     data: data.school.courses
   }
@@ -205,12 +207,14 @@ router.add('school', function(data, cb) {
       $('#g-footer').fadeIn();
   });
   $("#school_name").html(data.school.name);
+  $('#courseTmpl').tmpl( data.school.courses ).appendTo("#pg_courses .main-content");
 
   if (data.school.authorized) {
-    $('.sub_menu').show();
+    console.log("data school is authorized partner!");
+    //$('.sub_menu').show();
     var form = $('#form_course');
 
-    form.toggle();
+    form.show();
 
     form.submit(function(e) {
       e.preventDefault();
@@ -227,7 +231,6 @@ router.add('school', function(data, cb) {
     })
   }
 
-  $('#courseTmpl').tmpl( data.school.courses ).appendTo("#pg_courses #main-content");
 });
 
 // go to the page that lists the lectures for a specific course