Showing
2 changed files
with
7 additions
and
7 deletions
| @@ -185,12 +185,7 @@ module Kanjai | @@ -185,12 +185,7 @@ module Kanjai | ||
| 185 | layer.gsub!(marker, js_array.join('')) | 185 | layer.gsub!(marker, js_array.join('')) |
| 186 | end | 186 | end |
| 187 | when '###INCLUDE_CSS_FILE###' | 187 | when '###INCLUDE_CSS_FILE###' |
| 188 | - if params[:format].to_s == 'pdf' | ||
| 189 | - css_path = "#{$scheme}#{ADMIN_CONFIG['domain_name']}#{ActionController::Base.helpers.asset_path('kanjai/pdf.css')}" | ||
| 190 | - layer.gsub!(marker, '<link rel="stylesheet" href="'+ css_path +'">') | ||
| 191 | - else | ||
| 192 | - layer.gsub!(marker, '') | ||
| 193 | - end | 188 | + layer.gsub!(marker, '') |
| 194 | else | 189 | else |
| 195 | #if PageMarker.public_instance_methods.include?("process_#{marker.gsub('###', '')}".to_sym) | 190 | #if PageMarker.public_instance_methods.include?("process_#{marker.gsub('###', '')}".to_sym) |
| 196 | # page_marker = PageMarker.new | 191 | # page_marker = PageMarker.new |
| @@ -201,6 +196,11 @@ module Kanjai | @@ -201,6 +196,11 @@ module Kanjai | ||
| 201 | end | 196 | end |
| 202 | end | 197 | end |
| 203 | 198 | ||
| 199 | + if params[:format].to_s == 'pdf' | ||
| 200 | + css_path = "#{$scheme}#{ADMIN_CONFIG['domain_name']}#{ActionController::Base.helpers.asset_path('kanjai/pdf.css')}" | ||
| 201 | + layer.gsub!(/<\/head>/, '<link rel="stylesheet" href="'+ css_path +'"></head>') | ||
| 202 | + end | ||
| 203 | + | ||
| 204 | return layer | 204 | return layer |
| 205 | 205 | ||
| 206 | end | 206 | end |