|
|
|
@ -1033,9 +1033,9 @@ module ApplicationHelper |
|
|
|
|
def javascript_heads |
|
|
|
|
tags = javascript_include_tag(:defaults) |
|
|
|
|
unless User.current.pref.warn_on_leaving_unsaved == '0' |
|
|
|
|
tags << "\n" + javascript_tag("Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });") |
|
|
|
|
tags.safe_concat "\n" + javascript_tag("Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });") |
|
|
|
|
end |
|
|
|
|
tags << "\n" + javascript_include_tag("accessibility.js") if User.current.impaired? and accessibility_js_enabled? |
|
|
|
|
tags.safe_concat("\n" + javascript_include_tag("accessibility.js")) if User.current.impaired? and accessibility_js_enabled? |
|
|
|
|
tags |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|