Post by abmcr » Fri Jun 05, 2009 10:22 pm

The contribution work fine if you edit in admin/views/category_form.tpl
at line 70

Code: Select all

<script type="text/javascript" src="view/javascript/jquery/ajaxupload.3.1.js"></script>
<script type="text/javascript"><!--
$(document).ready(function() { 
	setUploader('#upload', '#preview', '#image');
	$.tabs('.tabs a'); 
});	
function setUploader(upload, preview, image) {
	new AjaxUpload(upload, {
		action: 'index.php?route=catalog/image',
		name: 'image',
		autoSubmit: true,
		responseType: 'json',
		onChange: function(file, extension) {},
		onSubmit: function(file, extension) {
			$(upload).after('<img src="view/image/loading.gif" id="loading" />');
		},
		onComplete: function(file, json) {
			if (json.error) {
				alert(json.error);
			} else {
				$(preview).attr('src', json.src);

				$(image).attr('value', json.file);
			}
			
			$('#loading').remove();	
		}
	});
}
//--></script>

New member

Posts

Joined
Wed Jun 03, 2009 11:38 pm
Who is online

Users browsing this forum: No registered users and 2 guests