Merge branch 'ent-7285-No-aparece-mensaje-en-el-TreeView-al-filtrar' into 'develop'

Ent 7285 no aparece mensaje en el tree view al filtrar

See merge request artica/pandorafms!4018
This commit is contained in:
Daniel Rodriguez 2021-05-06 12:26:58 +00:00
commit 77a1de6b1b

View File

@ -356,28 +356,34 @@ enterprise_hook('close_meta_frame');
if (data.success) { if (data.success) {
$(".loading_tree").hide(); $(".loading_tree").hide();
var foundMessage = ''; var foundMessage = '';
switch (parameters['type']) { if (data.tree.length === 0) {
case 'policies': foundMessage = "<?php echo __('No data found'); ?>";
foundMessage = "<?php echo __('Policies found'); ?>"; $("div#tree-controller-recipient").append(foundMessage);
break; } else {
case 'os': switch (parameters['type']) {
foundMessage = "<?php echo __('Operating systems found'); ?>"; case 'policies':
break; foundMessage = "<?php echo __('Policies found'); ?>";
case 'tag': break;
foundMessage = "<?php echo __('Tags found'); ?>"; case 'os':
break; foundMessage = "<?php echo __('Operating systems found'); ?>";
case 'module_group': break;
foundMessage = "<?php echo __('Module Groups found'); ?>"; case 'tag':
break; foundMessage = "<?php echo __('Tags found'); ?>";
case 'module': break;
foundMessage = "<?php echo __('Modules found'); ?>"; case 'module_group':
break; foundMessage = "<?php echo __('Module Groups found'); ?>";
case 'group': break;
default: case 'module':
foundMessage = "<?php echo __('Groups found'); ?>"; foundMessage = "<?php echo __('Modules found'); ?>";
break; break;
case 'group':
default:
foundMessage = "<?php echo __('Groups found'); ?>";
break;
}
} }
treeController.init({ treeController.init({
recipient: $("div#tree-controller-recipient"), recipient: $("div#tree-controller-recipient"),
detailRecipient: $.fixedBottomBox({ width: 400, height: window.innerHeight * 0.9 }), detailRecipient: $.fixedBottomBox({ width: 400, height: window.innerHeight * 0.9 }),