mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 17:07:01 +01:00
Fix upload immagini su ckeditor
This commit is contained in:
parent
a672e09ef4
commit
aefea42544
23
actions.php
23
actions.php
@ -81,14 +81,6 @@ if (filter('op') == 'aggiungi-allegato' || filter('op') == 'rimuovi-allegato') {
|
||||
]);
|
||||
|
||||
|
||||
echo '
|
||||
<link rel="stylesheet" type="text/css" href="'.$baseurl.'/assets/dist/css/app.min.css" />';
|
||||
|
||||
|
||||
echo '
|
||||
<script src="'.$baseurl.'/assets/dist/js/app.min.js"></script>';
|
||||
|
||||
|
||||
// Creazione file fisico
|
||||
if (!empty($upload)) {
|
||||
//flash()->info(tr('File caricato correttamente!'));
|
||||
@ -96,14 +88,13 @@ if (filter('op') == 'aggiungi-allegato' || filter('op') == 'rimuovi-allegato') {
|
||||
$id_allegato = $dbo->lastInsertedID();
|
||||
$upload = Upload::find($id_allegato);
|
||||
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
window.parent.toastr.success("'.tr('Caricamento riuscito').'");
|
||||
window.parent.CKEDITOR.tools.callFunction('.$funcNum.', "'.$baseurl.'/'.$upload->filepath.'");
|
||||
});
|
||||
</script>';
|
||||
|
||||
$response = [
|
||||
'fileName' => basename($upload->filepath),
|
||||
'uploaded' => 1,
|
||||
'url' => $upload->filepath
|
||||
];
|
||||
|
||||
echo json_encode($response);
|
||||
|
||||
} else {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user