Browse Source

:bug: 译经楼中添加术语按钮失效

visuddhinanda 4 years ago
parent
commit
d40f5bdabb
2 changed files with 4 additions and 1 deletions
  1. 2 0
      app/term/my_dict_list.php
  2. 2 1
      app/term/term_edit_dlg.js

+ 2 - 0
app/term/my_dict_list.php

@@ -2,6 +2,8 @@
 require_once '../studio/index_head.php';
 ?>
 <body id="file_list_body" onLoad="my_term_onload()">
+	<script src="../channal/channal.js"></script>
+
     <script src="../term/my_term.js"></script>
     <script src="../term/term_edit_dlg.js"></script>
 	<link type="text/css" rel="stylesheet" href="../term/term_edit_dlg.css"/>

+ 2 - 1
app/term/term_edit_dlg.js

@@ -119,8 +119,9 @@ function term_edit_dlg_render(word = "") {
 	output += "<legend>" + gLocal.gui.channel + "</legend>";
 	output += "<select id='term_edit_form_channal' name='channal'>";
 	output += "<option value=''>通用于所有版本</option>";
+	word.channel = word.channal;
 	for (const iterator of _my_channal) {
-		if(iterator.id==word.channel){
+		if(word.channel=="" || (word.channel!="" && iterator.id==word.channel)){
 		output += "<option value='"+iterator.id+"'>仅用于"+iterator.name+"</option>";
 		}
 	}