Browse Source

studio 译文支持历史记录

visuddhinanda 5 years ago
parent
commit
bd0aa720c9
2 changed files with 5 additions and 9 deletions
  1. 5 8
      app/studio/js/render.js
  2. 0 1
      app/usent/historay.js

+ 5 - 8
app/studio/js/render.js

@@ -1605,6 +1605,7 @@ function render_tran_sent_block(book, para, begin, end, channal = 0, readonly =
 	let sent_text = "";
 	let sent_lang = "en";
 	let objSent;
+	let thischannal;
 	if (channal == 0) {
 		//百家言
 		if (netSent.length > 0) {
@@ -1618,15 +1619,11 @@ function render_tran_sent_block(book, para, begin, end, channal = 0, readonly =
 	} else {
 		sender = "通道的名字";
 		objSent = _user_sent_buffer.getSentText(book, para, begin, end, channal);
-
+		thischannal = channal_getById(channal);
 		if (objSent == false) {
 			objSent = new Object();
 			objSent.text = "";
-			if (doc_head("lang") == "") {
-				objSent.language = "en";
-			} else {
-				objSent.language = doc_head("lang");
-			}
+			objSent.language = thischannal.lang;
 			objSent.id = "";
 			objSent.tag = "[]";
 			objSent.author = "{}";
@@ -1652,9 +1649,9 @@ function render_tran_sent_block(book, para, begin, end, channal = 0, readonly =
 	} else {
 		output += "<span style='width: 100%;display: contents;'>";
 		output += "<span>";
-		let thischannal = channal_getById(channal);
+
 		if (thischannal) {
-			output += thischannal.name;
+			output += thischannal.name + "-" + thischannal.lang;
 		} else {
 			output += "未知的频道名";
 		}

+ 0 - 1
app/usent/historay.js

@@ -62,7 +62,6 @@ function history_show(id) {
 
 					html += "<div class=''>" + strPassTime + "</div>";
 					html += "<div class=''>" + iterator.text + "</div>";
-					html += "<div class=''><button>restore</button></div>";
 				}
 				$("#sent_history_content").html(html);
 				$("#sent_history_dlg").dialog("open");