MS SM; make loading jquery from cdn or local a helper so we can stub it in cukes
This commit is contained in:
parent
f395a707ea
commit
2422bdab46
4 changed files with 9 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue