Sha256: 3b38cc293e86e6609df931e9aa77eaceb0afe9cb73f117f307d23e76c25493e4

Contents?: true

Size: 1.93 KB

Versions: 2

Compression:

Stored size: 1.93 KB

Contents

<% javascript "swfupload/swfupload", "swfupload/swfupload.queue", "swfupload/fileprogress", "swfupload/handlers" %>

<script type="text/javascript">
	  $(document).ready(function(){
	    new SWFUpload({
				// Backend settings
				upload_url: "<%= manage_assets_path_with_session_information(klass, {:collection=>1}) %>",
				post_params: {"assetable_type" : "<%= model.class.to_s %>", "assetable_id" : "<%= model.id %>"},
				file_post_name: "data_file",

				// Flash file settings
				file_size_limit : "10 MB",
				file_types : "*.jpg;*.jpeg;*.png;*.gif",			// or you could use something like: "*.doc;*.wpd;*.pdf",
				file_types_description : "All Images",
				file_upload_limit : 20,
				file_queue_limit : 0,

				// The event handler functions are defined in handlers.js
				//swfupload_loaded_handler : swfUploadLoaded,
				file_queued_handler : fileQueued,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				upload_start_handler : uploadStart,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadSuccess,
				upload_complete_handler : uploadComplete,
				queue_complete_handler : queueComplete,	// Queue plugin event

				// Button Settings
				button_image_url : "/images/manage/button_add_foto_<%= I18n.locale %>.gif",
				button_placeholder_id : <%=raw "swf_button_#{model.id}".inspect %>,
				button_width: 170,
				button_height: 32,
				button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
				button_cursor: SWFUpload.CURSOR.HAND,
				
				// Flash Settings
				flash_url : "/javascripts/swfupload/swfupload.swf",

				custom_settings : { 
					progressTarget : <%=raw "swf_container_#{model.id}".inspect %>,
					collectionTarget: <%=raw "swf_collection_#{model.id}".inspect %>,
    		  cancelButtonId : "btn_cancel"
				},
				
				// Debug settings
				debug: <%= Rails.env.development? ? 'true' : 'false' %>
			});
	  });
</script>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sunrise-core-0.1.1 app/views/manage/assets/_swfscript.html.erb
sunrise-core-0.1.0 app/views/manage/assets/_swfscript.html.erb