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)
|
def popover_with_close_html(without_close_html)
|
||||||
without_close_html + link_to(image_tag('deletelabel.png'), "#", :class => 'close')
|
without_close_html + link_to(image_tag('deletelabel.png'), "#", :class => 'close')
|
||||||
end
|
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
|
end
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,7 @@
|
||||||
= javascript_include_tag "/javascripts/ie.js"
|
= javascript_include_tag "/javascripts/ie.js"
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
%script{:type => "text/javascript", :src => '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'}
|
= jquery_include_tag
|
||||||
:javascript
|
|
||||||
!window.jQuery && document.write(unescape("#{escape_javascript(include_javascripts(:jquery))}"))
|
|
||||||
|
|
||||||
- unless @landing_page
|
- unless @landing_page
|
||||||
= include_javascripts :main
|
= include_javascripts :main
|
||||||
:javascript
|
:javascript
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@
|
||||||
= render :partial =>'shared/footer'
|
= render :partial =>'shared/footer'
|
||||||
|
|
||||||
/ javascripts at the bottom
|
/ javascripts at the bottom
|
||||||
|
= jquery_include_tag
|
||||||
= include_javascripts :mobile
|
= include_javascripts :mobile
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ javascripts:
|
||||||
login:
|
login:
|
||||||
- public/javascripts/login.js
|
- public/javascripts/login.js
|
||||||
mobile:
|
mobile:
|
||||||
- public/javascripts/vendor/jquery162.min.js
|
|
||||||
- public/javascripts/vendor/jquery.charcount.js
|
- public/javascripts/vendor/jquery.charcount.js
|
||||||
- public/javascripts/rails.js # we only include this to hijack ajax requests
|
- public/javascripts/rails.js # we only include this to hijack ajax requests
|
||||||
- public/javascripts/vendor/mbp-helper.js
|
- public/javascripts/vendor/mbp-helper.js
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue