mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Fixes
This commit is contained in:
parent
a045faeb6d
commit
c647ae8048
@ -70,7 +70,7 @@ class Tree {
|
|||||||
// First filter by name and father
|
// First filter by name and father
|
||||||
$groups = db_get_all_rows_filter('tgrupo',
|
$groups = db_get_all_rows_filter('tgrupo',
|
||||||
$filter,
|
$filter,
|
||||||
array('id_grupo', 'nombre'));
|
array('id_grupo', 'nombre'));html_debug_print($groups, true);
|
||||||
if (empty($groups))
|
if (empty($groups))
|
||||||
$groups = array();
|
$groups = array();
|
||||||
|
|
||||||
|
@ -116,7 +116,9 @@ $table->data[0][3] = html_print_input_text(
|
|||||||
$table->data[0][4] = html_print_submit_button(
|
$table->data[0][4] = html_print_submit_button(
|
||||||
__('Filter'), "uptbutton", false, 'class="sub search"', true);
|
__('Filter'), "uptbutton", false, 'class="sub search"', true);
|
||||||
|
|
||||||
|
echo '<form id="tree_search" method="post" action="index.php?sec=monitoring&sec2=operation/tree&refr=0&tab='.$tab.'&pure='.$config['pure'].'">';
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
|
echo '</form>';
|
||||||
|
|
||||||
// --------------------- form filter -----------------------------------
|
// --------------------- form filter -----------------------------------
|
||||||
|
|
||||||
@ -128,16 +130,32 @@ echo "<div id='tree-controller-detail-recipient'>";
|
|||||||
echo "</div>";
|
echo "</div>";
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(".loading_tree").hide();
|
||||||
var treeController = TreeController.getController();
|
|
||||||
|
var treeController = TreeController.getController();
|
||||||
|
|
||||||
|
processTreeSearch();
|
||||||
|
|
||||||
|
$("form#tree_search").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
processTreeSearch();
|
||||||
|
});
|
||||||
|
|
||||||
|
function processTreeSearch () {
|
||||||
|
$(".loading_tree").show();
|
||||||
|
|
||||||
var parameters = {};
|
var parameters = {};
|
||||||
parameters['page'] = "include/ajax/tree.ajax";
|
parameters['page'] = "include/ajax/tree.ajax";
|
||||||
parameters['getChildren'] = 1;
|
parameters['getChildren'] = 1;
|
||||||
parameters['filter'] = {};
|
parameters['filter'] = {};
|
||||||
parameters['filter']['type'] = "<?php echo $tab; ?>";
|
parameters['type'] = "<?php echo $tab; ?>";
|
||||||
parameters['filter']['search'] = "<?php echo $search; ?>";
|
parameters['filter']['search'] = function () {
|
||||||
parameters['filter']['status'] = "<?php echo $status; ?>";
|
return $("input#text-search").val();
|
||||||
|
};
|
||||||
|
parameters['filter']['status'] = function () {
|
||||||
|
return $("select#status").val();
|
||||||
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -155,13 +173,14 @@ echo "</div>";
|
|||||||
baseURL: "<?php echo $config['homeurl']; ?>/",
|
baseURL: "<?php echo $config['homeurl']; ?>/",
|
||||||
ajaxURL: "<?php echo $config['homeurl']; ?>/ajax.php",
|
ajaxURL: "<?php echo $config['homeurl']; ?>/ajax.php",
|
||||||
filter: {
|
filter: {
|
||||||
search: "<?php echo $tab; ?>",
|
search: parameters['filter']['search'],
|
||||||
status: "<?php echo $status; ?>"
|
status: parameters['filter']['status']
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataType: "json"
|
dataType: "json"
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user