Make static assets working on production env. Do not use asset pipeline for static assets.

This commit is contained in:
Martin Edenhofer 2014-11-23 09:44:24 +01:00
parent 8883c74a8f
commit e10552c361
12 changed files with 8 additions and 8 deletions

View file

@ -1,3 +1,3 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
App.Config.set('api_path', 'api/v1')
App.Config.set('image_path', '/assets')
App.Config.set('image_path', '/assets/images')

View file

@ -1031,7 +1031,7 @@ ol.tabs li {
.provider_icon {
width: 29px;
height: 22px;
background: image_url("provider.svg") no-repeat;
background: image_url("/assets/images/provider.svg") no-repeat;
}
.facebook.provider_icon {
@ -1054,7 +1054,7 @@ ol.tabs li {
display: inline-block;
width: 20px;
height: 20px;
background-image: image_url("sprite.svg");
background-image: image_url("/assets/images/sprite.svg");
background-repeat: no-repeat;
background-position: 20px 20px; /* make icon empty */
}
@ -2081,7 +2081,7 @@ footer {
height: 30px;
color: #ECECEC;
line-height: 20px;
background: #31373b image-url("sprite.svg") no-repeat 10px -26px;
background: #31373b image-url("/assets/images/sprite.svg") no-repeat 10px -26px;
outline: none;
border: none;
border-radius: 15px;
@ -2100,7 +2100,7 @@ footer {
.search .logo {
width: 41px;
height: 36px;
background: image_url("logo.svg");
background: image_url("/assets/images/logo.svg");
transition: 240ms;
position: relative;
@extend .u-clickable;
@ -2313,7 +2313,7 @@ footer {
}
.unique.avatar {
background-image: image_url("avatar-bg.png");
background-image: image_url("/assets/images/avatar-bg.png");
background-size: auto;
color: white;
line-height: 42px;
@ -4032,7 +4032,7 @@ footer {
.userInfo-avatar:after {
content: "";
background: image_url("sprite.svg");
background: image_url("/assets/images/sprite.svg");
background-position: -236px 0;
right: 0;
top: 0;

View file

@ -76,7 +76,7 @@ module StaticAssets
return if !file
hash = Digest::MD5.hexdigest( file.content )
path = "#{Rails.root.to_s}/public/assets/#{hash}"
path = "#{Rails.root.to_s}/public/assets/images/#{hash}"
File.open( path, 'wb' ) do |f|
f.puts file.content
end

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View file

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View file

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB