Bläddra i källkod

:bug: 义註菜单一出一大堆

visuddhinanda@gmail.com 4 år sedan
förälder
incheckning
b9ad813d8d
2 ändrade filer med 18 tillägg och 4 borttagningar
  1. 12 1
      public/app/term/note.js
  2. 6 3
      public/app/term/term.css

+ 12 - 1
public/app/term/note.js

@@ -212,7 +212,8 @@ function note_refresh_new(callback = null) {
 						splite_pali_word();
 						//处理编辑框消息
 						tran_sent_textarea_event_init();
-
+                        //处理鼠标移入显示菜单消息
+                        setSentToolBarEvent();
 						//初始化mermaid
 						mermaid.initialize({startOnLoad:true});
 
@@ -1008,6 +1009,7 @@ function render_one_sent_tran_a(iterator, diff = false) {
 
 	let html = "";
 	html += "<div class='sent_tran ";
+    html += iterator.channalinfo.type;
 	if (typeof iterator.is_pr != "undefined" && iterator.is_pr == true) {
 		html += " pr ";
 	}
@@ -2554,3 +2556,12 @@ function term_parent(paliword) {
 	}
 	return output;
 }
+
+function setSentToolBarEvent(){
+    $('.sent_tran_inner').off('mouseenter').on('mouseenter',function(){
+        $(this).children('.tool_bar').first().children('.right').show();
+    });
+    $('.sent_tran_inner').off('mouseleave').on('mouseleave',function(){
+        $(this).children('.tool_bar').first().children('.right').hide();
+    })
+}

+ 6 - 3
public/app/term/term.css

@@ -728,15 +728,18 @@ pw {
 	/*margin-right: 20px;*/
 }
 .commentary .tool_bar > .right{
-    left: 8em;
+    /*left: 8em;*/
     width: 8em;
 }
+.translation>.sent_tran_inner>.tool_bar > .right{
+    right: 2em;
+}
 
 .sent_tran_inner:hover .tool_bar > .right {
-	display: block;
+	/*display: block;*/
 }
 .list_with_head:hover .tool_bar > .right {
-	display: block;
+	/*display: block;*/
 }
 .list_with_head {
 	position: relative;