issue 1263, changed a upload process on layout modify

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.1@10971 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-08-03 06:55:02 +00:00
parent 78e0330b21
commit 9c72597b95
6 changed files with 190 additions and 39 deletions

View file

@ -0,0 +1,32 @@
function doSubmitConfig()
{
var $forms = jQuery('#layout_config').find('input[name][type="hidden"], input[name][type="text"], input[name][type="checkbox"]:checked, select[name], textarea[name]');
var $configForm = jQuery('#config_form');
var $container = $configForm.children('div');
$container.empty();
$forms.each(function($)
{
var $this = jQuery(this);
if($this.parents('.imageUpload').length) return;
var $input = jQuery('<input>').attr('type', 'hidden').attr('name', $this.attr('name')).val($this.val());
$container.append($input);
});
$configForm.submit();
}
function afterUploadConfigImage(name, fileName)
{
jQuery('#preview_' + name + ' img').attr('src', fileName);
jQuery('#preview_' + name).show();
jQuery('#file_' + name).val('');
}
function afterDeleteConfigImage(name)
{
jQuery('#preview_' + name + ' img').removeAttr('src');
jQuery('#preview_' + name).hide();
}