Explorar o código

补充卡控对错题内容渲染

namejr %!s(int64=4) %!d(string=hai) anos
pai
achega
2be0128712
Modificáronse 1 ficheiros con 8 adicións e 4 borrados
  1. 8 4
      EBook.Web/Common/tasklib_book.js

+ 8 - 4
EBook.Web/Common/tasklib_book.js

@@ -232,7 +232,8 @@ function bindEventYS() {
         var NextClsName = $(this).parent().next().attr("class");
         var PreClsName = $(this).parent().prev().attr("class");
         if ($(this).attr("data-status") == "0") {
-            if (NClsName == NextClsName) {
+            if (NClsName == NextClsName && NClsName.indexOf(" group") > -1) {
+                // 相同前缀且有分组才渲染
                 $(this).parent().next().find(".yaoshi").attr("data-status", "1");
                 $(this).parent().next().find(".yaoshi").attr("src", PicInfo.yaoshiShowImgUrl);
                 $.each($(this).parent().next().find(".underlineContent"), function (index, item) {
@@ -246,7 +247,8 @@ function bindEventYS() {
                     $(item).find(".phraseStyle").css("background-color", "#f2db8b");
                 });
             }
-            if (PClsName == PreClsName) {
+            if (PClsName == PreClsName && NClsName.indexOf(" group") > -1) {
+                // 相同前缀且有分组才渲染
                 $(this).parent().prev().find(".yaoshi").attr("data-status", "1");
                 $(this).parent().prev().find(".yaoshi").attr("src", PicInfo.yaoshiShowImgUrl);
                 $(this).parent().prev().find(".underlineContent").css("color", "#989898");
@@ -272,7 +274,8 @@ function bindEventYS() {
             }
         }
         else {
-            if (NClsName == NextClsName) {
+            if (NClsName == NextClsName && NClsName.indexOf(" group") > -1) {
+                // 相同前缀且有分组才渲染
                 $(this).parent().next().find(".yaoshi").attr("data-status", "0");
                 $(this).parent().next().find(".yaoshi").attr("src", PicInfo.yaoshiHideImgUrl);
                 $.each($(this).parent().next().find(".underlineContent"), function (index, item) {
@@ -281,7 +284,8 @@ function bindEventYS() {
                     $(item).find(".phraseStyle").css("background-color", "#ffffff");
                 });
             }
-            if (PClsName == PreClsName) {
+            if (PClsName == PreClsName && NClsName.indexOf(" group") > -1) {
+                // 相同前缀且有分组才渲染
                 $(this).parent().prev().find(".yaoshi").attr("data-status", "0");
                 $(this).parent().prev().find(".yaoshi").attr("src", PicInfo.yaoshiHideImgUrl);
                 $(this).parent().prev().find(".underlineContent").css("color", "#ffffff").css("background-color", "#ffffff");