mirror of
https://github.com/go-gitea/gitea
synced 2025-07-10 04:27:22 +00:00
commithgraph / timeline (#428)
* Add model and tests for graph * Add route and router for graph * Add assets for graph * Add template for graph
This commit is contained in:
17
public/js/draw.js
Normal file
17
public/js/draw.js
Normal file
@ -0,0 +1,17 @@
|
||||
$(document).ready(function () {
|
||||
var graphList = [];
|
||||
|
||||
if (!document.getElementById('graph-canvas')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$("#graph-raw-list li span.node-relation").each(function () {
|
||||
graphList.push($(this).text());
|
||||
})
|
||||
|
||||
gitGraph(document.getElementById('graph-canvas'), graphList);
|
||||
|
||||
if ($("#rev-container")) {
|
||||
$("#rev-container").css("width", document.body.clientWidth - document.getElementById('graph-canvas').width);
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user