Team:NTU-Taida/Templates/Footer
From 2012.igem.org
(Difference between revisions)
(add login function) |
m |
||
Line 9: | Line 9: | ||
}); | }); | ||
- | + | iif ($('#pt-logout').length){ | |
// login | // login | ||
- | |||
- | |||
- | |||
- | |||
$('.dropdown-toggle').dropdown(); | $('.dropdown-toggle').dropdown(); | ||
+ | $('#nav-login').text($('#pt-userpage').text()).append('<b class="caret"></b>'); | ||
+ | $('#nav-edit').attr('href',$('#menubar.left-menu > ul > li > a[href$="edit"]').attr('href')); | ||
+ | $('#nav-history').attr('href',$('#menubar.left-menu > ul > li > a[href$="history"]').attr('href')); | ||
+ | $('#nav-logout').attr('href',$('#pt-logout > a').attr('href')); | ||
}else{ | }else{ | ||
// not login | // not login | ||
$('#nav-usermenu').remove(); | $('#nav-usermenu').remove(); | ||
- | $('#nav-login').attr('href',$('#pt-login > a').href); | + | $('#nav-login').attr('href',$('#pt-login > a').attr('href')); |
} | } | ||
+ | |||
}); | }); | ||
</script> | </script> | ||
</html> | </html> |