Split Cropper.js from the main JavaScript manifest.

This commit is contained in:
Connor Shea 2016-06-28 12:17:29 -06:00
parent 1ade080ec8
commit a99e5cd810
No known key found for this signature in database
GPG key ID: E52237E5B35A83E6
8 changed files with 11 additions and 2 deletions

View file

@ -54,7 +54,6 @@
#= require_directory ./u2f
#= require_directory .
#= require fuzzaldrin-plus
#= require cropper
#= require u2f
window.slugify = (text) ->

View file

@ -129,7 +129,6 @@ class Dispatcher
when 'dashboard', 'root'
shortcut_handler = new ShortcutsDashboardNavigation()
when 'profiles'
new Profile()
new NotificationsForm()
new NotificationsDropdown()
when 'projects'

View file

@ -0,0 +1 @@
#= require cropper

View file

@ -0,0 +1,2 @@
#
#= require_tree .

View file

@ -78,3 +78,6 @@ $ ->
if comment && comment.length > 1 && $title.val() == ''
$title.val(comment[1]).change()
if $('body').attr('data-page').split(':').first() == 'profiles'
new Profile()

View file

@ -1,3 +1,7 @@
- content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/cropper.js')
= page_specific_javascript_tag('profile/application.js')
= form_for @user, url: profile_path, method: :put, html: { multipart: true, class: "edit-user prepend-top-default" }, authenticity_token: true do |f|
= form_errors(@user)

View file

@ -84,6 +84,7 @@ module Gitlab
config.assets.precompile << "graphs/application.js"
config.assets.precompile << "users/application.js"
config.assets.precompile << "network/application.js"
config.assets.precompile << "profile/application.js"
config.assets.precompile << "lib/utils/*.js"
config.assets.precompile << "lib/*.js"