lib/papermill/papermill_helper.rb in papermill-1.0.3 vs lib/papermill/papermill_helper.rb in papermill-1.0.4
- old
+ new
@@ -1,5 +1,7 @@
+# encoding: utf-8
+
module PapermillHelper
# Sets all the javascript needed for papermill.
# If you already loaded jQuery and JQueryUI, call papermill_javascript_tag
# If you don't use jQuery or use some other library, call papermill_javascript_tag(:with_jquery => "no_conflict")
@@ -11,10 +13,10 @@
html << %{<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>} if options[:with_jquery]
html << %{<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>} if options[:with_jquery] || options[:with_jqueryui_only]
html << %{<script type="text/javascript">jQuery.noConflict();</script>} if options[:with_jquery] == "no_conflict"
end
html << %{<script type="text/javascript">}
- ["SWFUPLOAD_PENDING", "SWFUPLOAD_LOADING", "SWFUPLOAD_ERROR"].each do |js_constant|
+ ["SWFUPLOAD_PENDING", "SWFUPLOAD_LOADING"].each do |js_constant|
html << %{var #{js_constant} = "#{t("papermill.#{js_constant}")}";}
end
html << %{</script>}
html << javascript_include_tag("/papermill/papermill", "/papermill/swfupload")
unless @content_for_papermill_inline_js.blank?
\ No newline at end of file