moved selection fn to forum script

This commit is contained in:
Václav Šmejkal 2024-05-22 18:25:45 +02:00
parent d285cf7283
commit f8fc97f88b
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 16 additions and 16 deletions

View File

@ -68,20 +68,4 @@
} }
}); });
} }
function selection(type, value)
{
return new Promise(function(resolve)
{
$.ajax
({
url: "./res/forum/admin/" + type + "_selection.html",
dataType: "html",
success: function(result)
{
resolve(result.replace("value=\"" + value, "selected value=\"" + value));
}
})
});
}
</script> </script>

View File

@ -15,6 +15,22 @@ function show(file)
}); });
} }
function selection(type, value)
{
return new Promise(function(resolve)
{
$.ajax
({
url: "./res/forum/admin/" + type + "_selection.html",
dataType: "html",
success: function(result)
{
resolve(result.replace("value=\"" + value, "selected value=\"" + value));
}
})
});
}
function inject_info(id, username, postfix) function inject_info(id, username, postfix)
{ {
$.ajax $.ajax