Changeset - 853f1465b314
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-03-04 18:46:02
marcin@python-works.com
codecleaner
1 file changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/files/files_source.html
Show inline comments
 
@@ -65,45 +65,45 @@ YUE.onDOMReady(function(){
 
        for(pos in lines){
 
          YUD.setStyle('L'+lines[pos],'background-color','#FFFFBE');
 
        }
 
    }
 
    page_highlights = location.href.substring(location.href.indexOf('#')+1).split('L');
 
    if (page_highlights.length == 2){
 
       highlight_ranges  = page_highlights[1].split(",");
 

	
 
       var h_lines = [];
 
       for (pos in highlight_ranges){
 
            var _range = highlight_ranges[pos].split('-');
 
            if(_range.length == 2){
 
                var start = parseInt(_range[0]);
 
                var end = parseInt(_range[1]);
 
                if (start < end){
 
                    for(var i=start;i<=end;i++){
 
                        h_lines.push(i);
 
                    }
 
                }
 
            }
 
            else{
 
                h_lines.push(parseInt(highlight_ranges[pos]));
 
            }
 
      }
 
	  highlight_lines(h_lines);
 
	  var _first_line= YUD.get('L'+h_lines[0]);
 
	  if(_first_line){
 
		  _first_line.scrollIntoView()
 
	  }
 
      highlight_lines(h_lines);
 
      var _first_line= YUD.get('L'+h_lines[0]);
 
      if(_first_line){
 
          _first_line.scrollIntoView()
 
      }
 
    }
 

	
 
    // select code link event
 
    YUE.on('hlcode', 'mouseup', getSelectionLink);
 

	
 
    //load history of file
 
    YUE.on('load_node_history', 'click', function(e){
 
        var _url = node_history_url.replace('__REV__','${c.file_changeset.raw_id}').replace('__FPATH__', '${c.f_path}');
 
        ypjax(_url, 'node_history', function(o){
 
            tooltip_activate();
 
        })
 
    });
 

	
 
   });
 

	
 
</script>
0 comments (0 inline, 0 general)