liquid_feedback_frontend

changeset 586:95f214d91956

Fixed member drop down menu
author bsw
date Wed Jun 20 22:21:29 2012 +0200 (2012-06-20)
parents b489613c99d5
children f0ffe4420fe2
files app/main/_filter_view/30_navigation.lua app/main/_layout/default.html app/main/member/_menu.lua static/style.css
line diff
     1.1 --- a/app/main/_filter_view/30_navigation.lua	Wed Jun 20 21:32:02 2012 +0200
     1.2 +++ b/app/main/_filter_view/30_navigation.lua	Wed Jun 20 22:21:29 2012 +0200
     1.3 @@ -43,45 +43,48 @@
     1.4        module = 'index',
     1.5        view   = 'reset_password'
     1.6      }
     1.7 -  else 
     1.8 +  end
     1.9 +end)
    1.10  
    1.11 -    ui.container{ attr = { class = "navigation_right" }, content = function()
    1.12 +
    1.13 +if app.session.member_id then
    1.14  
    1.15 -      if app.session.member_id then
    1.16 -        ui.container{ attr = { class = "member_menu" }, content = function()
    1.17 -          ui.container{ attr = { class = "title" }, content = function()
    1.18 -            ui.link{
    1.19 -              content = function()
    1.20 -                execute.view{
    1.21 -                  module = "member_image",
    1.22 -                  view = "_show",
    1.23 -                  params = {
    1.24 -                    member = app.session.member,
    1.25 -                    image_type = "avatar",
    1.26 -                    show_dummy = true,
    1.27 -                    class = "micro_avatar",
    1.28 +  slot.select('navigation_right', function()
    1.29 +    if app.session.member_id then
    1.30 +      ui.tag{ 
    1.31 +        tag = "ul",
    1.32 +        attr = { id = "member_menu" },
    1.33 +        content = function()
    1.34 +          ui.tag{ 
    1.35 +            tag = "li",
    1.36 +            content = function()
    1.37 +              ui.link{
    1.38 +                module = "member",
    1.39 +                view = "menu",
    1.40 +                content = function()
    1.41 +                  execute.view{
    1.42 +                    module = "member_image",
    1.43 +                    view = "_show",
    1.44 +                    params = {
    1.45 +                      member = app.session.member,
    1.46 +                      image_type = "avatar",
    1.47 +                      show_dummy = true,
    1.48 +                      class = "micro_avatar",
    1.49 +                    }
    1.50                    }
    1.51 -                }
    1.52 -                ui.tag{ content = app.session.member.name }
    1.53 -              end,
    1.54 -              module = "member",
    1.55 -              view = "menu"
    1.56 -            }
    1.57 -          end }
    1.58 -          ui.container{ 
    1.59 -            attr = { id = "member_menu" },
    1.60 -            content = function()
    1.61 +                  ui.tag{ content = app.session.member.name }
    1.62 +                end
    1.63 +              }
    1.64                execute.view{ module = "member", view = "_menu" }
    1.65              end
    1.66            }
    1.67 -        end }
    1.68 -      end
    1.69 -      
    1.70 -    end }
    1.71 +        end
    1.72 +      }
    1.73 +    end
    1.74  
    1.75 -  end
    1.76 +  end)
    1.77  
    1.78 -end)
    1.79 +end
    1.80  
    1.81  slot.select("footer", function()
    1.82    if app.session.member_id and app.session.member.admin then
     2.1 --- a/app/main/_layout/default.html	Wed Jun 20 21:32:02 2012 +0200
     2.2 +++ b/app/main/_layout/default.html	Wed Jun 20 22:21:29 2012 +0200
     2.3 @@ -20,6 +20,9 @@
     2.4          <div class="navigation" id="navigation">
     2.5            <!-- WEBMCP SLOT navigation -->
     2.6          </div>
     2.7 +        <div class="navigation_right" id="navigation_right">
     2.8 +          <!-- WEBMCP SLOT navigation_right -->
     2.9 +        </div>
    2.10          <div class="help_hidden" id="help_hidden">
    2.11            <!-- WEBMCP SLOT help_hidden -->
    2.12          </div>
     3.1 --- a/app/main/member/_menu.lua	Wed Jun 20 21:32:02 2012 +0200
     3.2 +++ b/app/main/member/_menu.lua	Wed Jun 20 22:21:29 2012 +0200
     3.3 @@ -71,10 +71,6 @@
     3.4      }
     3.5    end }
     3.6  
     3.7 -  ui.tag{ tag = "li", content = function()
     3.8 -    ui.tag{ tag = "span", content = _"Select language" }
     3.9 -  end }
    3.10 -
    3.11    for i, lang in ipairs(config.available_languages) do
    3.12      ui.tag{ tag = "li", content = function()
    3.13        ui.link{
     4.1 --- a/static/style.css	Wed Jun 20 21:32:02 2012 +0200
     4.2 +++ b/static/style.css	Wed Jun 20 22:21:29 2012 +0200
     4.3 @@ -166,7 +166,7 @@
     4.4    );
     4.5    font-size: 90%;
     4.6    box-shadow: #aaa 0 0 5px;
     4.7 -  overflow: hidden;
     4.8 +  xoverflow: auto;
     4.9    -mox-box-shadow: #aaa 0 0 5px;
    4.10    -webkit-box-shadow: #aaa 0 0 5px;
    4.11    border-top: 1px solid #333;
    4.12 @@ -186,8 +186,8 @@
    4.13  }
    4.14  
    4.15  .topbar  a:hover {
    4.16 -  background-color: #eee;
    4.17 -  color: #000;
    4.18 +  background-color: #000;
    4.19 +  color: #fff;
    4.20  }
    4.21  
    4.22  .navigation {
    4.23 @@ -200,8 +200,7 @@
    4.24    vertical-align: middle;
    4.25  }
    4.26  
    4.27 -.topbar a,
    4.28 -.topbar .member_menu span {
    4.29 +.topbar a {
    4.30    padding: 0 0.5em;
    4.31    float: left;
    4.32    display: block;
    4.33 @@ -217,11 +216,74 @@
    4.34    padding-right: 1%;
    4.35  }
    4.36  
    4.37 -.member_menu {
    4.38 -  float: right;
    4.39 +
    4.40 +#member_menu {
    4.41 + xposition: relative;
    4.42 + z-index: 2;
    4.43 + xfloat: left;
    4.44 +}
    4.45 +
    4.46 +#member_menu li {
    4.47 + float: left;
    4.48 +}
    4.49 +
    4.50 +#member_menu li:hover {
    4.51 + position: relative;
    4.52 + z-index: 4;
    4.53 + cursor: default;
    4.54  }
    4.55  
    4.56  #member_menu {
    4.57 +  margin: 0;
    4.58 +  padding: 0;
    4.59 +  width: 200px;
    4.60 +}
    4.61 +  
    4.62 +#member_menu ul {
    4.63 +  margin: 0;
    4.64 +  padding: 0;
    4.65 +  list-style-type: none;
    4.66 +  display: none;
    4.67 +  position: absolute;
    4.68 +  top: 100%;
    4.69 +  left: 0;
    4.70 +  z-index: 3;
    4.71 +  width: 200px;
    4.72 +  border-radius: 0 0 8px 8px;
    4.73 +  background: #000;
    4.74 +}
    4.75 +
    4.76 +#member_menu ul li {
    4.77 +  float: none;
    4.78 +}
    4.79 +
    4.80 +#member_menu ul li a {
    4.81 +  float: none;
    4.82 +  background: #444;
    4.83 +}
    4.84 +
    4.85 +#member_menu ul ul {
    4.86 +  top: 1px;
    4.87 +  right: 1px;
    4.88 +}
    4.89 +
    4.90 +#member_menu li:hover ul {
    4.91 +  display: block;
    4.92 +}
    4.93 +
    4.94 +#member_menu li li a {
    4.95 +  background: #000;
    4.96 +  border-radius: 5px;
    4.97 +  color: #ddd;
    4.98 +}
    4.99 +
   4.100 +#member_menu ul li:hover a {
   4.101 +  background: #444;
   4.102 +  color: #fff;
   4.103 +}
   4.104 +
   4.105 +/*
   4.106 +#member_menu {
   4.107    position: absolute;
   4.108    right: 20px;
   4.109    top: 19px;
   4.110 @@ -261,7 +323,7 @@
   4.111    color: #000;
   4.112  }
   4.113  
   4.114 -
   4.115 +*/
   4.116  /*************************************************************************
   4.117   * Title of current page including path and actions
   4.118   */

Impressum / About Us