mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Fixed no data found in tree view
This commit is contained in:
parent
9184d2b11f
commit
22914f410c
@ -356,28 +356,34 @@ enterprise_hook('close_meta_frame');
|
||||
if (data.success) {
|
||||
$(".loading_tree").hide();
|
||||
var foundMessage = '';
|
||||
switch (parameters['type']) {
|
||||
case 'policies':
|
||||
foundMessage = "<?php echo __('Policies found'); ?>";
|
||||
break;
|
||||
case 'os':
|
||||
foundMessage = "<?php echo __('Operating systems found'); ?>";
|
||||
break;
|
||||
case 'tag':
|
||||
foundMessage = "<?php echo __('Tags found'); ?>";
|
||||
break;
|
||||
case 'module_group':
|
||||
foundMessage = "<?php echo __('Module Groups found'); ?>";
|
||||
break;
|
||||
case 'module':
|
||||
foundMessage = "<?php echo __('Modules found'); ?>";
|
||||
break;
|
||||
case 'group':
|
||||
default:
|
||||
foundMessage = "<?php echo __('Groups found'); ?>";
|
||||
break;
|
||||
if (data.tree.length === 0) {
|
||||
foundMessage = "<?php echo __('No data found'); ?>";
|
||||
$("div#tree-controller-recipient").append(foundMessage);
|
||||
} else {
|
||||
switch (parameters['type']) {
|
||||
case 'policies':
|
||||
foundMessage = "<?php echo __('Policies found'); ?>";
|
||||
break;
|
||||
case 'os':
|
||||
foundMessage = "<?php echo __('Operating systems found'); ?>";
|
||||
break;
|
||||
case 'tag':
|
||||
foundMessage = "<?php echo __('Tags found'); ?>";
|
||||
break;
|
||||
case 'module_group':
|
||||
foundMessage = "<?php echo __('Module Groups found'); ?>";
|
||||
break;
|
||||
case 'module':
|
||||
foundMessage = "<?php echo __('Modules found'); ?>";
|
||||
break;
|
||||
case 'group':
|
||||
default:
|
||||
foundMessage = "<?php echo __('Groups found'); ?>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
treeController.init({
|
||||
recipient: $("div#tree-controller-recipient"),
|
||||
detailRecipient: $.fixedBottomBox({ width: 400, height: window.innerHeight * 0.9 }),
|
||||
|
Loading…
x
Reference in New Issue
Block a user