mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 13:46:11 +10:00
Replace raphael-rails with raphael.js and split it from the rest of the JS ## What does this MR do? Removes raphael.js and its related libraries from the default JS bundle. It also removes raphael-rails because the gem is unmaintained and – for whatever reason – didn't want to cooperate with the way I was trying to require it. This brings the default (compressed and minified) application.js from 354KB after the d3 MR (!4394) down to 324KB. ## Are there points in the code the reviewer needs to double check? That tests pass and that there aren't errors on any pages (especially the Network page). ## Why was this MR needed? It's only used on the Network page and was using way too much bandwidth for just one page. ## What are the relevant issue numbers? #14372 #13165 Follow-up to !4394 and !4516. cc: @jschatz1 See merge request !4519
21 lines
779 B
CoffeeScript
21 lines
779 B
CoffeeScript
# 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)
|