diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-06-23 10:33:38 -0600 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-06-23 10:33:38 -0600 |
commit | 7ce0968a52a5bc013e49865205a8998881884c02 (patch) | |
tree | aab65a1bb5f4071ba953dc09208d21c4a0ed1121 /app/views/projects/graphs | |
parent | 8ef649588b396059bccf17e6dab6dec3866b2479 (diff) | |
download | gitlab-ce-7ce0968a52a5bc013e49865205a8998881884c02.tar.gz |
Re-implement page-specific JS in a better way.
This makes larger libraries more cacheable and will allow us to use SRI with the dynamically included libraries.
Diffstat (limited to 'app/views/projects/graphs')
-rw-r--r-- | app/views/projects/graphs/_head.html.haml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/projects/graphs/_head.html.haml b/app/views/projects/graphs/_head.html.haml index a388d9a0a61..5ea4adcd0fa 100644 --- a/app/views/projects/graphs/_head.html.haml +++ b/app/views/projects/graphs/_head.html.haml @@ -1,7 +1,9 @@ .nav-links.sub-nav %ul{ class: (container_class) } - - page_specific_javascripts asset_path("graphs/application.js") + - content_for :page_specific_javascripts do + = javascript_include_tag 'lib/chart/application.js', {integrity: true, "data-turbolinks-track" => true} + = javascript_include_tag 'graphs/application.js', {integrity: true, "data-turbolinks-track" => true} = nav_link(action: :show) do = link_to 'Contributors', namespace_project_graph_path = nav_link(action: :commits) do |