mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-23 05:54:03 +01:00
Fix categorie allegati
This commit is contained in:
parent
fdcc16cf14
commit
fb2887916e
@ -39,9 +39,9 @@ if (!function_exists('array_clean')) {
|
||||
*/
|
||||
function array_clean($array)
|
||||
{
|
||||
return array_filter($array, function ($value) {
|
||||
return array_values(array_filter($array, function ($value) {
|
||||
return !empty($value);
|
||||
});
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,13 +183,15 @@ class FileManager implements ManagerInterface
|
||||
</div>';
|
||||
}
|
||||
|
||||
$source = array_clean(array_column($categories, 'category'));
|
||||
|
||||
$result .= '
|
||||
<script src="'.ROOTDIR.'/lib/init.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#'.$attachment_id.' #categoria").autocomplete({
|
||||
source: '.json_encode(array_column($categories, 'category')).',
|
||||
source: '.json_encode($source).',
|
||||
minLength: 0
|
||||
}).focus(function() {
|
||||
$(this).autocomplete("search", $(this).val())
|
||||
|
Loading…
Reference in New Issue
Block a user