From acbecf7e1b881b606bb949e69fded0ce05848b95 Mon Sep 17 00:00:00 2001 From: Christa Date: Thu, 13 Feb 2014 01:16:44 -0500 Subject: [PATCH 1/2] tool tips I have an x and trying to get it close. it only closes the first tooltip of the page for some reason. possibly because i have them initialized as an id and not a class? the other thing i can do is make it a hover so it will just go away when you mouse off and revert to clicks on mobile. we should just update bootstrap for redcap and let me redo the tooltips. this is the old version and it has a lot less features. #15 --- redcap_v5.2.3/Resources/css/custom.css | 26 ++++++++++++++- .../Resources/js/bootstrap-popover.js | 32 ++++++++++++++++--- 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/redcap_v5.2.3/Resources/css/custom.css b/redcap_v5.2.3/Resources/css/custom.css index a6c9a61..f6c4168 100644 --- a/redcap_v5.2.3/Resources/css/custom.css +++ b/redcap_v5.2.3/Resources/css/custom.css @@ -135,4 +135,28 @@ td#changeFont {display:none;} #valtext_divs, #valregex_divs { display:none; } -a#pops:link, a#pops:visited, a#pops:active, a#pops:hover { text-decoration: none; } \ No newline at end of file +a#pops:link, a#pops:visited, a#pops:active, a#pops:hover { text-decoration: none; } + +.popover-content { + padding: 11px 14px; + font-size: 14px; + text-align: left;} + +h3.popover-title{ + font-size: 15px; + font-weight: bold; + border:none; + padding:4px 0; + position: absolute;} + +button.close.pull-right{float:right;} + +.popover-header{ + background-color: #F7F7F7; + padding: 8px 14px; + display:block; + border-bottom: 1px solid rgb(235, 235, 235); + border-radius: 5px 5px 0px 0px; + min-height: 25px;} + +.popover-title{background-color:none;} \ No newline at end of file diff --git a/redcap_v5.2.3/Resources/js/bootstrap-popover.js b/redcap_v5.2.3/Resources/js/bootstrap-popover.js index 86ddd22..c91cadc 100755 --- a/redcap_v5.2.3/Resources/js/bootstrap-popover.js +++ b/redcap_v5.2.3/Resources/js/bootstrap-popover.js @@ -99,7 +99,7 @@ placement: 'right' , trigger: 'click' , content: '' - , template: '

' + , template: '

' }) @@ -119,7 +119,31 @@ $("a[rel=popover]") e.preventDefault(); }); - $(function(){ - $("#pops").popover(); - }); + $.fn.extend({ + popoverClosable: function (options) { + var defaults = { + template:'

' + }; + options = $.extend({}, defaults, options); + var $popover_togglers = this; + $popover_togglers.popover(options); + $popover_togglers.on('click', function (e) { + e.preventDefault(); + $popover_togglers.not(this).popover('hide'); + }); + $('html').on('click', '[data-dismiss="popover"]', function (e) { + $popover_togglers.popover('hide'); + }) + } + }) + + $(function () { + $("#pops").popoverClosable({trigger: 'click hover'}); + }); + +/* + $(function () { + $("#pops").popover(); + }); +*/ \ No newline at end of file From 96900395bd0f1c35773b5823fed53fa900d23b9c Mon Sep 17 00:00:00 2001 From: Christa Date: Thu, 20 Feb 2014 17:36:18 -0500 Subject: [PATCH 2/2] slight fix --- redcap_v5.2.3/Resources/css/custom.css | 38 +++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/redcap_v5.2.3/Resources/css/custom.css b/redcap_v5.2.3/Resources/css/custom.css index f6c4168..feef08c 100644 --- a/redcap_v5.2.3/Resources/css/custom.css +++ b/redcap_v5.2.3/Resources/css/custom.css @@ -142,21 +142,27 @@ a#pops:link, a#pops:visited, a#pops:active, a#pops:hover { text-decoration: none font-size: 14px; text-align: left;} -h3.popover-title{ - font-size: 15px; - font-weight: bold; - border:none; - padding:4px 0; - position: absolute;} - -button.close.pull-right{float:right;} - -.popover-header{ - background-color: #F7F7F7; - padding: 8px 14px; - display:block; - border-bottom: 1px solid rgb(235, 235, 235); - border-radius: 5px 5px 0px 0px; - min-height: 25px;} +h3.popover-title { + font-size: 15px; + font-weight: bold; + border: medium none; + position: relative; + margin-top: 5px; + padding: 1px 0px 4px; + display: inline-block; + width: 90%;} + +button.close.pull-right { + float: right; + display: inline;} + +.popover-header { + background-color: rgb(247, 247, 247); + display: block; + border-bottom: 1px solid rgb(235, 235, 235); + border-radius: 5px 5px 0px 0px; + min-height: 25px; + padding: 5px 7px 5px 5px; +} .popover-title{background-color:none;} \ No newline at end of file