function term_edit_dlg_init(title = "Trem") {
$("body").append(
'
'
);
$("#term_edit_dlg").dialog({
autoOpen: false,
width: 550,
buttons: [
{
text: "Save",
click: function () {
term_edit_dlg_save();
$(this).dialog("close");
},
},
{
text: "Cancel",
click: function () {
$(this).dialog("close");
},
},
],
});
}
function term_edit_dlg_open(id = "") {
if (id == "") {
$("#term_edit_dlg").dialog("open");
} else {
$.post(
"../term/term_get_id.php",
{
id: id,
},
function (data) {
let word = JSON.parse(data);
let html = term_edit_dlg_render(word);
$("#term_edit_dlg_content").html(html);
$("#term_edit_dlg").dialog("open");
}
);
}
}
function term_edit_dlg_render(word = "") {
if (word == "") {
word = new Object();
word.pali = "";
}
let output = "";
output +=
"";
output += "";
output += "";
output += "";
output += "";
output += "";
output += "";
return output;
}
function term_edit_dlg_save() {}