diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-03-02 01:34:36 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-03-03 16:47:38 -0600 |
commit | ec9180719ef3d8a3d2aa6bc67b2ec31f91c57613 (patch) | |
tree | dcbaaea460d4e6fd902ff151f1352bf9bf555214 /app | |
parent | 1f9743310054273b98e423b6dc5e99a5bc9fd7a2 (diff) | |
download | gitlab-ce-ec9180719ef3d8a3d2aa6bc67b2ec31f91c57613.tar.gz |
create a cacheable commons bundle for d3 library
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/lib/d3.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/users/calendar.js | 3 | ||||
-rw-r--r-- | app/views/projects/graphs/charts.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/graphs/show.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/pipelines/charts.html.haml | 1 | ||||
-rw-r--r-- | app/views/users/show.html.haml | 2 |
6 files changed, 6 insertions, 5 deletions
diff --git a/app/assets/javascripts/lib/d3.js b/app/assets/javascripts/lib/d3.js deleted file mode 100644 index a9dd32edbed..00000000000 --- a/app/assets/javascripts/lib/d3.js +++ /dev/null @@ -1,3 +0,0 @@ -/* eslint-disable func-names, space-before-function-paren */ - -window.d3 = require('d3'); diff --git a/app/assets/javascripts/users/calendar.js b/app/assets/javascripts/users/calendar.js index 5111b260e1c..754d448564f 100644 --- a/app/assets/javascripts/users/calendar.js +++ b/app/assets/javascripts/users/calendar.js @@ -1,5 +1,6 @@ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, camelcase, vars-on-top, object-shorthand, comma-dangle, eqeqeq, no-mixed-operators, no-return-assign, newline-per-chained-call, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, prefer-template, quotes, no-unused-vars, no-else-return, max-len */ -/* global d3 */ + +import d3 from 'd3'; (function() { var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }; diff --git a/app/views/projects/graphs/charts.html.haml b/app/views/projects/graphs/charts.html.haml index fa28db6c71f..464ac34d961 100644 --- a/app/views/projects/graphs/charts.html.haml +++ b/app/views/projects/graphs/charts.html.haml @@ -1,6 +1,7 @@ - @no_container = true - page_title "Charts" - content_for :page_specific_javascripts do + = page_specific_javascript_bundle_tag('common_d3') = page_specific_javascript_bundle_tag('graphs') = render "projects/commits/head" diff --git a/app/views/projects/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml index 05291c65b50..680f8ae6c8f 100644 --- a/app/views/projects/graphs/show.html.haml +++ b/app/views/projects/graphs/show.html.haml @@ -1,6 +1,7 @@ - @no_container = true - page_title "Contributors" - content_for :page_specific_javascripts do + = page_specific_javascript_bundle_tag('common_d3') = page_specific_javascript_bundle_tag('graphs') = render 'projects/commits/head' diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml index fbf783afe44..4a5043aac3c 100644 --- a/app/views/projects/pipelines/charts.html.haml +++ b/app/views/projects/pipelines/charts.html.haml @@ -1,6 +1,7 @@ - @no_container = true - page_title "Charts", "Pipelines" - content_for :page_specific_javascripts do + = page_specific_javascript_bundle_tag('common_d3') = page_specific_javascript_bundle_tag('graphs') = render 'head' diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index af091f9ab88..76cd330e80a 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -1,7 +1,7 @@ - page_title @user.name - page_description @user.bio - content_for :page_specific_javascripts do - = page_specific_javascript_bundle_tag('lib_d3') + = page_specific_javascript_bundle_tag('common_d3') = page_specific_javascript_bundle_tag('users') - header_title @user.name, user_path(@user) - @no_container = true |