diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a32d76a4b..522c218c1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -38,7 +38,7 @@ module ApplicationHelper end def jquery_include_tag - javascript_include_tag('//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js') + + "".html_safe + content_tag(:script) do "!window.jQuery && document.write(unescape(\"#{escape_javascript(include_javascripts(:jquery))}\")); jQuery.ajaxSetup({'cache': false});".html_safe end diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index a9d3301cf..5ecf6bc58 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -54,12 +54,11 @@ / bootstrap/blueprint switch - if @aspect == :getting_started || @page == :logged_out - = stylesheet_link_tag "bootstrap.min.css" + = include_stylesheets :bootstrap - else - = stylesheet_link_tag "blueprint/screen", :media => 'screen' - = stylesheet_link_tag "blueprint/print", :media => 'print' + = include_stylesheets :blueprint, :media => 'screen' - = stylesheet_link_tag "login", :media => 'screen' + = include_stylesheets :login, :media => 'screen' = include_stylesheets :default, :media => 'all' - if rtl? @@ -78,7 +77,7 @@ = csrf_meta_tag = jquery_include_tag diff --git a/app/views/shared/_mail_signup_form.erb b/app/views/shared/_mail_signup_form.erb index 72553af9e..24603af82 100644 --- a/app/views/shared/_mail_signup_form.erb +++ b/app/views/shared/_mail_signup_form.erb @@ -1,6 +1,6 @@ -<%= javascript_include_tag 'vendor/mailchimp/jquery126.min.js', 'vendor/mailchimp/jquery.validate.js', 'vendor/mailchimp/jquery.form.js' %> +<%= include_javascripts :mailchimp %>