1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| function _init() {
$.each($('#_userAllStfs').get(0).options, function (i, item) {
var tmp = item.innerHTML.split(',');
stfS.push({ ID: parseInt(tmp[0]), STF: tmp[1], IdStfRm: parseInt(tmp[2]), OsmStf: tmp[3], CodeSecteur: tmp[4] });
$('#stfsList').append('<option value ="' + tmp[0] + '">' + tmp[1] + '</option>');
});
if ($('#_userstfpref').val() == "0") { $('#stfsList').selectpicker('val', "1"); getRecidives(); }
else {
GetFilterTable(stfS, 'ID', parseInt($('#_userstfpref').val())).then(function (stfFilter) {
StfSelected = { ID: stfFilter[0].ID, STF: stfFilter[0].STF, IdStfRm: stfFilter[0].IdStfRm, OsmStf: stfFilter[0].OsmStf, CodeSecteur: stfFilter[0].CodeSecteur };
$('#stfsList').selectpicker('val', stfFilter[0].ID);
getRecidives();
})
}
}
_init(); |
Partager