옵션 목록을 반환합니다
list_name | string | number | 목록 이름 |
options | array | 옵션을 포함하는 배열 |
array | 옵션 배열 |
// 'my_list'라는 이름의 옵션 목록을 가져옵니다
var list = gantt.serverList("my_list");
...
// 지정된 옵션으로 목록을 생성하고 반환합니다
var list = gantt.serverList("options", [
{key: 1, label: "John"},
{key: 2, label: "Adam"},
{key: 3, label: "Diane"}
]);
이 방법은 select 옵션과 같은 컬렉션을 이름이 지정된 목록으로 관리하여 편리하게 업데이트할 수 있게 합니다.
// 이 설정은 'persons'라는 이름의 목록에서
// select 요소로 옵션을 로드할 수 있게 합니다
gantt.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"persons", height:23, type:"select",
options:serverList("persons", persons_array), map_to:"section_id" }
];
Back to top