|
|
@@ -773,6 +773,7 @@ var clickCheckBox = function (inputId) {
|
|
|
if (!ControlFlag) {
|
|
|
return;
|
|
|
}
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
var BoxJqStr = ".cBoxCls_" + inputId;
|
|
|
if ($(BoxJqStr).attr("data-status") == "1") {
|
|
|
@@ -781,12 +782,14 @@ var clickCheckBox = function (inputId) {
|
|
|
else {
|
|
|
$(BoxJqStr).attr("data-status", "1");
|
|
|
}
|
|
|
- $("#" + inputId).click();
|
|
|
- // 变动同一个答题点的颜色修改
|
|
|
- var JqStr = ".checkbox[answer-id='" + inputId + "']";
|
|
|
- var parentAnID = $(JqStr).attr("parent-anid");
|
|
|
- JqStr = ".checkbox[parent-anid='" + parentAnID + "']";
|
|
|
- $(JqStr).addClass("select-answer");
|
|
|
+ var parentAnid = $(BoxJqStr).attr("parent-anid");
|
|
|
+ $(".cBoxCls[parent-anid='" + parentAnid + "']").parent(".cBoxClsBg").attr("data-select", "1");
|
|
|
+ var curObj = new Object();
|
|
|
+ curObj.Id = $(jqStr).attr("answer-id");//答题点ID
|
|
|
+ curObj.pId = $(jqStr).attr("parent-anid");//答题点ID
|
|
|
+ curObj.IsKY = 2;//是否是口语试题,0-不是口语题,1-是口语题
|
|
|
+ curObj.AnsText = $(jqStr).attr("answer-anstext");//参考答案
|
|
|
+ onClickAnswerPoint(JSON.stringify(curObj));
|
|
|
}
|
|
|
// #endregion
|
|
|
|
|
|
@@ -1067,7 +1070,7 @@ function bindEventYS(sWidthVal, isAStatus, isMAStatus) {
|
|
|
// 处理文本
|
|
|
dealUnderLineFunc();
|
|
|
$.each($(".yaoshi"), function (index, item) {
|
|
|
- $(item).attr('answer-id', index).attr("showflag", "1").css("display", "block").attr("data-status", "1").attr("answer-isky", "0").attr("src", PicInfo.yaoshiShowImgUrl);
|
|
|
+ $(item).attr('answer-id', index).attr("parent-anid", index).attr("showflag", "1").css("display", "block").attr("data-status", "1").attr("answer-isky", "0").attr("src", PicInfo.yaoshiShowImgUrl);
|
|
|
// 关联渲染underlinecontent
|
|
|
if ($(item).next().length > 0) {
|
|
|
selectImgULContent($(item).next(), index);
|
|
|
@@ -1157,7 +1160,7 @@ function bindEventTeaOrignalYS(sWidthVal, isAStatus, isMAStatus) {
|
|
|
dealUnderLineFunc();
|
|
|
//处理答题点
|
|
|
$.each($(".yaoshi"), function (index, item) {
|
|
|
- $(item).attr('answer-id', index).attr("showflag", "1").css("display", "block").attr("data-status", "1").attr("answer-isky", "0").attr("src", PicInfo.yaoshiShowImgUrl);
|
|
|
+ $(item).attr('answer-id', index).attr("parent-anid", index).attr("showflag", "1").css("display", "block").attr("data-status", "1").attr("answer-isky", "0").attr("src", PicInfo.yaoshiShowImgUrl);
|
|
|
// 关联渲染underlinecontent
|
|
|
if ($(item).next().length > 0) {
|
|
|
selectImgULContent($(item).next(), index);
|
|
|
@@ -1266,7 +1269,7 @@ function handleAnswerRange() {
|
|
|
});
|
|
|
// 添加答题点
|
|
|
if (AnswerIsky == 2) {
|
|
|
- $(item).after("<div class='cBoxCls cBoxCls_" + AnswerID + "' answer-id='" + AnswerID + "' parent-anid='" + AnswerPID + "' data-status='0' onclick='clickCheckBox(" + AnswerID + ")' answer-anstext='" + TAnsText + "'></div>");
|
|
|
+ $(item).after("<div class='cBoxClsBg' data-select='0'><div class='cBoxCls cBoxCls_" + AnswerID + "' answer-id='" + AnswerID + "' parent-anid='" + AnswerPID + "' data-status='0' onclick='clickCheckBox(" + AnswerID + ")' answer-anstext='" + TAnsText + "'></div></div>");
|
|
|
}
|
|
|
else {
|
|
|
// data-astatus控制作答样式(0表示未提交,1表示提交,2表示回显);data-errstatus判断是否作答(1表示未做答)
|
|
|
@@ -1891,6 +1894,7 @@ function AddClickEvent() {
|
|
|
$(".checkbox").removeClass("select-answer");
|
|
|
$(".answer-body").removeClass("select-answer");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
if (curObj.pId == undefined || curObj.pId == null || curObj.pId == '' || curObj.pId == 'undefined') {
|
|
|
$(".answer-body[answer-id=" + curObj.Id + "]").addClass("select-answer");
|
|
|
}
|
|
|
@@ -1942,6 +1946,7 @@ function AddClickEvent() {
|
|
|
$(".checkbox").removeClass("select-answer");
|
|
|
$(".answer-body").removeClass("select-answer");
|
|
|
$(".ULCBGUse").attr("data-select", "0");
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
// 延迟渲染,防止重合
|
|
|
window.setTimeout(function () {
|
|
|
@@ -2014,6 +2019,7 @@ function AddClickEvent() {
|
|
|
// 绑定高亮
|
|
|
$(".wordStyle").on("click", function () {
|
|
|
$(".ULCBGUse").attr("data-select", "0");
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
$(this).attr("data-glclick", "1");
|
|
|
var datalstatus = $(this).attr("data-lstatus");
|
|
|
@@ -2025,6 +2031,7 @@ function AddClickEvent() {
|
|
|
});
|
|
|
$(".phraseStyle").on("click", function () {
|
|
|
$(".ULCBGUse").attr("data-select", "0");
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
$(this).attr("data-glclick", "1");
|
|
|
var datalstatus = $(this).attr("data-lstatus");
|
|
|
@@ -2036,6 +2043,7 @@ function AddClickEvent() {
|
|
|
});
|
|
|
$(".sentenceStyle").on("click", function () {
|
|
|
$(".ULCBGUse").attr("data-select", "0");
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
$(this).attr("data-glclick", "1");
|
|
|
var datalstatus = $(this).attr("data-lstatus");
|
|
|
@@ -2047,6 +2055,7 @@ function AddClickEvent() {
|
|
|
});
|
|
|
$(".sentImagcs").on("click", function () {
|
|
|
$(".ULCBGUse").attr("data-select", "0");
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
$(this).next(".sentenceStyle").attr("data-glclick", "1");
|
|
|
var datalstatus = $(this).next(".sentenceStyle").attr("data-lstatus");
|
|
|
@@ -2058,12 +2067,14 @@ function AddClickEvent() {
|
|
|
});
|
|
|
// 绑定播放作答音频
|
|
|
$(".audioImg").on("click", function () {
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
audioPlayClick(this);
|
|
|
});
|
|
|
//点击播放事件,视频播放
|
|
|
$(".videoImg").on("click", function () {
|
|
|
$(".select-answer").removeClass("select-answer");
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
$(this).attr("audiourl", "");
|
|
|
var curHtml = $(this).parent().find(".videoUrl").html();
|
|
|
@@ -2072,6 +2083,7 @@ function AddClickEvent() {
|
|
|
});
|
|
|
//作答录音播放按钮点击事件
|
|
|
$(".answer-audio-range").on("click", function () {
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".wordStyle,.phraseStyle,.sentenceStyle").attr("data-glclick", "0");
|
|
|
$(".select-answer").removeClass("select-answer");
|
|
|
var AudioID= $(this).parent(".underlineContent").attr("yaoshi-flag");
|
|
|
@@ -2317,13 +2329,16 @@ function playRecordAudio(answerid, isPlay) {
|
|
|
//滚动到相应DIV
|
|
|
function scrollAnswer(answerid) {
|
|
|
//console.log(answerid);
|
|
|
- $(".checkbox").removeClass("select-answer");
|
|
|
+ $(".cBoxClsBg").attr("data-select", "0");
|
|
|
$(".answer-body").removeClass("select-answer");
|
|
|
var ansDom = $(".answer-body[parent-anid='" + answerid + "']");
|
|
|
if (ansDom.length == 0) {
|
|
|
- ansDom = $(".checkbox[parent-anid='" + answerid + "']");
|
|
|
+ ansDom = $(".cBoxCls[parent-anid='" + answerid + "']");
|
|
|
+ $(ansDom).parent(".cBoxClsBg").attr("data-select", "1");
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $(ansDom).addClass("select-answer");
|
|
|
}
|
|
|
- $(ansDom).addClass("select-answer");
|
|
|
var scroll_offset = $(ansDom).offset(); //得到box这个div层的offset,包含两个值,top和left
|
|
|
var offset_top = scroll_offset.top;
|
|
|
if (offset_top > 150) {
|