Commit fa43409d3e8abf41a440637d2fba23172bbf0bf2

Add class .active to nav
  
6767 }
6868 $(this.$links[pos]).addClass('active');
6969
70 $(this.$links[pos]).find('a p.nav-item-icon').addClass('active');
71 this.updateNavIcon();
70 //$(this.$links[pos]).find('a p.navicon').addClass('active');
71 //this.updateNavIcon();
7272 },
7373 populate: function() {
7474 var item_template = _.template($('#nav-item-template').html());
9090 //Fix it always receive the click event.
9191 navClicked: function(event) {
9292 this.$links.removeClass('active');
93 $('.nav>li>a>p.nav-item-icon').removeClass('active');
93 $('#navpos > li > a').find('p.navicon').removeClass('active');
9494
9595 if(this.model.get('customMenu') === false) {
9696 if(!event) {
101101 pos = 0;
102102 }
103103 $(this.$links[pos]).addClass('active');
104 $(this.$links[pos]).find('p.nav-item-icon').addClass('active');
104 $(this.$links[pos]).find('p.navicon').addClass('active');
105105 }
106106 else {
107107 $(event.currentTarget).parent().addClass('active');
108108 // for maraa custom HTML nav
109 $(event.currentTarget).find('p.nav-item-icon').addClass('active');
109 $(event.currentTarget).find('p.navicon').addClass('active');
110110 }
111111 }
112112 else if(this.model.get('customMenu') === true) {
113 // get the URL fragment
114 var fragment = location.hash.split('/')[1];
115 // find out where it is in the nav menu
116 var link = $('.nav').find('a[href="#/'+ fragment +'"]')[0];
117 // find its <li> parent all the way up in the main ul.nav
118 $(link).closest('ul.nav > li').addClass('active');
119 // custom nav for maraa
120 $(link).closest('ul.nav > li > a').find('p.nav-item-icon').addClass('active');
113 if(event) {
114 // TODO: FIX: BAD HACK!!
115 // Hunt down the bug and fix it!
116 // Bug is: the following statement doesn't get executed in its normal
117 // flow; async does!!
118 setTimeout(function() {
119 $(event.currentTarget).find('p.navicon').addClass('active');
120 }, 100);
121 }
122 else {
123 // get the URL fragment
124 var fragment = location.hash.split('/')[1];
125 // find out where it is in the nav menu
126 var link = $('.nav').find('a[href="#/'+ fragment +'"]')[0];
127 // find its <li> parent all the way up in the main ul.nav
128 $(link).closest('ul.nav > li').addClass('active');
129 // custom nav for maraa
130 $(link).find('p.navicon').addClass('active');
131 }
121132 }
122 this.updateNavIcon();
133 //this.updateNavIcon();
123134 },
124135 navIconPos: {
125136 'home': '-8px',