diff --git a/rhodecode/public/css/style.css b/rhodecode/public/css/style.css --- a/rhodecode/public/css/style.css +++ b/rhodecode/public/css/style.css @@ -3074,6 +3074,25 @@ table.code-browser .submodule-dir { -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6); } +.hl-tip-box { + visibility: hidden; + position: absolute; + color: #666; + background-color: #FFF; + border: 2px solid #003367; + font: 100% sans-serif; + width: auto; + opacity: 1px; + padding: 8px; + white-space: pre-wrap; + -webkit-border-radius: 8px 8px 8px 8px; + -khtml-border-radius: 8px 8px 8px 8px; + -moz-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; + box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6); +} + + .mentions-container{ width: 90% !important; } diff --git a/rhodecode/public/js/rhodecode.js b/rhodecode/public/js/rhodecode.js --- a/rhodecode/public/js/rhodecode.js +++ b/rhodecode/public/js/rhodecode.js @@ -1004,7 +1004,7 @@ var getIdentNode = function(n){ }; var getSelectionLink = function(e) { - + //get selection from start/to nodes if (typeof window.getSelection != "undefined") { s = window.getSelection(); @@ -1026,27 +1026,28 @@ var getSelectionLink = function(e) { offset = 35; ranges = [f_int,t_int]; } - + // if we select more than 2 lines if (ranges[0] != ranges[1]){ if(YUD.get('linktt') == null){ hl_div = document.createElement('div'); hl_div.id = 'linktt'; } + hl_div.innerHTML = ''; + anchor = '#L'+ranges[0]+'-'+ranges[1]; - hl_div.innerHTML = ''; - l = document.createElement('a'); - l.href = location.href.substring(0,location.href.indexOf('#'))+anchor; - l.innerHTML = _TM['Selection link']; - hl_div.appendChild(l); - + var link = document.createElement('a'); + link.href = location.href.substring(0,location.href.indexOf('#'))+anchor; + link.innerHTML = _TM['Selection link']; + hl_div.appendChild(link); YUD.get('body').appendChild(hl_div); xy = YUD.getXY(till.id); - - YUD.addClass('linktt','yui-tt'); + + YUD.addClass('linktt', 'hl-tip-box'); YUD.setStyle('linktt','top',xy[1]+offset+'px'); YUD.setStyle('linktt','left',xy[0]+'px'); YUD.setStyle('linktt','visibility','visible'); + } else{ YUD.setStyle('linktt','visibility','hidden');