Sha256: ca787c6a44ae951abda3450615105ac28f714dcc1e34b3e559cd8b104aecd526

Contents?: true

Size: 1.31 KB

Versions: 16

Compression:

Stored size: 1.31 KB

Contents

<%= javascript_include_tag "uploadify/swfobject", "uploadify/jquery.uploadify.v2.1.0" %>
	<%- session_key = Rails.application.config.session_options[:key] -%> 
<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',
			'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: {
      	'_http_accept': 'application/javascript',
				'format' : 'json',
        '_method': 'post',
        '<%= session_key %>' : encodeURIComponent('<%= u cookies[session_key] %>'),
        'authenticity_token': encodeURIComponent('<%= u form_authenticity_token %>'),
				'album_id' : '<%= @album.id %>'
				}
		});
	
		$('#photo_submit').click(function(event){
			event.preventDefault(); 
			$('#photo_file').uploadifyUpload(); 
		});
	}); 
</script>

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
dust-generators-0.2.3 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.2.2 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.2.1 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.2.0 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.9 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.8 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.7 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.6 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.5 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.4 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.3 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.2 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.1 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.1.0 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust-generators-0.0.3 lib/generators/dust/albums/templates/app/views/albums/_upload_script.html.erb
dust_albums-0.0.2 app/views/albums/_upload_script.html.erb