function add_to_collect_dlg_init() {
$("[vui='collect-dlg']").each(function () {
$(this).css("position", "relative");
let html = "";
html += '';
html += '' + gLocal.gui.add_to + gLocal.gui.anthology + "";
html += "";
html += "";
html += "";
$(this).html(html);
});
$(".button_add_to_collect").click(function () {
let html = "";
let article_id = $(this).parent().parent().attr("a_id");
html += "
";
$(this).siblings(".float_dlg").first().html(html);
$(this).siblings(".float_dlg").first().show();
$.get(
"../article/list_article_in_collect.php",
{
id: article_id,
},
function (data, status) {
let collect_list = JSON.parse(data);
let id = collect_list.article_id;
let html_exist = "";
for (const iterator of collect_list.exist) {
html_exist +=
"
";
html_exist += iterator.title;
html_exist += "
";
}
$("#add_to_collect_dlg_" + id)
.find(".exist")
.first()
.html(html_exist);
if (collect_list.others) {
let html_others = "";
for (const iterator of collect_list.others) {
html_others +=
"