|
|
@@ -63,7 +63,7 @@ function note_sent_edit_dlg_init() {
|
|
|
}
|
|
|
function note_init(input) {
|
|
|
let newString = input.replace(/\{\{/g, '<note info="');
|
|
|
- newString = newString.replace(/\}\}/g, '" style="width=70vw;"></note>');
|
|
|
+ newString = newString.replace(/\}\}/g, '" ></note>');
|
|
|
|
|
|
let output = "<div>";
|
|
|
output += marked(newString);
|
|
|
@@ -469,7 +469,40 @@ function note_json_html(in_json) {
|
|
|
//output += "<div class='translation_div'>";
|
|
|
for (const iterator of in_json.translation) {
|
|
|
output += "<div class='tran' lang='" + iterator.lang + "'>";
|
|
|
-
|
|
|
+ //译文工具按钮开始
|
|
|
+ output += "<div class='tran_text_tool_botton' onclick='tool_bar_show(this)'>";
|
|
|
+ output +=
|
|
|
+ "<div class='icon_expand' style='width: 0.8em;height: 0.8em;min-width: 0.8em;min-height: 0.8em;'></div>";
|
|
|
+ //译文工具栏开始
|
|
|
+ output += "<div class='tran_text_tool_bar'>";
|
|
|
+ output += "<li class = 'tip_buttom' ";
|
|
|
+ output +=
|
|
|
+ " onclick=\"note_edit_sentence('" +
|
|
|
+ in_json.book +
|
|
|
+ "' ,'" +
|
|
|
+ in_json.para +
|
|
|
+ "' ,'" +
|
|
|
+ in_json.begin +
|
|
|
+ "' ,'" +
|
|
|
+ in_json.end +
|
|
|
+ "' ,'" +
|
|
|
+ iterator.channal +
|
|
|
+ "')\"";
|
|
|
+ output += ">" + gLocal.gui.edit + "</li>";
|
|
|
+ output += "<li class = 'tip_buttom' ";
|
|
|
+ output += " onclick=\"history_show('" + iterator.id + "')\"";
|
|
|
+ output += ">" + gLocal.gui.timeline + "</li>";
|
|
|
+ output += "<li class = 'tip_buttom'>" + gLocal.gui.extension + "</li>";
|
|
|
+ output += "<li class = 'tip_buttom'>" + gLocal.gui.like + "</li>";
|
|
|
+ output += "<li class = 'tip_buttom'>" + gLocal.gui.comment + "</li>";
|
|
|
+ output += "<li class = 'tip_buttom'>" + gLocal.gui.copy + "</li>";
|
|
|
+ output += "<li class = 'tip_buttom'>" + gLocal.gui.digest + "</li>";
|
|
|
+ output += "<li class = 'tip_buttom'>" + gLocal.gui.share_to + "</li>";
|
|
|
+ output += "</div>";
|
|
|
+ //译文工具栏结束
|
|
|
+ output += "</div>";
|
|
|
+ //译文工具按钮结束
|
|
|
+ //译文正文开始
|
|
|
output +=
|
|
|
"<div class='text' id='tran_text_" +
|
|
|
in_json.book +
|
|
|
@@ -495,39 +528,14 @@ function note_json_html(in_json) {
|
|
|
output += note_init(term_std_str_to_tran(iterator.text, iterator.channal, iterator.editor, iterator.lang));
|
|
|
}
|
|
|
output += "</div>";
|
|
|
-
|
|
|
- //句子工具栏
|
|
|
- output += "<div class='tran_text_tool_bar'>";
|
|
|
- output += "<span class = 'tip_buttom' ";
|
|
|
- output +=
|
|
|
- " onclick=\"note_edit_sentence('" +
|
|
|
- in_json.book +
|
|
|
- "' ,'" +
|
|
|
- in_json.para +
|
|
|
- "' ,'" +
|
|
|
- in_json.begin +
|
|
|
- "' ,'" +
|
|
|
- in_json.end +
|
|
|
- "' ,'" +
|
|
|
- iterator.channal +
|
|
|
- "')\"";
|
|
|
- output += ">" + gLocal.gui.edit + "</span>";
|
|
|
- output += "<span class = 'tip_buttom' ";
|
|
|
- output += " onclick=\"history_show('" + iterator.id + "')\"";
|
|
|
- output += ">" + gLocal.gui.timeline + "</span>";
|
|
|
- output += "<span class = 'tip_buttom'>" + gLocal.gui.extension + "</span>";
|
|
|
- output += "<span class = 'tip_buttom'>" + gLocal.gui.like + "</span>";
|
|
|
- output += "<span class = 'tip_buttom'>" + gLocal.gui.comment + "</span>";
|
|
|
- output += "<span class = 'tip_buttom'>" + gLocal.gui.copy + "</span>";
|
|
|
- output += "<span class = 'tip_buttom'>" + gLocal.gui.digest + "</span>";
|
|
|
- output += "<span class = 'tip_buttom'>" + gLocal.gui.share_to + "</span>";
|
|
|
- output += "</div>";
|
|
|
- //句子工具栏结束
|
|
|
+ //译文正文结束
|
|
|
|
|
|
output += "</div>";
|
|
|
+ //单个channal译文框结束
|
|
|
}
|
|
|
+ //所选全部译文结束
|
|
|
//output += "</div>";
|
|
|
-
|
|
|
+ //未选择的其他译文开始
|
|
|
output += "<div class='other_tran_div' sent='";
|
|
|
output += in_json.book + "-" + in_json.para + "-" + in_json.begin + "-" + in_json.end;
|
|
|
output += "'>";
|
|
|
@@ -540,17 +548,19 @@ function note_json_html(in_json) {
|
|
|
|
|
|
output += "</div>";
|
|
|
output += "</div>";
|
|
|
-
|
|
|
+ //未选择的其他译文开始
|
|
|
+ //新增译文按钮开始
|
|
|
output += "<div class='add_new icon_add' ";
|
|
|
output += "book='" + in_json.book + "' ";
|
|
|
output += "para='" + in_json.para + "' ";
|
|
|
output += "begin='" + in_json.begin + "' ";
|
|
|
output += "end='" + in_json.end + "' ";
|
|
|
- output += " style='left:0;'>";
|
|
|
+ output += " >";
|
|
|
|
|
|
//output += "<div class='more_tran icon_expand'></div>";
|
|
|
output += "</div>";
|
|
|
-
|
|
|
+ //新增译文按钮结束
|
|
|
+ //出处路径开始
|
|
|
output += "<div class='ref'>" + in_json.ref;
|
|
|
output +=
|
|
|
"<span class='sent_no'>" +
|
|
|
@@ -563,7 +573,7 @@ function note_json_html(in_json) {
|
|
|
in_json.end +
|
|
|
"<span>" +
|
|
|
"</div>";
|
|
|
-
|
|
|
+ //出处路径结束
|
|
|
return output;
|
|
|
}
|
|
|
|
|
|
@@ -780,3 +790,11 @@ function copy_ref(book, para, begin, end) {
|
|
|
function edit_in_studio(book, para, begin, end) {
|
|
|
wbw_channal_list_open(book, [para]);
|
|
|
}
|
|
|
+
|
|
|
+function tool_bar_show(element) {
|
|
|
+ if ($(element).find(".tran_text_tool_bar").css("display") == "none") {
|
|
|
+ $(element).find(".tran_text_tool_bar").show();
|
|
|
+ } else {
|
|
|
+ $(element).find(".tran_text_tool_bar").hide();
|
|
|
+ }
|
|
|
+}
|