mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-25 14:54:52 +02:00
2011-07-15 Sergio Martin <sergio.martin@artica.es>
* include/javascript/pandora.js operation/agentes/ver_agente.php: Add hack to send to the ajax a custom condition of modules in the agent_changed_by_multiple_agents git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4577 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0d5ce31cc7
commit
c5d23bc9f4
@ -1,3 +1,9 @@
|
|||||||
|
2011-07-15 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/javascript/pandora.js
|
||||||
|
operation/agentes/ver_agente.php: Add hack to send to the ajax
|
||||||
|
a custom condition of modules in the agent_changed_by_multiple_agents
|
||||||
|
|
||||||
2011-07-15 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2011-07-15 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_gis.php: Changed name of function safe_input to
|
* include/functions_gis.php: Changed name of function safe_input to
|
||||||
|
@ -132,6 +132,14 @@ function isEmptyObject(obj) {
|
|||||||
* @param selected Which module(s) have to be selected
|
* @param selected Which module(s) have to be selected
|
||||||
*/
|
*/
|
||||||
function agent_changed_by_multiple_agents (event, id_agent, selected) {
|
function agent_changed_by_multiple_agents (event, id_agent, selected) {
|
||||||
|
// Hack to add custom condition
|
||||||
|
if($("#hidden-custom_condition").val() != undefined) {
|
||||||
|
custom_condition = $("#hidden-custom_condition").val();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
custom_condition = '';
|
||||||
|
}
|
||||||
|
|
||||||
var idAgents = Array();
|
var idAgents = Array();
|
||||||
|
|
||||||
jQuery.each ($("#id_agents option:selected"), function (i, val) {
|
jQuery.each ($("#id_agents option:selected"), function (i, val) {
|
||||||
@ -155,7 +163,8 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
|
|||||||
{"page": "operation/agentes/ver_agente",
|
{"page": "operation/agentes/ver_agente",
|
||||||
"get_agent_modules_json_for_multiple_agents": 1,
|
"get_agent_modules_json_for_multiple_agents": 1,
|
||||||
"id_agent[]": idAgents,
|
"id_agent[]": idAgents,
|
||||||
"all": find_modules
|
"all": find_modules,
|
||||||
|
"custom_condition": custom_condition
|
||||||
},
|
},
|
||||||
function (data) {
|
function (data) {
|
||||||
$('#module').empty ();
|
$('#module').empty ();
|
||||||
|
@ -133,6 +133,7 @@ if (is_ajax ()) {
|
|||||||
|
|
||||||
if ($get_agent_modules_json_for_multiple_agents) {
|
if ($get_agent_modules_json_for_multiple_agents) {
|
||||||
$idAgents = get_parameter('id_agent');
|
$idAgents = get_parameter('id_agent');
|
||||||
|
$custom_condition = get_parameter('custom_condition', '');
|
||||||
$all = (string)get_parameter('all', 'all');
|
$all = (string)get_parameter('all', 'all');
|
||||||
switch ($all) {
|
switch ($all) {
|
||||||
default:
|
default:
|
||||||
@ -191,7 +192,8 @@ if (is_ajax ()) {
|
|||||||
|
|
||||||
$nameModules = db_get_all_rows_sql('SELECT DISTINCT(nombre)
|
$nameModules = db_get_all_rows_sql('SELECT DISTINCT(nombre)
|
||||||
FROM tagente_modulo t1
|
FROM tagente_modulo t1
|
||||||
WHERE ' . $enabled . '
|
WHERE ' . $enabled .
|
||||||
|
io_safe_output($custom_condition) . '
|
||||||
AND delete_pending = 0
|
AND delete_pending = 0
|
||||||
AND id_agente IN (' . implode(',', $idAgents) . ') AND (
|
AND id_agente IN (' . implode(',', $idAgents) . ') AND (
|
||||||
SELECT count(nombre)
|
SELECT count(nombre)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user