edit-admin-up_img
This commit is contained in:
@@ -54,7 +54,7 @@ class Upload extends CI_Controller
|
||||
$data['uptype'] = $uptype ? $uptype : 'qiniu';
|
||||
$data['mimes'] = $this->file_mime($data['types']);
|
||||
$data['source'] = $source ? $source : '';
|
||||
$data['field'] = $field ? $field : 'file';
|
||||
$data['field'] = $field ? $field : '';
|
||||
$this->load->view('uploadpdf', $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,12 +46,14 @@
|
||||
var file_title = ret.file_title || file.file_title || file.md5;
|
||||
var field = '<?=$field?>';
|
||||
$('#' + file.id).attr('data-md5', file.md5).attr('data-src', url).attr('data-value', file_url).attr('data-title', file_title);
|
||||
top.$('[name="<?=$field?>"]').map(function () {
|
||||
img_value = file_url;
|
||||
top.$(this).attr('data-srcs', url).attr('data-md5', file.md5).val(img_value).trigger('change');
|
||||
});
|
||||
var index = top.layer.getFrameIndex(window.name);
|
||||
top.layer.close(index);
|
||||
if(field!='file'){
|
||||
top.$('[name="<?=$field?>"]').map(function () {
|
||||
img_value = file_url;
|
||||
top.$(this).attr('data-srcs', url).attr('data-md5', file.md5).val(img_value).trigger('change');
|
||||
});
|
||||
var index = top.layer.getFrameIndex(window.name);
|
||||
top.layer.close(index);
|
||||
}
|
||||
}
|
||||
|
||||
function confirmSelected() {
|
||||
|
||||
Reference in New Issue
Block a user