Merge remote-tracking branch 'origin/master'
Conflicts: public/js/app.js
This commit is contained in:
commit
7f1fdf441f
2 changed files with 25 additions and 26 deletions
|
@ -647,6 +647,9 @@ html, body {
|
|||
padding: 30px 30px 50px;
|
||||
border: none;
|
||||
background-color: #FFF;
|
||||
overflow: auto;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.file-content .file-body pre {
|
||||
|
|
|
@ -72,18 +72,16 @@ var Gogits = {
|
|||
prettyPrint();
|
||||
|
||||
var $lineNums = $pre.parent().siblings('.lines-num');
|
||||
if ($lineNums.length > 0) {
|
||||
if($lineNums.length > 0){
|
||||
var nums = $pre.find('ol.linenums > li').length;
|
||||
for (var i = 1; i <= nums; i++) {
|
||||
$lineNums.append('<span id="L' + i + '" rel=".L' + i + '">' + i + '</span>');
|
||||
for(var i=0;i < nums;i++){
|
||||
$lineNums.append('<span id="L'+i+'" rel=".L'+i+'">'+(i+1)+'</span>');
|
||||
}
|
||||
|
||||
var last;
|
||||
$(document).on('click', '.lines-num span', function () {
|
||||
$(document).on('click', '.lines-num span', function(){
|
||||
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 = $e.parent().siblings('.lines-code').find('ol.linenums > ' + $e.attr('rel'));
|
||||
|
@ -98,12 +96,12 @@ var Gogits = {
|
|||
var node = $(this);
|
||||
var val = encodeURIComponent(node.text().toLowerCase().replace(/[^\w\- ]/g, '').replace(/[ ]/g, '-'));
|
||||
var name = val;
|
||||
if (headers[val] > 0) {
|
||||
if(headers[val] > 0){
|
||||
name = val + '-' + headers[val];
|
||||
}
|
||||
if (headers[val] == undefined) {
|
||||
if(headers[val] == undefined){
|
||||
headers[val] = 1;
|
||||
} else {
|
||||
}else{
|
||||
headers[val] += 1;
|
||||
}
|
||||
node = node.wrap('<div id="' + name + '" class="anchor-wrap" ></div>');
|
||||
|
@ -183,7 +181,6 @@ function initUserSetting() {
|
|||
}
|
||||
|
||||
function initRepository() {
|
||||
(function () {
|
||||
var $guide = $('.guide-box');
|
||||
if ($guide.length) {
|
||||
var $url = $('#guide-clone-url');
|
||||
|
@ -198,7 +195,6 @@ function initRepository() {
|
|||
}).eq(0).trigger("click");
|
||||
// todo copy to clipboard
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
(function ($) {
|
||||
|
|
Reference in a new issue