1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-27 22:19:26 +01:00

Update src/HTMLBuilder/Manager/FileManager.php

This commit is contained in:
Luca 2018-10-30 22:51:54 +01:00
parent 7cbaa89bae
commit 6b97f289be

View File

@ -189,23 +189,27 @@ class FileManager implements ManagerInterface
<script>
$(document).ready(function(){
$("#'.$attachment_id.' #categoria").autocomplete({';
$first = true;
$n_categorie = 0;
foreach ($categories as $category) {
if (!empty($category['category'])){
if ($first)
if (!empty($category['category'])){
if ($n_categorie==0){
$result .= '
source: [';
}
$result .= '
"'.$category['category'].'",';
if ($first)
$result .= '
],';
$first = false;
$n_categorie++;
}
}
if ($n_categorie>0){
$result .= '
],';
}else{
$result .= '
source:"[]",';
}
$result .= '
minLength: 0
}).focus(function() {