Update src/HTMLBuilder/Manager/FileManager.php
This commit is contained in:
parent
7cbaa89bae
commit
6b97f289be
|
@ -189,22 +189,26 @@ 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 ($n_categorie==0){
|
||||
$result .= '
|
||||
source: [';
|
||||
}
|
||||
|
||||
$result .= '
|
||||
"'.$category['category'].'",';
|
||||
|
||||
if ($first)
|
||||
$n_categorie++;
|
||||
}
|
||||
}
|
||||
if ($n_categorie>0){
|
||||
$result .= '
|
||||
],';
|
||||
|
||||
$first = false;
|
||||
}
|
||||
}else{
|
||||
$result .= '
|
||||
source:"[]",';
|
||||
}
|
||||
$result .= '
|
||||
minLength: 0
|
||||
|
|
Loading…
Reference in New Issue