app/views/uploads/_swf_javascript.html.erb in uploader-0.2.6 vs app/views/uploads/_swf_javascript.html.erb in uploader-0.2.7
- old
+ new
@@ -20,12 +20,29 @@
<% end -%>
<% end -%>
<% content_for :head do -%>
<script type='text/javascript'>
+ jQuery(document).ready(function() {
+ jQuery('.show_degraded_container').click(function(){
+ jQuery('.show_swfupload_container').show();
+ jQuery('.show_degraded_container').hide();
+ jQuery('.degraded_container').show();
+ jQuery('.swfupload_container').hide();
+ });
+ jQuery('.show_swfupload_container').click(function(){
+ jQuery('.show_swfupload_container').hide();
+ jQuery('.show_degraded_container').show();
+ jQuery('.degraded_container').hide();
+ jQuery('.swfupload_container').show();
+ });
+ });
+ </script>
+<% end -%>
+<% content_for :head do -%>
+ <script type='text/javascript'>
var <%=container_prefix%>swfu;
-
window.onload = function () {
var settings = {
flash_url : '/swf/swfupload.swf',
upload_url: '<%= options[:upload_url] || new_upload_path_with_session_information(parent) %>',
\ No newline at end of file