changeset 3081:b2c7f7c5ce11 beta

fixed source selection link pop-up tooltip
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 09 Dec 2012 16:21:02 +0100
parents 39bbe5d31a54
children c222599da9a7
files rhodecode/public/css/style.css rhodecode/public/js/rhodecode.js
diffstat 2 files changed, 30 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/public/css/style.css	Sat Dec 08 19:09:12 2012 +0100
+++ b/rhodecode/public/css/style.css	Sun Dec 09 16:21:02 2012 +0100
@@ -3074,6 +3074,25 @@
 	-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;
 }
--- a/rhodecode/public/js/rhodecode.js	Sat Dec 08 19:09:12 2012 +0100
+++ b/rhodecode/public/js/rhodecode.js	Sun Dec 09 16:21:02 2012 +0100
@@ -1004,7 +1004,7 @@
 };
 
 var  getSelectionLink = function(e) {
-	
+
 	//get selection from start/to nodes    	
 	if (typeof window.getSelection != "undefined") {
 		s = window.getSelection();
@@ -1026,27 +1026,28 @@
 	    	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');