2011-09-28 Sergio Martin <sergio.martin@artica.es>
* include/javascript/jquery.pandora.controls.js: Fixed module select refresh from jquery controls to fix the graph widget on dashboard git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5017 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c7ba124a5b
commit
188c0d6fd4
|
@ -1,3 +1,9 @@
|
||||||
|
2011-09-28 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/javascript/jquery.pandora.controls.js: Fixed module
|
||||||
|
select refresh from jquery controls to fix the graph widget
|
||||||
|
on dashboard
|
||||||
|
|
||||||
2011-09-26 Sancho Lerena <slerena@artica.es>
|
2011-09-26 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* index.php: Fixed load of extension startup hook function.
|
* index.php: Fixed load of extension startup hook function.
|
||||||
|
|
|
@ -91,14 +91,12 @@
|
||||||
this.config = $.extend (this.config, $.pandoraSelectAgentModule.defaults, settings);
|
this.config = $.extend (this.config, $.pandoraSelectAgentModule.defaults, settings);
|
||||||
|
|
||||||
var config = this.config;
|
var config = this.config;
|
||||||
|
|
||||||
$(this).change (function () {
|
$(this).change (function () {
|
||||||
var $select = $(config.moduleSelect).disable ();
|
var $select = $(config.moduleSelect).disable ();
|
||||||
$(config.loading).show ();
|
$(config.loading).show ();
|
||||||
$("option[value!=0]", $select).remove ();
|
$("option[value!=0]", $select).remove ();
|
||||||
if (! config.callbackBefore (this))
|
if (! config.callbackBefore (this))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
jQuery.post ('ajax.php',
|
jQuery.post ('ajax.php',
|
||||||
{"page": "operation/agentes/ver_agente",
|
{"page": "operation/agentes/ver_agente",
|
||||||
"get_agent_modules_json": 1,
|
"get_agent_modules_json": 1,
|
||||||
|
@ -109,9 +107,19 @@
|
||||||
function (data) {
|
function (data) {
|
||||||
jQuery.each (data, function (i, value) {
|
jQuery.each (data, function (i, value) {
|
||||||
config.callbackPre ();
|
config.callbackPre ();
|
||||||
option = $("<option></option>")
|
// Get the selected item from hidden field
|
||||||
.attr ("value", value['id_agente_modulo'])
|
selected = $('#hidden-'+config.moduleSelect.attr('id')+'_selected').val();
|
||||||
.html (js_html_entity_decode (value['nombre']));
|
if(selected == i) {
|
||||||
|
option = $("<option></option>")
|
||||||
|
.attr ("selected", "selected")
|
||||||
|
.attr ("value", value['id_agente_modulo'])
|
||||||
|
.html (js_html_entity_decode (value['nombre']));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
option = $("<option></option>")
|
||||||
|
.attr ("value", value['id_agente_modulo'])
|
||||||
|
.html (js_html_entity_decode (value['nombre']));
|
||||||
|
}
|
||||||
config.callbackPost (i, value, option);
|
config.callbackPost (i, value, option);
|
||||||
$(config.moduleSelect).append (option);
|
$(config.moduleSelect).append (option);
|
||||||
});
|
});
|
||||||
|
@ -122,7 +130,9 @@
|
||||||
"json"
|
"json"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
$(this).trigger("change");
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue