Skip to content

Commit

Permalink
Fix navigation icon
Browse files Browse the repository at this point in the history
  • Loading branch information
chapel committed Nov 20, 2011
1 parent eee5213 commit d1b04de
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
10 changes: 5 additions & 5 deletions public/index.html
Expand Up @@ -35,12 +35,12 @@
</nav>
<nav id="main-nav" class="small">
<ul>
<li id=course_link><a href="/schools" class="active"><em class="icon"></em>Courses</a></li>
<li><a href="/schools" id=school_link class="nav"><em class="icon"></em>Courses</a></li>
<li><a href="http://blog.finalsclub.org"><em class="icon"></em>Blog</a></li>
<li id=archive_link><a href="/archive"><em class="icon"></em>Library</a></li>
<li id=press_link><a href="/press"><em class="icon"></em>Press</a></li>
<li id=register_link><a href="/register"><em class="icon"></em>Register</a></li>
<li id=profile_link><a href="/profile"><em class="icon"></em>Profile</a></li>
<li><a href="/archive" id=archive_link class="nav"><em class="icon"></em>Library</a></li>
<li><a href="/press" id=press_link class="nav"><em class="icon"></em>Press</a></li>
<li><a href="/register" id=register_link class="nav"><em class="icon"></em>Register</a></li>
<li><a href="/profile" id=profile_link class="nav"><em class="icon"></em>Profile</a></li>
<!-- li><a href="#" class="donate"><em class="icon"></em><em class="lc yellow">Donate</em></a></li -->
</ul>
</nav>
Expand Down
15 changes: 14 additions & 1 deletion public/javascripts/main.js
Expand Up @@ -29,6 +29,7 @@ var router = {
}
},
run: function(name, path) {
$('.nav').removeClass('active');
checkUser(function() {
if (router.routes[name].useAjax) {
$.get(path, {cache: false}, function(data) {
Expand Down Expand Up @@ -99,6 +100,7 @@ router.add('404', false, function() {

router.add('home', false, function(cb) {
$('#learnsomething').unbind();
$('.nav').removeClass('active');
cb("home");
$('#learnsomething').click(function(e) {
$.get('/learn/random', function(data) {
Expand All @@ -116,7 +118,7 @@ router.add('home', false, function(cb) {

// go to the page that lists the schools
router.add('schools', function(data, cb) {

$('#school_link').addClass('active');
var response = {
id: 'school',
data: data.schools
Expand All @@ -129,6 +131,7 @@ router.add('schools', function(data, cb) {

// go to the page that lists the courses for a specific school
router.add('school', function(data, cb) {
$('#school_link').addClass('active');
$('.sub_menu').hide();
$('#new_course').unbind();
$('#form_course').hide().unbind();
Expand Down Expand Up @@ -171,6 +174,7 @@ router.add('school', function(data, cb) {

// go to the page that lists the lectures for a specific course
router.add('course', function(data, cb) {
$('#school_link').addClass('active');
$('.sub_menu').hide();
$('#new_lecture').unbind();
$('#form_lecture').hide().unbind();;
Expand Down Expand Up @@ -240,6 +244,7 @@ router.add('course', function(data, cb) {

// go to the page that lists the note taking sessions for a specific lecture
router.add('lecture', function(data, cb) {
$('#school_link').addClass('active');
$('.sub_menu').hide();
$('#new_note').unbind();
$('#form_note').hide().unbind();;
Expand Down Expand Up @@ -304,6 +309,7 @@ router.add('lecture', function(data, cb) {

// go to the page that lists the archived subject names
router.add('archive', function(data, cb) {
$('#archive_link').addClass('active');

var response = {
id: 'archive_subject',
Expand All @@ -316,6 +322,8 @@ router.add('archive', function(data, cb) {


router.add('archivesubject', function(data, cb) {
$('.nav').removeClass('active');
$('#archive_link').addClass('active');

var response = {
id: 'archive_course',
Expand All @@ -328,6 +336,7 @@ router.add('archivesubject', function(data, cb) {


router.add('archivecourse', function(data, cb) {
$('#archive_link').addClass('active');

var response = {
id: 'archive_note',
Expand All @@ -340,6 +349,7 @@ router.add('archivecourse', function(data, cb) {


router.add('archivenote', function(data, cb) {
$('#archive_link').addClass('active');

var response = {
id: 'archive_note_display',
Expand All @@ -353,6 +363,7 @@ router.add('archivenote', function(data, cb) {

// go to the account registration page
router.add('register', false, function(cb) {
$('#register_link').addClass('active');
$('#form_register').submit(function(e) {
e.preventDefault();

Expand All @@ -377,6 +388,7 @@ router.add('activate', function(data, cb) {
});

router.add('profile', false, function(cb) {
$('#profile_link').addClass('active');
var form = $('#form_profile');
$('input[type=password]','#form_profile').val('');
$('#affiliation').attr('value', user.affil);
Expand Down Expand Up @@ -466,6 +478,7 @@ router.add('resetpw', false, function(cb) {

// go to the press articles page
router.add('press', false, function(cb) {
$('#press_link').addClass('active');
cb("press");
});

Expand Down

0 comments on commit d1b04de

Please sign in to comment.