Add menu funtionality to right arrow

pull/6827/head
Henriette Dinger 9 years ago
parent feca7196fa
commit b7289bc099
  1. 21
      app/assets/stylesheets/backlogs/master_backlog.css.sass
  2. 2
      app/helpers/rb_master_backlogs_helper.rb

@ -80,26 +80,29 @@
position: absolute position: absolute
top: 0 top: 0
right: 0 right: 0
width: 29px width: 30px
&.hover, &:hover
width: 30px
z-index: 1000
.icon-context .icon-context
position: absolute position: absolute
top: 7px top: 7px
left: 7px left: 10px
&:before
content: "\e08a"
&.open
&:before
content: "\e089"
&+ .items
display: block
.items .items
display: none display: none
&.hover .items, &:hover .items
background-color: #EEEEEE background-color: #EEEEEE
border: 1px solid #E4E4E4 border: 1px solid #E4E4E4
display: block
position: absolute position: absolute
top: 30px top: 30px
left: 0 left: 0
list-style: none list-style: none
margin: 0 margin: 0
padding: 0 padding: 0
z-index: 1000
.item .item
display: block display: block
width: 160px width: 160px
@ -144,10 +147,10 @@
cursor: pointer cursor: pointer
&:before &:before
content: "\e00c" content: "\e00c"
margin-left: 7px margin-left: 6px
&.closed:before &.closed:before
content: "\e00b" content: "\e00b"
margin-left: 7px margin-left: 6px
&:hover &:hover
cursor: pointer cursor: pointer
background-color: #D8D8D8 background-color: #D8D8D8

@ -39,7 +39,7 @@ module RbMasterBacklogsHelper
def render_backlog_menu(backlog) def render_backlog_menu(backlog)
content_tag(:div, class: 'menu') do content_tag(:div, class: 'menu') do
[ [
content_tag(:div, '', class: "icon-context icon-small icon-arrow-down2 <%= ' closed' if folded %>"), content_tag(:div, '', class: "icon-context icon-small", onClick: "if(this.classList.contains('open')) this.classList.remove('open'); else this.classList.add('open');"),
content_tag(:ul, class: 'items') do content_tag(:ul, class: 'items') do
backlog_menu_items_for(backlog).map { |item| backlog_menu_items_for(backlog).map { |item|
content_tag(:li, item, class: 'item') content_tag(:li, item, class: 'item')

Loading…
Cancel
Save