|
|
@@ -56,8 +56,8 @@ var clickCheckBox = function (inputId) {
|
|
|
// 检测安卓和ios
|
|
|
var cTTypeFunc = function () {
|
|
|
var u = navigator.userAgent;
|
|
|
- var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
|
|
|
- var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
|
|
+ //var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
|
|
|
+ //var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
|
|
if (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1) {
|
|
|
return 1;
|
|
|
}
|
|
|
@@ -413,12 +413,9 @@ var AdjustTableFunc = function (sWidthVal, isAStatus) {
|
|
|
};
|
|
|
// #endregion
|
|
|
// 测试专用(移动端不需要引用)
|
|
|
-function AddTestTextFunc(DataStr4) {
|
|
|
- var DataStr1 = 0, DataStr2 = 0, DataStr3 = 0;
|
|
|
- DataStr1 = $(document.body).css("width");
|
|
|
- DataStr2 = GetPadVal(document.body);
|
|
|
- DataStr3 = DataStr4;
|
|
|
- var HtmlStr = '<div id="ShowTStr" style="width:100px;height:auto;background-color:yellow;color:#000;position:fixed;left:10px;top:100px;">DataStr1=》' + DataStr1 + '<br />DataStr2=》' + DataStr2 + '<br />DataStr3=》' + DataStr3 + '</div>';
|
|
|
+function AddTestTextFunc(DataStr3) {
|
|
|
+ $("#ShowTStr").remove();
|
|
|
+ var HtmlStr = '<div id="ShowTStr" style="width:200px;height:auto;background-color:yellow;color:#000;position:fixed;left:10px;top:100px;">DataStr3=》' + DataStr3 + '</div>';
|
|
|
$(document.body).append(HtmlStr)
|
|
|
}
|
|
|
//#region 听力音频处理
|
|
|
@@ -630,6 +627,28 @@ function TouchEndFunc(event) {
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
+// #region 高亮揭露学生答案处理
|
|
|
+// 处理暂不显示高亮(答题点下禁止点击弹出窗口)
|
|
|
+function dealNotShowFill() {
|
|
|
+ $.each($(".phraseStyle,.sentenceStyle,.wordStyle"), function () {
|
|
|
+ var _this = this;
|
|
|
+ if ($(this).find(".answer-point-range").length > 0) {
|
|
|
+ $.each($(this).find(".answer-point-range"), function () {
|
|
|
+ if ($(this).css("display") == 'inline-block') {
|
|
|
+ $(_this).attr("data-lstatus", "1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+// 恢复显示高亮处理
|
|
|
+function dealRecvShowFill() {
|
|
|
+ $.each($(".phraseStyle[data-lstatus='1'],.sentenceStyle[data-lstatus='1'],.wordStyle[data-lstatus='1']"), function () {
|
|
|
+ $(this).attr("data-lstatus", "0");
|
|
|
+ });
|
|
|
+}
|
|
|
+// #endregion
|
|
|
// 点击事件样式渲染
|
|
|
var ClickRecFunc = function (pID) {
|
|
|
$(".answer-body").removeClass("select-answer");
|
|
|
@@ -724,31 +743,31 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
if ($(NodeHandle).attr("ulflag") == 1) {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
if ($(NodeHandle).text() == "暂无参考答案") {
|
|
|
- $(NodeHandle).css("color", "#989898").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
else {
|
|
|
- $(NodeHandle).css("color", "#92D050").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- $(NodeHandle).css("color", "#000000").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
if ($(NodeHandle).attr("hitstyle") == "wordStyle") {
|
|
|
if (styleWPSContrl.wordFlag) {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
- $(NodeHandle).css("color", "#db5d00").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
var ulflag = $(NodeHandle).attr("ulflag");
|
|
|
if (ulflag == "1") {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
- $(NodeHandle).css("color", "#92D050").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- $(NodeHandle).css("color", "#000000").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -756,28 +775,28 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
if (styleWPSContrl.phraseFlag && showflagS == "1") {
|
|
|
var ulflag = $(NodeHandle).attr("ulflag");
|
|
|
if (ulflag == "1") {
|
|
|
- $(NodeHandle).css("background-color", "#f2db8b").attr("shcode", 1).attr("showflag", "1")
|
|
|
+ $(NodeHandle).attr("shcode", 1).attr("showflag", "1")
|
|
|
}
|
|
|
else {
|
|
|
- $(NodeHandle).css("background-color", "#f2db8b").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
else if (showflagS == "1") {
|
|
|
var ulflag = $(NodeHandle).attr("ulflag");
|
|
|
if (ulflag == "1") {
|
|
|
- $(NodeHandle).css("background-color", "#ffffff").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
else {
|
|
|
- $(NodeHandle).css("background-color", "#ffffff").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else if ($(NodeHandle).attr("hitstyle") == "sentenceStyle") {
|
|
|
if (styleWPSContrl.sentenceFlag && showflagS == "1") {
|
|
|
- $(NodeHandle).css("border-bottom", "2px solid #78ae43").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
else if (showflagS == "1") {
|
|
|
- $(NodeHandle).css("border-bottom", "none").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(NodeHandle).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
if (!ThProFlag) {
|
|
|
@@ -787,21 +806,21 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
if ($(element).attr("ulflag") == 1) {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
if ($(element).text() == "暂无参考答案") {
|
|
|
- $(element).css("color", "#989898").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
else {
|
|
|
- $(element).css("color", "#92D050").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- $(element).css("color", "#000000").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
// 处理高亮
|
|
|
if ($(element).attr("hitstyle") == "wordStyle") {
|
|
|
if (styleWPSContrl.wordFlag) {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
- $(element).css("color", "#db5d00").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
@@ -809,11 +828,11 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
var ulflag = $(element).attr("ulflag");
|
|
|
if (ulflag == "1") {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
- $(element).css("color", "#92D050").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- $(element).css("color", "#000000").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -823,65 +842,61 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
var ulflag = $(element).attr("ulflag");
|
|
|
if (ulflag == "1") {
|
|
|
- $(element).css("background-color", "#f2db8b").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
else {
|
|
|
- $(element).css("background-color", "#f2db8b").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
var ulflag = $(element).attr("ulflag");
|
|
|
if (ulflag == "1") {
|
|
|
- $(element).css("background-color", "#ffffff").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
else {
|
|
|
- $(element).css("background-color", "#ffffff").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else if ($(element).attr("hitstyle") == "sentenceStyle") {
|
|
|
if (styleWPSContrl.sentenceFlag) {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
- $(element).css("border-bottom", "2px solid #78ae43").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- $(element).css("border-bottom", "none").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ $(element).attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- $(NodeHandle).css("color", "#ffffff").attr("shcode", 1).attr("showflag", "0");
|
|
|
+ $(NodeHandle).attr("shcode", 1).attr("showflag", "0");
|
|
|
if ($(NodeHandle).attr("hitstyle") == "wordStyle") {
|
|
|
$(NodeHandle).attr("shcode", 0).attr("showflag", "0");
|
|
|
}
|
|
|
else if ($(NodeHandle).attr("hitstyle") == "phraseStyle") {
|
|
|
- $(NodeHandle).css("background-color", "none").attr("shcode", 0).attr("showflag", "0");
|
|
|
+ $(NodeHandle).attr("shcode", 0).attr("showflag", "0");
|
|
|
}
|
|
|
else if ($(NodeHandle).attr("hitstyle") == "sentenceStyle") {
|
|
|
- $(NodeHandle).css("border-bottom", "none").attr("shcode", 0).attr("showflag", "0");
|
|
|
+ $(NodeHandle).attr("shcode", 0).attr("showflag", "0");
|
|
|
}
|
|
|
$.each($(NodeHandle).find(".cAStauts"), function (index, element) {
|
|
|
// 处理普通文本
|
|
|
- $(element).css("color", "#ffffff").attr("shcode", 1).attr("showflag", "0"); // 合并处理
|
|
|
+ $(element).attr("shcode", 1).attr("showflag", "0"); // 合并处理
|
|
|
// 处理高亮
|
|
|
if ($(element).attr("hitstyle") == "wordStyle") {
|
|
|
$(element).attr("shcode", 0).attr("showflag", "0");
|
|
|
}
|
|
|
else if ($(element).attr("hitstyle") == "phraseStyle") {
|
|
|
- $(element).css("background-color", "#ffffff").attr("shcode", 0).attr("showflag", "0");
|
|
|
+ $(element).attr("shcode", 0).attr("showflag", "0");
|
|
|
}
|
|
|
else if ($(element).attr("hitstyle") == "sentenceStyle") {
|
|
|
- $(element).css("border-bottom", "none").attr("shcode", 0).attr("showflag", "0");
|
|
|
+ $(element).attr("shcode", 0).attr("showflag", "0");
|
|
|
}
|
|
|
});
|
|
|
- var ClsName = $(NodeHandle).attr("class");
|
|
|
- if (ClsName.indexOf("underlinePart") > -1) {
|
|
|
- $(NodeHandle).css("border-bottom", "1px solid #979797");
|
|
|
- }
|
|
|
}
|
|
|
var underlineContentText = $(NodeHandle).text(); // 获取文本内容
|
|
|
if (underlineContentText != undefined && underlineContentText.indexOf("√") > -1) {
|
|
|
@@ -983,6 +998,8 @@ function showHideAnswerEx(isShowYX, isShowAS) {
|
|
|
function bindEventTeaOrignalYS(sWidthVal, isAStatus, isMAStatus) {
|
|
|
IsZTKEStatus = (isMAStatus == "undefined" || isMAStatus == undefined || isMAStatus == null) ? 0 : parseInt(isMAStatus);
|
|
|
var bodyWidth = $(document.body).width();
|
|
|
+ // 处理文本
|
|
|
+ dealUnderLineFunc();
|
|
|
//处理答题点
|
|
|
$.each($(".yaoshi"), function (index, item) {
|
|
|
$(item).attr('answer-id', index);
|
|
|
@@ -1135,7 +1152,7 @@ function bindEventYS(sWidthVal, isAStatus, isMAStatus) {
|
|
|
var bodyWidth = $(document.body).width();
|
|
|
//不存在underline 属性下有内容,所以全部隐藏,若有就是源头数据有问题
|
|
|
$('.underline').css("display", "none");
|
|
|
- // 处理干净underline
|
|
|
+ // 处理文本
|
|
|
dealUnderLineFunc();
|
|
|
$.each($(".yaoshi"), function (index, item) {
|
|
|
$(item).attr('answer-id', index);
|
|
|
@@ -1295,30 +1312,12 @@ function resetPressFlag() {
|
|
|
pressTableFlag = false;
|
|
|
}
|
|
|
|
|
|
-// 打理干净underline
|
|
|
+// 删除叼毛题库原先附加无用属性
|
|
|
function dealUnderLineFunc() {
|
|
|
- //var ArrList = [];
|
|
|
- //$.each($('.underline'), function (index, element) {
|
|
|
- // var nextClsName = $(this).next().attr("class");
|
|
|
- // var prevClsName = $(this).prev().attr("class");
|
|
|
- // if ($(this).prev().find(".underlineContent").length > 0) {
|
|
|
- // ArrList.push(index);
|
|
|
- // }
|
|
|
- // else if (prevClsName != undefined && (prevClsName.indexOf("underlineContent") > -1 || prevClsName.indexOf("underline") > -1)) {
|
|
|
- // ArrList.push(index);
|
|
|
- // }
|
|
|
- // else if ($(this).next().find(".underlineContent").length > 0) {
|
|
|
- // ArrList.push(index);
|
|
|
- // }
|
|
|
- // else if (nextClsName != undefined && (nextClsName.indexOf("underlineContent") > -1 || nextClsName.indexOf("underline") > -1)) {
|
|
|
- // ArrList.push(index);
|
|
|
- // }
|
|
|
- //});
|
|
|
- //while (ArrList.length > 0) {
|
|
|
- // var ArrStr = ArrList.pop();
|
|
|
- // $('.underline').eq(ArrStr).remove();
|
|
|
- //}
|
|
|
+ // 打理干净underline
|
|
|
$('.underline').remove(); // 删除全部
|
|
|
+ // 删除全部underlineContent的颜色
|
|
|
+ $(".underlineContent").css("color", "");
|
|
|
}
|
|
|
|
|
|
// 打补丁(非underlineContent下的span下嵌套underlineContent)
|
|
|
@@ -1667,6 +1666,8 @@ function handleAnswerRange() {
|
|
|
dealCheckBox();
|
|
|
// data-astatus控制作答样式(0表示未提交,1表示提交,2表示回显);data-errstatus判断是否(1)错误
|
|
|
$(".answer-body").attr("data-astatus", "0").attr("data-errstatus", "0").attr("mobile-type", cTTypeFunc);
|
|
|
+ $(".answer-point-range").attr("mobile-type", cTTypeFunc);
|
|
|
+ $(".answer-point-range-div").attr("mobile-type", cTTypeFunc);
|
|
|
return answerData;
|
|
|
}
|
|
|
|
|
|
@@ -1805,6 +1806,7 @@ function getAllAnswer() {
|
|
|
});
|
|
|
ControlFlag = false;
|
|
|
//console.log(JSON.stringify(answerData));
|
|
|
+ dealRecvShowFill();
|
|
|
return answerData;
|
|
|
}
|
|
|
|
|
|
@@ -2099,6 +2101,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ dealRecvShowFill();
|
|
|
}
|
|
|
|
|
|
//老师评阅学生作答
|
|
|
@@ -2125,6 +2128,7 @@ function reviewStuAnswer(answerJson) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ dealRecvShowFill();
|
|
|
}
|
|
|
|
|
|
//回填所有评阅信息,answerJson:所有作答及参考答案评阅信息List
|
|
|
@@ -2300,6 +2304,7 @@ function backupAllReview(answerJson) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ dealRecvShowFill();
|
|
|
}
|
|
|
|
|
|
//处理播放录音,answerid:答题点ID,isPlay:是否播放(0-暂停,1-播放)
|
|
|
@@ -2521,4 +2526,27 @@ function mobileTEFunc(ID) {
|
|
|
var AudioUrl = $(jQStr).parent().prev(".LDivTop").find(".LDivTItem[data-selected='1']").attr("data-auduourl"); // 路径
|
|
|
// 移动端回调处理
|
|
|
plugin.onSeekBarUp(ID, CurrentTime, AudioUrl); // 安卓
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+// 移动端统一调用
|
|
|
+// sWidthVal:屏幕宽度,isAStatus是否含有作答0表示没有,isMAStatus判断是否是主体课文1表示是
|
|
|
+// data高亮知识点
|
|
|
+function stuEntryFunc(sWidthVal, isAStatus, isMAStatus, data) {
|
|
|
+ bindEventYS(sWidthVal, isAStatus, isMAStatus);
|
|
|
+ var ReData = handleAnswerRange();
|
|
|
+ if (typeof (Fill) == "function") {
|
|
|
+ Fill(data);
|
|
|
+ }
|
|
|
+ return ReData;
|
|
|
+}
|
|
|
+// 移动端统一调用
|
|
|
+// sWidthVal:屏幕宽度,isAStatus是否含有作答0表示没有,isMAStatus判断是否是主体课文1表示是
|
|
|
+// data高亮知识点
|
|
|
+// isShowYX:显示和隐藏钥匙,isShowAS:显示和隐藏答案
|
|
|
+function teaEntryFunc(sWidthVal, isAStatus, isMAStatus, data, isShowYX, isShowAS) {
|
|
|
+ bindEventYS(sWidthVal, isAStatus, isMAStatus);
|
|
|
+ if (typeof (Fill) == "function") {
|
|
|
+ Fill(data);
|
|
|
+ }
|
|
|
+ showHideAnswerEx(isShowYX, isShowAS);
|
|
|
+}
|