Replace raphael-rails with raphael.js so it can be split from the rest of the JavaScript. The gem isn't maintained anymore anyway. Added a network folder with an application.js including raphael components, since that's the only page using it currently.
This commit is contained in:
parent
133d5c1c64
commit
18e16e427d
1
Gemfile
1
Gemfile
|
@ -224,7 +224,6 @@ gem 'gon', '~> 6.0.1'
|
||||||
gem 'jquery-atwho-rails', '~> 1.3.2'
|
gem 'jquery-atwho-rails', '~> 1.3.2'
|
||||||
gem 'jquery-rails', '~> 4.1.0'
|
gem 'jquery-rails', '~> 4.1.0'
|
||||||
gem 'jquery-ui-rails', '~> 5.0.0'
|
gem 'jquery-ui-rails', '~> 5.0.0'
|
||||||
gem 'raphael-rails', '~> 2.1.2'
|
|
||||||
gem 'request_store', '~> 1.3.0'
|
gem 'request_store', '~> 1.3.0'
|
||||||
gem 'select2-rails', '~> 3.5.9'
|
gem 'select2-rails', '~> 3.5.9'
|
||||||
gem 'virtus', '~> 1.0.1'
|
gem 'virtus', '~> 1.0.1'
|
||||||
|
|
|
@ -563,7 +563,6 @@ GEM
|
||||||
rainbow (2.1.0)
|
rainbow (2.1.0)
|
||||||
raindrops (0.15.0)
|
raindrops (0.15.0)
|
||||||
rake (10.5.0)
|
rake (10.5.0)
|
||||||
raphael-rails (2.1.2)
|
|
||||||
rb-fsevent (0.9.6)
|
rb-fsevent (0.9.6)
|
||||||
rb-inotify (0.9.5)
|
rb-inotify (0.9.5)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0)
|
||||||
|
@ -952,7 +951,6 @@ DEPENDENCIES
|
||||||
rails (= 4.2.6)
|
rails (= 4.2.6)
|
||||||
rails-deprecated_sanitizer (~> 1.0.3)
|
rails-deprecated_sanitizer (~> 1.0.3)
|
||||||
rainbow (~> 2.1.0)
|
rainbow (~> 2.1.0)
|
||||||
raphael-rails (~> 2.1.2)
|
|
||||||
rblineprof
|
rblineprof
|
||||||
rdoc (~> 3.6)
|
rdoc (~> 3.6)
|
||||||
recaptcha (~> 3.0)
|
recaptcha (~> 3.0)
|
||||||
|
|
|
@ -32,10 +32,6 @@
|
||||||
#= require bootstrap/tooltip
|
#= require bootstrap/tooltip
|
||||||
#= require bootstrap/popover
|
#= require bootstrap/popover
|
||||||
#= require select2
|
#= require select2
|
||||||
#= require raphael
|
|
||||||
#= require g.raphael
|
|
||||||
#= require g.bar
|
|
||||||
#= require branch-graph
|
|
||||||
#= require ace/ace
|
#= require ace/ace
|
||||||
#= require ace/ext-searchbox
|
#= require ace/ext-searchbox
|
||||||
#= require underscore
|
#= require underscore
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
# This is a manifest file that'll be compiled into including all the files listed below.
|
||||||
|
# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
||||||
|
# be included in the compiled file accessible from http://example.com/assets/application.js
|
||||||
|
# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||||
|
# the compiled file.
|
||||||
|
#
|
||||||
|
#= require raphael
|
||||||
|
#= require g.raphael
|
||||||
|
#= require g.bar
|
||||||
|
#= require_tree .
|
||||||
|
|
||||||
|
$ ->
|
||||||
|
network_graph = new Network({
|
||||||
|
url: $(".network-graph").attr('data-url'),
|
||||||
|
commit_url: $(".network-graph").attr('data-commit-url'),
|
||||||
|
ref: $(".network-graph").attr('data-ref'),
|
||||||
|
commit_id: $(".network-graph").attr('data-commit-id')
|
||||||
|
})
|
||||||
|
|
||||||
|
new ShortcutsNetwork(network_graph.branch_graph)
|
|
@ -1,4 +1,5 @@
|
||||||
- page_title "Network", @ref
|
- page_title "Network", @ref
|
||||||
|
- page_specific_javascripts asset_path("network/application.js")
|
||||||
= render "projects/commits/head"
|
= render "projects/commits/head"
|
||||||
= render "head"
|
= render "head"
|
||||||
%div{ class: (container_class) }
|
%div{ class: (container_class) }
|
||||||
|
@ -14,14 +15,5 @@
|
||||||
= check_box_tag :filter_ref, 1, @options[:filter_ref]
|
= check_box_tag :filter_ref, 1, @options[:filter_ref]
|
||||||
%span Begin with the selected commit
|
%span Begin with the selected commit
|
||||||
|
|
||||||
.network-graph
|
.network-graph{ data: { url: "#{escape_javascript(@url)}", commit_url: "#{escape_javascript(@commit_url)}", ref: "#{escape_javascript(@ref)}", commit_id: "#{escape_javascript(@commit.id)}" } }
|
||||||
= spinner nil, true
|
= spinner nil, true
|
||||||
|
|
||||||
:javascript
|
|
||||||
network_graph = new Network({
|
|
||||||
url: "#{escape_javascript(@url)}",
|
|
||||||
commit_url: "#{escape_javascript(@commit_url)}",
|
|
||||||
ref: "#{escape_javascript(@ref)}",
|
|
||||||
commit_id: '#{@commit.id}'
|
|
||||||
})
|
|
||||||
new ShortcutsNetwork(network_graph.branch_graph)
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ module Gitlab
|
||||||
config.assets.precompile << "mailers/*.css"
|
config.assets.precompile << "mailers/*.css"
|
||||||
config.assets.precompile << "graphs/application.js"
|
config.assets.precompile << "graphs/application.js"
|
||||||
config.assets.precompile << "users/application.js"
|
config.assets.precompile << "users/application.js"
|
||||||
|
config.assets.precompile << "network/application.js"
|
||||||
|
|
||||||
# Version of your assets, change this if you want to expire all your assets
|
# Version of your assets, change this if you want to expire all your assets
|
||||||
config.assets.version = '1.0'
|
config.assets.version = '1.0'
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue