Changes for js and ccs load for site's pages
This commit is contained in:
parent
6f1eb97ace
commit
6bf4c60d45
|
@ -124,11 +124,13 @@ module ApplicationHelper
|
||||||
"<title>#{page.title ? page.title[I18n.locale] : page.i18n_variable[I18n.locale]}</title>\n"
|
"<title>#{page.title ? page.title[I18n.locale] : page.i18n_variable[I18n.locale]}</title>\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
def page_stylesheets(page)
|
def page_stylesheets(page, edit=nil)
|
||||||
stylesheets = ''
|
stylesheets = ''
|
||||||
stylesheets << "<link href='/assets/bootstrap.css' rel='stylesheet' type='text/css' />\n"
|
unless edit
|
||||||
stylesheets << "<link href='/assets/bootstrap-orbit.css' rel='stylesheet' type='text/css' />\n"
|
stylesheets << "<link href='/assets/bootstrap.css' rel='stylesheet' type='text/css' />\n"
|
||||||
stylesheets << "<link href='/assets/style.css' rel='stylesheet' type='text/css' />\n"
|
stylesheets << "<link href='/assets/bootstrap-orbit.css' rel='stylesheet' type='text/css' />\n"
|
||||||
|
stylesheets << "<link href='/assets/style.css' rel='stylesheet' type='text/css' />\n"
|
||||||
|
end
|
||||||
stylesheets << "<link href='#{page.design.reset_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.reset_css
|
stylesheets << "<link href='#{page.design.reset_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.reset_css
|
||||||
stylesheets << "<link href='#{page.design.default_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.default_css
|
stylesheets << "<link href='#{page.design.default_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.default_css
|
||||||
theme = page.design.themes.detect{ |d| d.id == page.theme_id }
|
theme = page.design.themes.detect{ |d| d.id == page.theme_id }
|
||||||
|
@ -136,9 +138,18 @@ module ApplicationHelper
|
||||||
stylesheets
|
stylesheets
|
||||||
end
|
end
|
||||||
|
|
||||||
def page_javascripts(page)
|
def page_javascripts(page, edit=nil)
|
||||||
javascripts = ''
|
javascripts = ''
|
||||||
javascripts << "<script type='text/javascript' src='/static/jquery.cycle.all.latest.js'></script>\n"
|
unless edit
|
||||||
|
javascripts << "<script type='text/javascript' src='/static/jquery.js'></script>\n"
|
||||||
|
javascripts << "<script type='text/javascript' src='/static/jquery.cycle.all.latest.js'></script>\n"
|
||||||
|
javascripts << "<script type='text/javascript' src='/assets/bootstrap.js'></script>\n"
|
||||||
|
javascripts << "<script type='text/javascript' src='/assets/jquery.tinyscrollbar.min.js'></script>\n"
|
||||||
|
javascripts << "<script type='text/javascript' src='/assets/jquery.isotope.min.js'></script>\n"
|
||||||
|
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-member.js'></script>\n"
|
||||||
|
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-search.js'></script>\n"
|
||||||
|
javascripts << "<script type='text/javascript' src='/assets/orbit_bar.js'></script>\n"
|
||||||
|
end
|
||||||
javascripts << "<script type='text/javascript' src='/static/kernel.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/static/kernel.js'></script>\n"
|
||||||
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
|
||||||
page.design.javascripts.each do |js|
|
page.design.javascripts.each do |js|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<%= flash_messages %>
|
<%= flash_messages %>
|
||||||
|
|
||||||
|
|
||||||
<%= page_stylesheets(@item).html_safe %>
|
<%= page_stylesheets(@item, true).html_safe %>
|
||||||
<%= page_javascripts(@item).html_safe %>
|
<%= page_javascripts(@item, true).html_safe %>
|
||||||
|
|
||||||
<%= parse_page_edit_noko(@item).html_safe %>
|
<%= parse_page_edit_noko(@item).html_safe %>
|
Reference in New Issue