# HG changeset patch # User bsw # Date 1340223689 -7200 # Node ID 95f214d9195640e63ee70c69467b4274ef33226d # Parent b489613c99d52c90f37b169ea3750f3560b370e6 Fixed member drop down menu diff -r b489613c99d5 -r 95f214d91956 app/main/_filter_view/30_navigation.lua --- a/app/main/_filter_view/30_navigation.lua Wed Jun 20 21:32:02 2012 +0200 +++ b/app/main/_filter_view/30_navigation.lua Wed Jun 20 22:21:29 2012 +0200 @@ -43,45 +43,48 @@ module = 'index', view = 'reset_password' } - else + end +end) - ui.container{ attr = { class = "navigation_right" }, content = function() + +if app.session.member_id then - if app.session.member_id then - ui.container{ attr = { class = "member_menu" }, content = function() - ui.container{ attr = { class = "title" }, content = function() - ui.link{ - content = function() - execute.view{ - module = "member_image", - view = "_show", - params = { - member = app.session.member, - image_type = "avatar", - show_dummy = true, - class = "micro_avatar", + slot.select('navigation_right', function() + if app.session.member_id then + ui.tag{ + tag = "ul", + attr = { id = "member_menu" }, + content = function() + ui.tag{ + tag = "li", + content = function() + ui.link{ + module = "member", + view = "menu", + content = function() + execute.view{ + module = "member_image", + view = "_show", + params = { + member = app.session.member, + image_type = "avatar", + show_dummy = true, + class = "micro_avatar", + } } - } - ui.tag{ content = app.session.member.name } - end, - module = "member", - view = "menu" - } - end } - ui.container{ - attr = { id = "member_menu" }, - content = function() + ui.tag{ content = app.session.member.name } + end + } execute.view{ module = "member", view = "_menu" } end } - end } - end - - end } + end + } + end - end + end) -end) +end slot.select("footer", function() if app.session.member_id and app.session.member.admin then diff -r b489613c99d5 -r 95f214d91956 app/main/_layout/default.html --- a/app/main/_layout/default.html Wed Jun 20 21:32:02 2012 +0200 +++ b/app/main/_layout/default.html Wed Jun 20 22:21:29 2012 +0200 @@ -20,6 +20,9 @@ +
diff -r b489613c99d5 -r 95f214d91956 app/main/member/_menu.lua --- a/app/main/member/_menu.lua Wed Jun 20 21:32:02 2012 +0200 +++ b/app/main/member/_menu.lua Wed Jun 20 22:21:29 2012 +0200 @@ -71,10 +71,6 @@ } end } - ui.tag{ tag = "li", content = function() - ui.tag{ tag = "span", content = _"Select language" } - end } - for i, lang in ipairs(config.available_languages) do ui.tag{ tag = "li", content = function() ui.link{ diff -r b489613c99d5 -r 95f214d91956 static/style.css --- a/static/style.css Wed Jun 20 21:32:02 2012 +0200 +++ b/static/style.css Wed Jun 20 22:21:29 2012 +0200 @@ -166,7 +166,7 @@ ); font-size: 90%; box-shadow: #aaa 0 0 5px; - overflow: hidden; + xoverflow: auto; -mox-box-shadow: #aaa 0 0 5px; -webkit-box-shadow: #aaa 0 0 5px; border-top: 1px solid #333; @@ -186,8 +186,8 @@ } .topbar a:hover { - background-color: #eee; - color: #000; + background-color: #000; + color: #fff; } .navigation { @@ -200,8 +200,7 @@ vertical-align: middle; } -.topbar a, -.topbar .member_menu span { +.topbar a { padding: 0 0.5em; float: left; display: block; @@ -217,11 +216,74 @@ padding-right: 1%; } -.member_menu { - float: right; + +#member_menu { + xposition: relative; + z-index: 2; + xfloat: left; +} + +#member_menu li { + float: left; +} + +#member_menu li:hover { + position: relative; + z-index: 4; + cursor: default; } #member_menu { + margin: 0; + padding: 0; + width: 200px; +} + +#member_menu ul { + margin: 0; + padding: 0; + list-style-type: none; + display: none; + position: absolute; + top: 100%; + left: 0; + z-index: 3; + width: 200px; + border-radius: 0 0 8px 8px; + background: #000; +} + +#member_menu ul li { + float: none; +} + +#member_menu ul li a { + float: none; + background: #444; +} + +#member_menu ul ul { + top: 1px; + right: 1px; +} + +#member_menu li:hover ul { + display: block; +} + +#member_menu li li a { + background: #000; + border-radius: 5px; + color: #ddd; +} + +#member_menu ul li:hover a { + background: #444; + color: #fff; +} + +/* +#member_menu { position: absolute; right: 20px; top: 19px; @@ -261,7 +323,7 @@ color: #000; } - +*/ /************************************************************************* * Title of current page including path and actions */