2020-09-26 16:19:37 +02:00
|
|
|
function _partition_set_attr(partition_id, attr_name, attr_value) {
|
2023-11-17 13:53:17 +01:00
|
|
|
$.post(
|
|
|
|
SCO_URL + "/partition_set_attr",
|
|
|
|
{
|
|
|
|
partition_id: partition_id,
|
|
|
|
attr: attr_name,
|
|
|
|
value: attr_value,
|
|
|
|
},
|
|
|
|
function (result) {
|
|
|
|
sco_message(result);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
return;
|
2021-06-21 18:46:35 +02:00
|
|
|
}
|
2020-09-26 16:19:37 +02:00
|
|
|
|
|
|
|
// Met à jour bul_show_rank lorsque checkbox modifiees:
|
|
|
|
function update_rk(e) {
|
2023-11-17 13:53:17 +01:00
|
|
|
var partition_id = $(e).attr("data-partition_id");
|
|
|
|
var v;
|
|
|
|
if (e.checked) v = "1";
|
|
|
|
else v = "0";
|
|
|
|
_partition_set_attr(partition_id, "bul_show_rank", v);
|
2020-09-26 16:19:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function update_show_in_list(e) {
|
2023-11-17 13:53:17 +01:00
|
|
|
var partition_id = $(e).attr("data-partition_id");
|
|
|
|
var v;
|
|
|
|
if (e.checked) v = "1";
|
|
|
|
else v = "0";
|
2021-06-21 18:46:35 +02:00
|
|
|
|
2023-11-17 13:53:17 +01:00
|
|
|
_partition_set_attr(partition_id, "show_in_lists", v);
|
2021-06-21 18:46:35 +02:00
|
|
|
}
|