diff --git a/src/HTMLBuilder/Manager/FileManager.php b/src/HTMLBuilder/Manager/FileManager.php
index 27a61f705..086a7081a 100644
--- a/src/HTMLBuilder/Manager/FileManager.php
+++ b/src/HTMLBuilder/Manager/FileManager.php
@@ -1,6 +1,12 @@
';
+$result .= '
+
+
';
if (!empty($options['showpanel'])) {
$result .= '
@@ -117,12 +125,17 @@ class FileManager implements ManagerInterface
dataType : "html",
data: form_data,
success: function(data) {
-
+
btn.html(prev_html);
- btn.prop("disabled", false);
-
- location.href = globals.rootdir + "/editor.php?id_module='.$options['id_module'].'&id_record='.$options['id_record'].((!empty($options['id_plugin'])) ? '#tab_'.$options['id_plugin'] : '').'";
- },
+ btn.prop("disabled", false);';
+
+ 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" );';
+ }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 .= '},
error: function(data) {
alert(data);
}
@@ -133,9 +146,10 @@ class FileManager implements ManagerInterface
if (!empty($options['showpanel'])) {
$result .= '
+
';
}
return $result;
}
-}
+}
\ No newline at end of file