Spostato il caricamento della lista allegati ajax all'interno del file ajax.php
This commit is contained in:
parent
976af57fe1
commit
45ec3917ff
11
ajax.php
11
ajax.php
|
@ -46,4 +46,15 @@ switch (get('op')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'list_attachments':
|
||||||
|
|
||||||
|
$id_module = get('id_module');
|
||||||
|
$id_record = get('id_record');
|
||||||
|
$id_plugin = get('id_plugin');
|
||||||
|
|
||||||
|
echo '{( "name": "filelist_and_upload", "id_module": "'.$id_module.'", "id_record": "'.$id_record.'", "id_plugin": "'.$id_plugin.'", "ajax": "true" )}';
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -418,7 +418,7 @@ if (!empty($fatture)) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
{( "name": "filelist_and_upload", "id_module": "<?php echo $id_module; ?>", "id_record": "<?php echo $id_record; ?>" )}
|
{( "name": "filelist_and_upload", "id_module": "<?php echo $id_module; ?>", "id_record": "<?php echo $id_record; ?>", "ajax":"true" )}
|
||||||
|
|
||||||
<a class="btn btn-danger ask" data-backto="record-list">
|
<a class="btn btn-danger ask" data-backto="record-list">
|
||||||
<i class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>
|
<i class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace HTMLBuilder\Manager;
|
namespace HTMLBuilder\Manager;
|
||||||
include_once __DIR__.'/../../../core.php';
|
|
||||||
|
|
||||||
if ($_GET['ajax']) {
|
|
||||||
echo '{( "name": "filelist_and_upload", "id_module": "'.$id_module.'", "id_record": "'.$id_record.'", "id_plugin": "'.$id_plugin.'", "ajax": "true" )}';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 2.3
|
* @since 2.3
|
||||||
|
@ -130,7 +124,7 @@ $result .= '
|
||||||
btn.prop("disabled", false);';
|
btn.prop("disabled", false);';
|
||||||
|
|
||||||
if (($options['ajax'])) {
|
if (($options['ajax'])) {
|
||||||
$result .= '$("#attachments_'.$options['id_record'].((!empty($options['id_plugin'])) ? '_'.$options['id_plugin'] : '').'").load( globals.rootdir + "/src/HTMLBuilder/Manager/FileManager.php?id_module='.$options['id_module'].'&id_record='.$options['id_record'].((!empty($options['id_plugin'])) ? '&id_plugin='.$options['id_plugin'] : '').((!empty($options['id_plugin'])) ? '#tab_'.$options['id_plugin'] : '').'&ajax=true" );';
|
$result .= '$("#attachments_'.$options['id_record'].((!empty($options['id_plugin'])) ? '_'.$options['id_plugin'] : '').'").load( globals.rootdir + "/ajax.php?op=list_attachments&id_module='.$options['id_module'].'&id_record='.$options['id_record'].((!empty($options['id_plugin'])) ? '&id_plugin='.$options['id_plugin'].'#tab_'.$options['id_plugin'] : '').'" );';
|
||||||
}else{
|
}else{
|
||||||
$result .= 'location.href = globals.rootdir + "/editor.php?id_module='.$options['id_module'].'&id_record='.$options['id_record'].((!empty($options['id_plugin'])) ? '#tab_'.$options['id_plugin'] : '').'";';
|
$result .= 'location.href = globals.rootdir + "/editor.php?id_module='.$options['id_module'].'&id_record='.$options['id_record'].((!empty($options['id_plugin'])) ? '#tab_'.$options['id_plugin'] : '').'";';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue