lujianhong 4 лет назад
Родитель
Сommit
ead1e1b26a
4 измененных файлов с 24 добавлено и 19 удалено
  1. 21 17
      EBook.Web/Common/tasklib_book.js
  2. 1 0
      EBook.Web/EBook.Web.csproj
  3. 2 2
      EBook.Web/Test.html
  4. 0 0
      EBook.Web/lghp/duokong.lghp

+ 21 - 17
EBook.Web/Common/tasklib_book.js

@@ -175,6 +175,8 @@ function bindEventTeaOrignalYS() {
 //页面加载完,课件 绑定事件
 function bindEventYS() {
     var bodyWidth = $(document.body).width();
+    //不存在underline 属性下有内容,所以全部隐藏,若有就是源头数据有问题
+    $('.underline').css("display", "none");
     //给每个答题点加上ID
     $.each($(".yaoshi"), function (index, item) {
         $(item).attr('answer-id', index);
@@ -273,24 +275,25 @@ function handleAnswerRange() {
     //规范文本格式
     var answerId = "";
     var tempJson = new Array();
-    $.each($(".yaoshi").nextUntil(".yaoshi").filter(".underline"), function (index, item) {
-        tempId = $(item).prevAll(".yaoshi").attr("answer-id");
-        //记录上一次的ID
-        if (tempId == undefined) {
-            tempId = answerId;
-        }
-        else {
-            answerId = tempId;
-        }
 
-        var prev = $(item).prev();
-        if ((prev.length == 0 || $(prev).attr("class") != "tag-span") && $(prev).attr("class") != "underlineContent") {
-            if ($("span[answer-id='" + tempId + "']").length == 0) {
-                $(item).prop("outerHTML", "<span answer-id='" + tempId + "' class='tag-span' answer-isky='0'>_</span>");
-            }
-        }
-        $(item).remove();
-    });
+    //所有underline不做处理
+    //$.each($(".yaoshi").nextUntil(".yaoshi").filter(".underline"), function (index, item) {
+    //    tempId = $(item).prevAll(".yaoshi").attr("answer-id");
+    //    //记录上一次的ID
+    //    if (tempId == undefined) {
+    //        tempId = answerId;
+    //    }
+    //    else {
+    //        answerId = tempId;
+    //    }
+    //    var prev = $(item).prev();
+    //    if ((prev.length == 0 || $(prev).attr("class") != "tag-span") && $(prev).attr("class") != "underlineContent") {
+    //        if ($("span[answer-id='" + tempId + "']").length == 0) {
+    //            $(item).prop("outerHTML", "<span answer-id='" + tempId + "' class='tag-span' answer-isky='0'>_</span>");
+    //        }
+    //    }
+    //    $(item).remove();
+    //});
 
     //提取参考答案并规范文本格式
     answerId = "";
@@ -524,6 +527,7 @@ function getAllAnswer() {
             $(item).children(".answer-text").addClass("no-answer");
         }
     });
+    $(".answer-body").removeClass("select-answer");//移除样式
     $(".answer-body").unbind('click');//取消点击绑定事件
     $(".answer-body").children(".answer-audio-range").children("span").unbind('click');//取消点击绑定事件
 

+ 1 - 0
EBook.Web/EBook.Web.csproj

@@ -163,6 +163,7 @@
     <Content Include="Lghp\21051.lghp" />
     <Content Include="Lghp\210511.lghp" />
     <Content Include="Lghp\data13.lghp" />
+    <Content Include="Lghp\duokong.lghp" />
     <None Include="Properties\PublishProfiles\WebEBook.pubxml" />
     <Content Include="TagWord\data\html.json" />
     <None Include="Web.Debug.config">

+ 2 - 2
EBook.Web/Test.html

@@ -47,11 +47,11 @@
         }
         //加载听说课文
         $("#load-text").on("click", function () {
-            var data = $.ajax({ url: "lghp/data13.lghp", async: false }).responseText;
+            var data = $.ajax({ url: "lghp/duokong.lghp", async: false }).responseText;
             $("#data").html(data);
 
             //Fill(JSON.parse(hightcodejson));
-            bindEventYS();
+            //bindEventYS();
             //bindCoursewareEvent();
 
             var ResInfo = {

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
EBook.Web/lghp/duokong.lghp


Некоторые файлы не были показаны из-за большого количества измененных файлов