1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
$(function () {
GetlstParents();
$("#lstFiltreFamParent").selectmenu().selectmenu("menuWidget").addClass("lstFiltreoverflow");
});
function GetlstParents() {
$.ajax({
type: "POST",
url: "/Classement/Interne.aspx/GetlstParents",
data: '{"PageEnCours":"' + document.location.href.toString() + '"}',
contentType: 'application/json; charset=utf-8',
dataType: "json",
success: function (msg) {
if (msg.d.Retour.Reussi) { BuildLstParents(msg.d.LstParents); }
else { AfficheMsgRetour(msg.d.Retour); }
},
error: function () { AfficheMsgRetour({ Reussi: false, Titre: "Liste des classements parents", Msg: "Erreur accès fonction." }); }
});
}
function BuildLstParents(Lst) {
var LaList = $("#lstFiltreFamParent");
$('option', "#lstFiltreFamParent").remove();
//var Spacelst = "| ";
var Spacelst = "| ";
$.each(Lst, function (i, item) {
LaList.append($('<option>', { value: item.Id, text: Spacelst.repeat(item.Depth -1) +"|--- " + item.DisplayName }));
});
} |
Partager