Sha256: c596f7214442e5290b970fb0e769b8e2c5fbdca0cf6c484b845d18b25f10539c

Contents?: true

Size: 1.31 KB

Versions: 6

Compression:

Stored size: 1.31 KB

Contents

<%- session_key_name = ActionController::Base.session_options[:key] -%>
<%= javascript_include_tag "uploadify/swfobject", "uploadify/jquery.uploadify.v2.1.0" %>

<script type="text/javascript" charset="utf-8"> 
	$(document).ready(function() {
		$('#photo_file').click(function(event) { 
			event.preventDefault();
		}); 
	
		$('#photo_file').uploadify({
			'uploader' 		: '/javascripts/uploadify/uploadify.swf',
			'script' 			: '/photos/create',
			'multi' 			: true,
			'auto'				: false,
			'buttonText'  : 'Find',
			'buttonImg'   : '/images/browse.png',
			'cancelImg' 	: '/images/cancel.png',
			'wmode'          : 'transparent',
			height         : 26, // The height of the flash button
			width          : 101, // The width of the flash button
			onComplete : function(event, queueID, fileObj, response, data) { var dat = eval('(' +
			response + ')');$.getScript(dat.photo);},
			'scriptData': {
				'<%= session_key_name %>' : encodeURIComponent('<%= u cookies[session_key_name] %>'),
				'authenticity_token' : encodeURIComponent('<%= u form_authenticity_token if protect_against_forgery? %>'),
				'album_id' : '<%= @album.id %>',
				'title' : 'change me!',
				'format'	: 'json'
				}
		});
	
		$('#photo_submit').click(function(event){
			event.preventDefault(); 
			$('#photo_file').uploadifyUpload(); 
		});
	}); 
</script>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dust-generators-0.1.9 rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.8 rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.7 rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.6 rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.5 rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.4 rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb