Graph: base implementation

This commit is contained in:
Valery Sizov 2011-11-13 13:58:45 +02:00
parent 6b66a766d1
commit 94690bd2c4
5 changed files with 48 additions and 25 deletions

View file

@ -468,4 +468,13 @@ body.project-page table .commit {
/** UI autocomplete **/
.ui-autocomplete { @include round-borders-all(5px); }
.ui-menu-item { cursor: pointer }
#holder {
border: solid 1px #999;
cursor: move;
height: 70%;
overflow: scroll;
position: absolute;
width: auto;
margin: 6ex 3ex 0ex 0ex;
}

View file

@ -150,11 +150,9 @@ class ProjectsController < ApplicationController
h[:id] = c.sha
h[:date] = c.date
h[:message] = c.message.force_encoding("UTF-8")
h[:email] = c.author.email
h[:login] = c.author.email
h
end.to_json
render :text => @commits_json
end
def blob

View file

@ -22,7 +22,7 @@
= link_to "History", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil
= link_to "Network graph", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :project_id => @project) ? "current" : nil
= link_to "Network graph", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil
= link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do
Team
- if @project.users_projects.count > 0

View file

@ -0,0 +1,9 @@
#holder.graph
:javascript
var chunk1={commits:#{@commits_json}};
var days=#{@days_json};
initGraph();
$(function(){
branchGraph($("#holder")[0]);
});