Mercurial > hg > soundsoftware-site
diff app/helpers/.svn/text-base/application_helper.rb.svn-base @ 245:051f544170fe
* Update to SVN trunk revision 4993
author | Chris Cannam |
---|---|
date | Thu, 03 Mar 2011 11:42:28 +0000 |
parents | 0579821a129a |
children | eeebe205a056 cbce1fd3b1b7 |
line wrap: on
line diff
--- a/app/helpers/.svn/text-base/application_helper.rb.svn-base Thu Mar 03 11:40:10 2011 +0000 +++ b/app/helpers/.svn/text-base/application_helper.rb.svn-base Thu Mar 03 11:42:28 2011 +0000 @@ -894,6 +894,15 @@ '' end end + + # Returns the javascript tags that are included in the html layout head + 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) )}'); });") + end + tags + end def favicon "<link rel='shortcut icon' href='#{image_path('/favicon.ico')}' />"