mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
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:
parent
78e0330b21
commit
9c72597b95
6 changed files with 190 additions and 39 deletions
32
modules/layout/tpl/js/layout_modify.js
Normal file
32
modules/layout/tpl/js/layout_modify.js
Normal 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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue