Merge remote-tracking branch 'origin/master'

Conflicts:
	public/js/app.js
tokarchuk/v1.17
FuXiaoHei 11 years ago
commit 7f1fdf441f
  1. 3
      public/css/gogs.css
  2. 8
      public/js/app.js

@ -647,6 +647,9 @@ html, body {
padding: 30px 30px 50px; padding: 30px 30px 50px;
border: none; border: none;
background-color: #FFF; background-color: #FFF;
overflow: auto;
overflow-x: auto;
overflow-y: hidden;
} }
.file-content .file-body pre { .file-content .file-body pre {

@ -74,15 +74,13 @@ var Gogits = {
var $lineNums = $pre.parent().siblings('.lines-num'); var $lineNums = $pre.parent().siblings('.lines-num');
if($lineNums.length > 0){ if($lineNums.length > 0){
var nums = $pre.find('ol.linenums > li').length; var nums = $pre.find('ol.linenums > li').length;
for (var i = 1; i <= nums; i++) { for(var i=0;i < nums;i++){
$lineNums.append('<span id="L' + i + '" rel=".L' + i + '">' + i + '</span>'); $lineNums.append('<span id="L'+i+'" rel=".L'+i+'">'+(i+1)+'</span>');
} }
var last; var last;
$(document).on('click', '.lines-num span', function(){ $(document).on('click', '.lines-num span', function(){
var $e = $(this); var $e = $(this);
console.log($e.parent().siblings('.lines-code').find('ol.linenums > ' + $e.attr('rel')));
console.log('ol.linenums > ' + $e.attr('rel'));
if(last){ if(last){
last.removeClass('active'); last.removeClass('active');
} }
@ -183,7 +181,6 @@ function initUserSetting() {
} }
function initRepository() { function initRepository() {
(function () {
var $guide = $('.guide-box'); var $guide = $('.guide-box');
if ($guide.length) { if ($guide.length) {
var $url = $('#guide-clone-url'); var $url = $('#guide-clone-url');
@ -198,7 +195,6 @@ function initRepository() {
}).eq(0).trigger("click"); }).eq(0).trigger("click");
// todo copy to clipboard // todo copy to clipboard
} }
})();
} }
(function ($) { (function ($) {

Loading…
Cancel
Save