##// END OF EJS Templates
fixed source selection link pop-up tooltip
marcink -
r3081:b2c7f7c5 beta
parent child Browse files
Show More
@@ -3074,6 +3074,25 b' table.code-browser .submodule-dir {'
3074 3074 -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
3075 3075 }
3076 3076
3077 .hl-tip-box {
3078 visibility: hidden;
3079 position: absolute;
3080 color: #666;
3081 background-color: #FFF;
3082 border: 2px solid #003367;
3083 font: 100% sans-serif;
3084 width: auto;
3085 opacity: 1px;
3086 padding: 8px;
3087 white-space: pre-wrap;
3088 -webkit-border-radius: 8px 8px 8px 8px;
3089 -khtml-border-radius: 8px 8px 8px 8px;
3090 -moz-border-radius: 8px 8px 8px 8px;
3091 border-radius: 8px 8px 8px 8px;
3092 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
3093 }
3094
3095
3077 3096 .mentions-container{
3078 3097 width: 90% !important;
3079 3098 }
@@ -1004,7 +1004,7 b' var getIdentNode = function(n){'
1004 1004 };
1005 1005
1006 1006 var getSelectionLink = function(e) {
1007
1007
1008 1008 //get selection from start/to nodes
1009 1009 if (typeof window.getSelection != "undefined") {
1010 1010 s = window.getSelection();
@@ -1026,27 +1026,28 b' var getSelectionLink = function(e) {'
1026 1026 offset = 35;
1027 1027 ranges = [f_int,t_int];
1028 1028 }
1029
1029 // if we select more than 2 lines
1030 1030 if (ranges[0] != ranges[1]){
1031 1031 if(YUD.get('linktt') == null){
1032 1032 hl_div = document.createElement('div');
1033 1033 hl_div.id = 'linktt';
1034 1034 }
1035 hl_div.innerHTML = '';
1036
1035 1037 anchor = '#L'+ranges[0]+'-'+ranges[1];
1036 hl_div.innerHTML = '';
1037 l = document.createElement('a');
1038 l.href = location.href.substring(0,location.href.indexOf('#'))+anchor;
1039 l.innerHTML = _TM['Selection link'];
1040 hl_div.appendChild(l);
1041
1038 var link = document.createElement('a');
1039 link.href = location.href.substring(0,location.href.indexOf('#'))+anchor;
1040 link.innerHTML = _TM['Selection link'];
1041 hl_div.appendChild(link);
1042 1042 YUD.get('body').appendChild(hl_div);
1043 1043
1044 1044 xy = YUD.getXY(till.id);
1045
1046 YUD.addClass('linktt','yui-tt');
1045
1046 YUD.addClass('linktt', 'hl-tip-box');
1047 1047 YUD.setStyle('linktt','top',xy[1]+offset+'px');
1048 1048 YUD.setStyle('linktt','left',xy[0]+'px');
1049 1049 YUD.setStyle('linktt','visibility','visible');
1050
1050 1051 }
1051 1052 else{
1052 1053 YUD.setStyle('linktt','visibility','hidden');
General Comments 0
You need to be logged in to leave comments. Login now