Skip to content
Browse files

Moved the attendee name to the right side of the menubar, moved logou…

…t to a dropdown under name
  • Loading branch information...
1 parent c31b622 commit a94bc9e1f952afdcb23f6d512fbd7a8141f27e9b @senior senior committed
Showing with 9 additions and 14 deletions.
  1. +9 −14 public/javascripts/application.js
View
23 public/javascripts/application.js
@@ -1,10 +1,9 @@
$(document).ready(function() {
if (typeof attendee_login_enabled != 'undefined') {
if(username === '') {
- SL.appendNav('Login', login_path);
+ SL.appendNav(SL.listLink('Login', login_path));
} else {
- SL.prependNav(username, attendee_path);
- SL.appendNav('Log Out', logout_path);
+ SL.appendNav( SL.listLink(username, attendee_path).append($('<ul/>' , { html : SL.listLink('Log Out', logout_path)})));
}
$('#flash_notice').delay(5000).fadeOut('fast');
@@ -12,19 +11,15 @@ $(document).ready(function() {
});
var SL = function() {
- function listLink(text, path) {
- return $('<li/>', {
- html : $('<a/>', {
- html : $('<span/>', { html: text })
- }).attr('href', path)});
- };
-
return {
- prependNav : function(text, path) {
- listLink(text, path).prependTo($('#menu > ul'));
+ listLink : function(text, path) {
+ return $('<li/>', {
+ html : $('<a/>', {
+ html : $('<span/>', { html: text })
+ }).attr('href', path)});
},
- appendNav : function(text, path) {
- listLink(text, path).appendTo($('#menu > ul'));
+ appendNav : function(item) {
+ item.appendTo($('#menu > ul'));
}
};
}();

0 comments on commit a94bc9e

Please sign in to comment.
Something went wrong with that request. Please try again.