Commit 2422bdab authored by Maxwell Salzberg's avatar Maxwell Salzberg

MS SM; make loading jquery from cdn or local a helper so we can stub it in cukes

parent f395a707
......@@ -75,4 +75,11 @@ module ApplicationHelper
def popover_with_close_html(without_close_html)
without_close_html + link_to(image_tag('deletelabel.png'), "#", :class => 'close')
end
def jquery_include_tag
javascript_include_tag('//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js') +
content_tag(:script) do
"!window.jQuery && document.write(unescape(\"#{escape_javascript(include_javascripts(:jquery))}\"))".html_safe
end
end
end
......@@ -37,10 +37,7 @@
= javascript_include_tag "/javascripts/ie.js"
<![endif]-->
%script{:type => "text/javascript", :src => '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'}
:javascript
!window.jQuery && document.write(unescape("#{escape_javascript(include_javascripts(:jquery))}"))
= jquery_include_tag
- unless @landing_page
= include_javascripts :main
:javascript
......
......@@ -61,6 +61,7 @@
= render :partial =>'shared/footer'
/ javascripts at the bottom
= jquery_include_tag
= include_javascripts :mobile
:javascript
......
......@@ -46,7 +46,6 @@ javascripts:
login:
- public/javascripts/login.js
mobile:
- public/javascripts/vendor/jquery162.min.js
- public/javascripts/vendor/jquery.charcount.js
- public/javascripts/rails.js # we only include this to hijack ajax requests
- public/javascripts/vendor/mbp-helper.js
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment