Commit 2e1f37fd06dac25ce618756cc17537890df4039c

Authored by Karpikau Andrei
1 parent 3e3a14c9

change version, check pdf include css file

  1 +/* INSERT THERE PDF css */
  2 +p{
  3 +
  4 +}
\ No newline at end of file
... ...
... ... @@ -184,8 +184,8 @@ module Kanjai
184 184 css_path = "#{$scheme}#{ADMIN_CONFIG['domain_name']}#{ActionController::Base.helpers.asset_path('kanjai/frontend_extend.css')}"
185 185 js_array << "<script type='text/javascript'>$('<link>', {rel: 'stylesheet',type: 'text/css',href: '#{css_path}'}).appendTo('head');</script>"
186 186
187   - css_path = "#{$scheme}#{ADMIN_CONFIG['domain_name']}#{ActionController::Base.helpers.asset_path('kanjai/pdf.css')}"
188   - js_array << "<script type='text/javascript'>$('<link>', {rel: 'stylesheet',type: 'text/css',href: '#{css_path}'}).appendTo('head');</script>"
  187 + #css_path = "#{$scheme}#{ADMIN_CONFIG['domain_name']}#{ActionController::Base.helpers.asset_path('kanjai/pdf.css')}"
  188 + #js_array << "<script type='text/javascript'>$('<link>', {rel: 'stylesheet',type: 'text/css',href: '#{css_path}'}).appendTo('head');</script>"
189 189 layer.gsub!(marker, js_array.join(''))
190 190 end
191 191 when '###INCLUDE_CSS_FILE###'
... ... @@ -200,11 +200,11 @@ module Kanjai
200 200 end
201 201 end
202 202
203   - #unless request.format.html?
  203 + if params[:format].to_s == 'pdf'
204 204 css_path = "#{$scheme}#{ADMIN_CONFIG['domain_name']}#{ActionController::Base.helpers.asset_path('kanjai/pdf.css')}"
205 205 layer.gsub!(/<\/head>/, '<link rel="stylesheet" href="'+ css_path +'"></head>')
206   - layer.gsub!(/<meta charset/, '<link rel="stylesheet" href="'+ css_path +'"><meta charset')
207   - #end
  206 + #layer.gsub!(/<meta charset/, '<link rel="stylesheet" href="'+ css_path +'"><meta charset')
  207 + end
208 208
209 209
210 210 return layer
... ...
... ... @@ -14,7 +14,7 @@ module Kanjai
14 14 end
15 15
16 16 initializer "kanjai.assets.precompile" do |app|
17   - app.config.assets.precompile = %w(kanjai/general.css kanjai/general_admin.css kanjai/general_site.css kanjai/general_site_editor.css kanjai/frontend.css kanjai/frontend_extend.css kanjai/pdf.css kanjai/general.js kanjai/general_admin.js kanjai/general_site_editor.js kanjai/frontend.js kanjai/frontend_not_login.js kanjai/frontend_extend kanjai/frontend_pdf)
  17 + app.config.assets.precompile = %w(kanjai/general.css kanjai/general_admin.css kanjai/general_site.css kanjai/general_site_editor.css kanjai/frontend.css kanjai/frontend_extend.css kanjai/pdf.css kanjai/general.js kanjai/general_admin.js kanjai/general_site_editor.js kanjai/frontend.js kanjai/frontend_not_login.js kanjai/frontend_extend)
18 18 end
19 19
20 20
... ...
1 1 module Kanjai
2   - VERSION = "0.0.98"
  2 + VERSION = "0.0.99"
3 3 end
... ...