diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-23 19:47:22 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-23 19:47:22 +0300 |
commit | 2ed7cbfba4ff3c6a4cf3e72515a0375544998de0 (patch) | |
tree | ae6d7530745c80633cd993c99f7820e1452f3e1b /app/views/projects/graphs | |
parent | 95791316f4037273af7b747ce1851d5f4e46933f (diff) | |
download | gitlab-ce-2ed7cbfba4ff3c6a4cf3e72515a0375544998de0.tar.gz |
Move projects controllers/views in Projects module
Diffstat (limited to 'app/views/projects/graphs')
-rw-r--r-- | app/views/projects/graphs/show.html.haml | 31 | ||||
-rw-r--r-- | app/views/projects/graphs/show.js.haml | 16 |
2 files changed, 47 insertions, 0 deletions
diff --git a/app/views/projects/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml new file mode 100644 index 00000000000..05bc1436e6d --- /dev/null +++ b/app/views/projects/graphs/show.html.haml @@ -0,0 +1,31 @@ +.loading-graph + %center + .loading + %h3.page_title Building repository graph. Please wait a moment. + +.stat-graph + .header.clearfix + .pull-right + %select + %option{:value => "commits"} Commits + %option{:value => "additions"} Additions + %option{:value => "deletions"} Deletions + %h3#date_header.page_title + %input#brush_change{:type => "hidden"} + .graphs + #contributors-master + #contributors.clearfix + %ol.contributors-list.clearfix + +:javascript + $(".stat-graph").hide(); + + $.ajax({ + type: "GET", + url: location.href, + complete: function() { + $(".loading-graph").hide(); + $(".stat-graph").show(); + }, + dataType: "script" + }); diff --git a/app/views/projects/graphs/show.js.haml b/app/views/projects/graphs/show.js.haml new file mode 100644 index 00000000000..b7c9b4113e9 --- /dev/null +++ b/app/views/projects/graphs/show.js.haml @@ -0,0 +1,16 @@ +:plain + controller = new ContributorsStatGraph + controller.init(#{@log}) + + $("select").change( function () { + var field = $(this).val() + controller.set_current_field(field) + controller.redraw_master() + controller.redraw_authors() + }) + + $("#brush_change").change( function () { + controller.change_date_header() + controller.redraw_authors() + }) + |