Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
p3x-robot sunday release 2018-5-11 23:20:11
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed May 11, 2018
1 parent 6722fb2 commit 76f2f24
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 53 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ If you just want to get the project dependencies, instead of building everything
git clone https://github.com/patrikx3/gitlist.git
curl -s http://getcomposer.org/installer | php
php composer.phar install
bower install
npm i -g npm
npm install
grunt
npm run webpack
```

If you have Composer in your path, things get easier. But you know the drill.
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/optimize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pushd $TOP
composer install
composer install --no-dev
composer dump-autoload --optimize
bower install --allow-root
npm install
grunt
npm run webpack
popd
13 changes: 7 additions & 6 deletions src/Git/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,13 @@ public function searchTree($query, $branch)

preg_match_all('/([\w-._]+):([^:]+):([0-9]+):(.+)/', $result, $matches, PREG_SET_ORDER);

$data['branch'] = $matches[0][1];
$data['file'] = $matches[0][2];
$data['line'] = $matches[0][3];
$data['match'] = $matches[0][4];

$searchResults[] = $data;
if (isset($matches[0])) {
$data['branch'] = $matches[0][1];
$data['file'] = $matches[0][2];
$data['line'] = $matches[0][3];
$data['match'] = $matches[0][4];
$searchResults[] = $data;
}
}

return $searchResults;
Expand Down
82 changes: 41 additions & 41 deletions themes/bootstrap/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,26 +158,52 @@ $(function () {
$pager.find('.previous').remove();
}
paginate();
});

if ($('#repositories').length) {
var listOptions = {
valueNames: ['name']
};
var repoList = new List('repositories', listOptions);
}
var es = document.getElementsByTagName('a')
for(var i=0; i<es.length; i++){
es[i].addEventListener('click', function(e) {
var href = e.target.getAttribute('href');
if (href === null) {
return;
}
if (href.startsWith('#')) {
e.preventDefault()
var el = document.getElementById(href.substring(1));
if (el === null) {
return;
}
el.scrollIntoView({
behavior: 'smooth',
block: "center",

if ($('#branchList').length) {
var listBranchOptions = {
valueNames: ['item']
};
var repoList = new List('branchList', listBranchOptions);
}
})

}
})
}

if ($('#repositories').length) {
var listOptions = {
valueNames: ['name']
};
var repoList = new global.List('repositories', listOptions);
}

if ($('#branchList').length) {
var listBranchOptions = {
valueNames: ['item']
};
var repoList = new global.List('branchList', listBranchOptions);
}

$('.search').click(function (e) {
e.stopPropagation();
});

$('.search').click(function (e) {
e.stopPropagation();
});



global.gitlist.scrollHash = function(element, event) {
var url = new URL(element.href)
var id = url.hash.substring(1)
Expand All @@ -203,29 +229,3 @@ global.gitlist.scrollHash = function(element, event) {
}
return false;
}

document.addEventListener('DOMContentLoaded', function(){
var es = document.getElementsByTagName('a')
for(var i=0; i<es.length; i++){
es[i].addEventListener('click', function(e) {
var href = e.target.getAttribute('href');
if (href === null) {
return;
}
if (href.startsWith('#')) {
e.preventDefault()
var el = document.getElementById(href.substring(1));
if (el === null) {
return;
}
el.scrollIntoView({
behavior: 'smooth',
block: "center",

})

}
})
}

})
2 changes: 1 addition & 1 deletion webpack/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion webpack/sourcemaps/bundle.js.map

Large diffs are not rendered by default.

0 comments on commit 76f2f24

Please sign in to comment.