Subversion Repositories wpShopGermany4

Rev

Rev 5532 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5532 Rev 5896
Line 26... Line 26...
26
			<?php } ?>
26
			<?php } ?>
27
		</div>
27
		</div>
28
				
28
				
29
	</div>
29
	</div>
30
	
30
	
-
 
31
	<?php if (wpsg_isTrue($this->view['field_config']['ajax_upload'])) { ?>
-
 
32
	<script type="text/javascript">/* <![CDATA[ */
-
 
33
	
-
 
34
	    jQuery(document).ready(function() {
-
 
35
			
-
 
36
			jQuery('#<?php echo $this->view['field_id']; ?>').on('change', function() {
-
 
37
   
-
 
38
				var data = new FormData();
-
 
39
   				data.append('file', this.files[0]);
-
 
40
				   
-
 
41
				jQuery.ajax( {
-
 
42
      				url: '<?php echo $this->view['field_config']['ajax_upload_url']; ?>',
-
 
43
      				data: data,
-
 
44
      				type: 'POST',         
-
 
45
      				processData: false,
-
 
46
      				contentType: false,
-
 
47
					success: function(data) {
-
 
48
						
-
 
49
						<?php if (wpsg_isSizedString($this->view['field_config']['ajax_success'])) { ?>
-
 
50
						<?php echo $this->view['field_config']['ajax_success']; ?>(data);
-
 
51
						<?php } ?>
-
 
52
						
-
 
53
					}
-
 
54
				} );
-
 
55
			} );
-
 
56
			
-
 
57
		} );
-
 
58
	
-
 
59
	/* ]]> */</script>
-
 
60
	<?php } ?>
-
 
61
	
31
	<div class="clearfix wpsg_clear"></div>
62
	<div class="clearfix wpsg_clear"></div>
32
	
63
	
33
</div>
64
</div>