var _commit_data;
var previewWin;
function commit_init(param) {
previewWin = model_win_init({ container: "model_win" });
_commit_data = param;
previewWin.show(commit_preview_render());
}
function commit_render_head(step) {
let html = "";
html += "
";
html += "
1
选择版本
";
html += "
2
预览
";
html += "
3
完成
";
html += "
";
return html;
}
function commit_render_channel_select() {
let html = "";
html += "
";
html += commit_render_head(1);
html += "
当前:";
html += "";
html += "
";
html += "
推送到:";
html += "";
html += "
";
html += "";
html += "";
html += "
";
return html;
}
function commit_preview_render() {
let html = "";
html += "
";
html += commit_render_head(2);
if (
typeof _commit_data.src != "undefined" &&
_commit_data.src != null &&
_commit_data.src != "" &&
typeof _commit_data.dest != "undefined" &&
_commit_data.dest != null &&
_commit_data.dest != ""
) {
let sentList = new Array();
for (const iterator of _arrData) {
sentList.push(iterator.book + "-" + iterator.para + "-" + iterator.begin + "-" + iterator.end);
}
_commit_data.sent = sentList;
let arrSentInfo = new Array();
for (const iterator of _commit_data.sent) {
let id = com_guid();
arrSentInfo.push({ id: id, data: iterator });
}
if (arrSentInfo.length > 0) {
let setting = new Object();
setting.lang = "";
setting.channal = _commit_data.src + "," + _commit_data.dest;
$.post(
"../term/note.php",
{
setting: JSON.stringify(setting),
data: JSON.stringify(arrSentInfo),
},
function (data, status) {
if (status == "success") {
let sentData;
let html = "";
try {
sentData = JSON.parse(data);
} catch (e) {}
html += "