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>
|
||||
|
||||
* index.php: Fixed load of extension startup hook function.
|
||||
|
|
|
@ -91,14 +91,12 @@
|
|||
this.config = $.extend (this.config, $.pandoraSelectAgentModule.defaults, settings);
|
||||
|
||||
var config = this.config;
|
||||
|
||||
$(this).change (function () {
|
||||
var $select = $(config.moduleSelect).disable ();
|
||||
$(config.loading).show ();
|
||||
$("option[value!=0]", $select).remove ();
|
||||
if (! config.callbackBefore (this))
|
||||
return;
|
||||
|
||||
jQuery.post ('ajax.php',
|
||||
{"page": "operation/agentes/ver_agente",
|
||||
"get_agent_modules_json": 1,
|
||||
|
@ -109,9 +107,19 @@
|
|||
function (data) {
|
||||
jQuery.each (data, function (i, value) {
|
||||
config.callbackPre ();
|
||||
// Get the selected item from hidden field
|
||||
selected = $('#hidden-'+config.moduleSelect.attr('id')+'_selected').val();
|
||||
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.moduleSelect).append (option);
|
||||
});
|
||||
|
@ -122,7 +130,9 @@
|
|||
"json"
|
||||
);
|
||||
});
|
||||
$(this).trigger("change");
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue