|
|
@@ -270,6 +270,8 @@ var isGCFunc = function (NodeHandle) {
|
|
|
// 处理显示或隐藏答案
|
|
|
var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
if (OCFlag) {
|
|
|
+ console.log($(NodeHandle));
|
|
|
+ console.log($(NodeHandle).attr("showflag"));
|
|
|
var showflagS = $(NodeHandle).attr("showflag");
|
|
|
if ($(NodeHandle).attr("ulflag") == 1) {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
@@ -285,10 +287,12 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
$(NodeHandle).css("color", "#000000").attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
if ($(NodeHandle).attr("hitstyle") == "wordStyle") {
|
|
|
- if (styleWPSContrl.wordFlag && showflagS == "1") {
|
|
|
- $(NodeHandle).css("color", "#db5d00").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ if (styleWPSContrl.wordFlag) {
|
|
|
+ if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
+ $(NodeHandle).css("color", "#db5d00").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ }
|
|
|
}
|
|
|
- else if (showflagS == "1") {
|
|
|
+ else {
|
|
|
var ulflag = $(NodeHandle).attr("ulflag");
|
|
|
if (ulflag == "1") {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
@@ -316,64 +320,66 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
$(NodeHandle).css("border-bottom", "2px solid #ffffff").attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
- $.each($(NodeHandle).find("u,span,p"), function (index, element) {
|
|
|
- showflagS = $(element).attr("showflag");
|
|
|
- // 处理普通文本
|
|
|
- if ($(element).attr("ulflag") == 1) {
|
|
|
- if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
- if ($(element).text() == "暂无参考答案") {
|
|
|
- $(element).css("color", "#989898").attr("shcode", 1).attr("showflag", "1");
|
|
|
- }
|
|
|
- else {
|
|
|
- $(element).css("color", "#92D050").attr("shcode", 1).attr("showflag", "1");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else {
|
|
|
- $(element).css("color", "#000000").attr("shcode", 1).attr("showflag", "1");
|
|
|
- }
|
|
|
- // 处理高亮
|
|
|
- if ($(element).attr("hitstyle") == "wordStyle") {
|
|
|
- if (styleWPSContrl.wordFlag) {
|
|
|
+ if (!ThProFlag) {
|
|
|
+ $.each($(NodeHandle).find("u,span,p"), function (index, element) {
|
|
|
+ showflagS = $(element).attr("showflag");
|
|
|
+ // 处理普通文本
|
|
|
+ if ($(element).attr("ulflag") == 1) {
|
|
|
if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
- $(element).css("color", "#db5d00").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ if ($(element).text() == "暂无参考答案") {
|
|
|
+ $(element).css("color", "#989898").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $(element).css("color", "#92D050").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
- var ulflag = $(element).attr("ulflag");
|
|
|
- if (ulflag == "1") {
|
|
|
- if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
- $(element).css("color", "#92D050").attr("shcode", 0).attr("showflag", "1");
|
|
|
- }
|
|
|
+ $(element).css("color", "#000000").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");
|
|
|
}
|
|
|
- else {
|
|
|
- $(element).css("color", "#000000").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
+ var ulflag = $(element).attr("ulflag");
|
|
|
+ if (ulflag == "1") {
|
|
|
+ if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
+ $(element).css("color", "#92D050").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $(element).css("color", "#000000").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- else if ($(element).attr("hitstyle") == "phraseStyle") {
|
|
|
- if (styleWPSContrl.phraseFlag) {
|
|
|
- if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
- $(element).css("background-color", "#f2db8b").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ else if ($(element).attr("hitstyle") == "phraseStyle") {
|
|
|
+ if (styleWPSContrl.phraseFlag) {
|
|
|
+ if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
+ $(element).css("background-color", "#f2db8b").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- else{
|
|
|
- $(element).css("background-color", "#ffffff").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");
|
|
|
+ else {
|
|
|
+ $(element).css("background-color", "#ffffff").attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
- else{
|
|
|
- $(element).css("border-bottom", "2px solid #ffffff").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");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $(element).css("border-bottom", "2px solid #ffffff").attr("shcode", 0).attr("showflag", "1");
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
else {
|
|
|
$(NodeHandle).css("color", "#ffffff").attr("shcode", 1).attr("showflag", "0");
|