From af5560b495937419ff34c78eaa094615d1009c27 Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Thu, 18 Sep 2014 02:33:38 -0400 Subject: [PATCH] updates to metacode select within topic card --- app/assets/javascripts/src/Metamaps.js | 2 +- app/assets/stylesheets/base.css | 45 +++++++++++++++----------- app/views/layouts/_templates.html.erb | 2 +- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/app/assets/javascripts/src/Metamaps.js b/app/assets/javascripts/src/Metamaps.js index 7ace955f..7cd87cbb 100644 --- a/app/assets/javascripts/src/Metamaps.js +++ b/app/assets/javascripts/src/Metamaps.js @@ -766,7 +766,7 @@ Metamaps.TopicCard = { selectingMetacode = true; $(this).addClass('minimize'); // this line flips the drop down arrow to a pull up arrow $('.metacodeSelect').show(); - $('.metacodeSelect li').click(function () { + $('.metacodeSelect li li').click(function () { selectingMetacode = false; var metacodeName = $(this).find('.mSelectName').text(); var metacode = Metamaps.Metacodes.findWhere({ diff --git a/app/assets/stylesheets/base.css b/app/assets/stylesheets/base.css index eccc8365..1d9b9cb1 100644 --- a/app/assets/stylesheets/base.css +++ b/app/assets/stylesheets/base.css @@ -322,39 +322,46 @@ cursor: pointer; } .CardOnGraph .metacodeSelect { display:none; - width:100%; + width:200px; z-index: 2; position: absolute; background: #EAEAEA; - height: 150px; + left: 300px; } .CardOnGraph .metacodeSelect ul { -font-style: italic; -font-family: 'vinyl'; -text-transform: uppercase; -position: absolute; -line-height: 36px; -font-size: 20px; -display:block; -width: 100%; -margin:0; -padding: 0; -list-style:none; -height:150px; -overflow:hidden; + position: relative; + line-height: 14px; + font-size: 14px; + display:block; + width: 100%; + margin:0; + padding: 0; + list-style:none; + border: 1px solid #BDBDBD; } .CardOnGraph .metacodeSelect ul li { -background-color: #EAEAEA; -width:100%; -border-bottom:1px solid #AAAAAA; +background-color: #F5F5F5; cursor:pointer; +position: relative; +padding: 9px 12px; } .CardOnGraph .metacodeSelect ul li:hover { -background-color: #F8F8F8; +background-color: #E0E0E0; } .CardOnGraph .metacodeSelect ul li img, .CardOnGraph .metacodeSelect ul li .mSelectName { float:left; } +.CardOnGraph .metacodeSelect ul ul { + display:none; + position: absolute; + left: 200px; + top: 0; + max-height: 270px; + overflow-y: auto; +} +.CardOnGraph .metacodeSelect li:hover ul { + display: block; +} .CardOnGraph .hoverForTip:hover .tip, .mapCard .hoverForTip:hover .tip { display:block; diff --git a/app/views/layouts/_templates.html.erb b/app/views/layouts/_templates.html.erb index e48dc57b..18da1d36 100644 --- a/app/views/layouts/_templates.html.erb +++ b/app/views/layouts/_templates.html.erb @@ -193,6 +193,7 @@
{{metacode}}
+
{{{metacode_select}}}
@@ -209,7 +210,6 @@
-
{{{metacode_select}}}
{{desc}}