From b7289bc0997d4129b5d552076683421a05cccc56 Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Fri, 18 Dec 2015 09:43:44 +0100 Subject: [PATCH] Add menu funtionality to right arrow --- .../backlogs/master_backlog.css.sass | 21 +++++++++++-------- app/helpers/rb_master_backlogs_helper.rb | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/backlogs/master_backlog.css.sass b/app/assets/stylesheets/backlogs/master_backlog.css.sass index 8477fae93f..dedc243eb7 100644 --- a/app/assets/stylesheets/backlogs/master_backlog.css.sass +++ b/app/assets/stylesheets/backlogs/master_backlog.css.sass @@ -80,26 +80,29 @@ position: absolute top: 0 right: 0 - width: 29px - &.hover, &:hover - width: 30px - z-index: 1000 + width: 30px .icon-context position: absolute top: 7px - left: 7px + left: 10px + &:before + content: "\e08a" + &.open + &:before + content: "\e089" + &+ .items + display: block .items display: none - &.hover .items, &:hover .items background-color: #EEEEEE border: 1px solid #E4E4E4 - display: block position: absolute top: 30px left: 0 list-style: none margin: 0 padding: 0 + z-index: 1000 .item display: block width: 160px @@ -144,10 +147,10 @@ cursor: pointer &:before content: "\e00c" - margin-left: 7px + margin-left: 6px &.closed:before content: "\e00b" - margin-left: 7px + margin-left: 6px &:hover cursor: pointer background-color: #D8D8D8 diff --git a/app/helpers/rb_master_backlogs_helper.rb b/app/helpers/rb_master_backlogs_helper.rb index 850fb27e51..8fc3fd03c3 100644 --- a/app/helpers/rb_master_backlogs_helper.rb +++ b/app/helpers/rb_master_backlogs_helper.rb @@ -39,7 +39,7 @@ module RbMasterBacklogsHelper def render_backlog_menu(backlog) 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 backlog_menu_items_for(backlog).map { |item| content_tag(:li, item, class: 'item')