Split Cropper.js from the main JavaScript manifest.
This commit is contained in:
parent
1ade080ec8
commit
a99e5cd810
8 changed files with 11 additions and 2 deletions
|
@ -54,7 +54,6 @@
|
|||
#= require_directory ./u2f
|
||||
#= require_directory .
|
||||
#= require fuzzaldrin-plus
|
||||
#= require cropper
|
||||
#= require u2f
|
||||
|
||||
window.slugify = (text) ->
|
||||
|
|
|
@ -129,7 +129,6 @@ class Dispatcher
|
|||
when 'dashboard', 'root'
|
||||
shortcut_handler = new ShortcutsDashboardNavigation()
|
||||
when 'profiles'
|
||||
new Profile()
|
||||
new NotificationsForm()
|
||||
new NotificationsDropdown()
|
||||
when 'projects'
|
||||
|
|
1
app/assets/javascripts/lib/cropper.js.coffee
Normal file
1
app/assets/javascripts/lib/cropper.js.coffee
Normal file
|
@ -0,0 +1 @@
|
|||
#= require cropper
|
2
app/assets/javascripts/profile/application.js.coffee
Normal file
2
app/assets/javascripts/profile/application.js.coffee
Normal file
|
@ -0,0 +1,2 @@
|
|||
#
|
||||
#= require_tree .
|
|
@ -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()
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue