Browse Source

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

Martin Edenhofer 10 years ago
parent
commit
e10552c361

+ 1 - 1
app/assets/javascripts/app/config.js.coffee

@@ -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')

+ 6 - 6
app/assets/stylesheets/zammad.css.scss

@@ -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;

+ 1 - 1
lib/static_assets.rb

@@ -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

+ 0 - 0
app/assets/images/avatar-bg.png → public/assets/images/avatar-bg.png


+ 0 - 0
app/assets/images/company-logo.png → public/assets/images/company-logo.png


+ 0 - 0
app/assets/images/full logo on dark.svg → public/assets/images/full logo on dark.svg


+ 0 - 0
app/assets/images/logo.svg → public/assets/images/logo.svg


+ 0 - 0
app/assets/images/logo_bw.svg → public/assets/images/logo_bw.svg


+ 0 - 0
app/assets/images/logotype on dark.svg → public/assets/images/logotype on dark.svg


+ 0 - 0
app/assets/images/otrs-logo.png → public/assets/images/otrs-logo.png


Some files were not shown because too many files changed in this diff