");
ajax_box_begin(&tq, AJAX_BOX_SIDEBOX, "channelgroups",
NULL, "Channel groups");
tcp_qprintf(&tq, "
");
tcp_qprintf(&tq, "
");
TAILQ_FOREACH(tcg, &all_channel_groups, tcg_global_link) {
if(tcg->tcg_hidden)
continue;
ajax_chgroup_build(&tq, tcg);
}
tcp_qprintf(&tq, "
");
ajax_js(&tq, "Sortable.create(\"channelgrouplist\", "
"{onUpdate:function(){updatelistonserver("
"'channelgrouplist', "
"'/ajax/chgroup_updateorder', "
"'list-info'"
")}});");
/**
* Add new group
*/
ajax_box_begin(&tq, AJAX_BOX_BORDER, NULL, NULL, NULL);
tcp_qprintf(&tq,
"
");
ajax_box_end(&tq, AJAX_BOX_BORDER);
ajax_box_end(&tq, AJAX_BOX_SIDEBOX);
tcp_qprintf(&tq, "
");
http_output_queue(hc, &tq, "text/html; charset=UTF-8", 0);
return 0;
}
/**
*
*/
void
ajax_config_channels_init(void)
{
http_path_add("/ajax/chgroup_add" , NULL, ajax_chgroup_add);
http_path_add("/ajax/chgroup_del" , NULL, ajax_chgroup_del);
http_path_add("/ajax/chgroup_updateorder", NULL, ajax_chgroup_updateorder);
}