Quellcode durchsuchen

修改表格弹窗

namejr vor 4 Jahren
Ursprung
Commit
8c466c3894
2 geänderte Dateien mit 14 neuen und 3 gelöschten Zeilen
  1. 3 0
      EBook.Web/Common/tasklib_book.css
  2. 11 3
      EBook.Web/Common/tasklib_book.js

+ 3 - 0
EBook.Web/Common/tasklib_book.css

@@ -71,4 +71,7 @@ p{word-break: break-word;word-wrap: break-word;clear:both;line-height: 22px;}
 .underlineContentShow[data-status='1']{
     display:inline-block;
     border-bottom:1px solid rgb(151, 151, 151);
+}
+.container-table{
+    overflow-x:auto;
 }

+ 11 - 3
EBook.Web/Common/tasklib_book.js

@@ -154,7 +154,7 @@ function bindEventTeaOrignalYS() {
         }
     });
     //处理表格宽度
-    $.each($(".wordTable"), function (index, item) {
+    $.each($(".container-table"), function (index, item) {
         $(item).css("width", bodyWidth + "px");
     });
 
@@ -219,7 +219,7 @@ function bindEventYS() {
         }
     });
     //处理表格宽度
-    $.each($(".wordTable"), function (index, item) {
+    $.each($(".container-table"), function (index, item) {
         $(item).css("width", bodyWidth + "px");
     });
     //获取两个之间的答题点
@@ -405,8 +405,16 @@ function bindEventYS() {
     });
     //处理表格样式
     $("td").attr("style", "");
+    $(".container-table").on("touchstart", function () {
+        pressTableFlag = true;
+    }).on("touchend", function () {
+        pressTableFlag = false;
+    });
+}
+var pressTableFlag = false;
+function GetPressFlag() {
+    alert(pressTableFlag);
 }
-
 // 判断是否存在中文(true表示存在)
 var hasChineseWorld = function (dataStr) {
     if (escape(dataStr).indexOf("%u") < 0)