|
|
@@ -258,8 +258,9 @@ var isGCFunc = function (NodeHandle) {
|
|
|
// 处理显示或隐藏答案
|
|
|
var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
if (OCFlag) {
|
|
|
+ var showflagS = $(NodeHandle).attr("showflag");
|
|
|
if ($(NodeHandle).attr("ulflag") == 1) {
|
|
|
- if (!ThProFlag || (ThProFlag && $(NodeHandle).attr("showflag") == 1)) {
|
|
|
+ if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
if ($(NodeHandle).text() == "暂无参考答案") {
|
|
|
$(NodeHandle).css("color", "#989898").attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
@@ -272,14 +273,13 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
$(NodeHandle).css("color", "#000000").attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
if ($(NodeHandle).attr("hitstyle") == "wordStyle") {
|
|
|
- var showflagS = $(NodeHandle).attr("showflag");
|
|
|
if (styleWPSContrl.wordFlag && showflagS == "1") {
|
|
|
$(NodeHandle).css("color", "#db5d00").attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
else if (showflagS == "1") {
|
|
|
var ulflag = $(NodeHandle).attr("ulflag");
|
|
|
if (ulflag == "1") {
|
|
|
- if (!ThProFlag || (ThProFlag && $(NodeHandle).attr("showflag") == 1)) {
|
|
|
+ if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
$(NodeHandle).css("color", "#92D050").attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
@@ -289,7 +289,6 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
}
|
|
|
}
|
|
|
else if ($(NodeHandle).attr("hitstyle") == "phraseStyle") {
|
|
|
- var showflagS = $(NodeHandle).attr("showflag");
|
|
|
if (styleWPSContrl.phraseFlag && showflagS == "1") {
|
|
|
$(NodeHandle).css("background-color", "#f2db8b").attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
@@ -298,7 +297,6 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
}
|
|
|
}
|
|
|
else if ($(NodeHandle).attr("hitstyle") == "sentenceStyle") {
|
|
|
- var showflagS = $(NodeHandle).attr("showflag");
|
|
|
if (styleWPSContrl.sentenceFlag && showflagS == "1") {
|
|
|
$(NodeHandle).css("border-bottom", "2px solid #78ae43").attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
@@ -307,9 +305,10 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
}
|
|
|
}
|
|
|
$.each($(NodeHandle).find("u,span,p"), function (index, element) {
|
|
|
+ showflagS = $(element).attr("showflag");
|
|
|
// 处理普通文本
|
|
|
if ($(element).attr("ulflag") == 1) {
|
|
|
- if (!ThProFlag || (ThProFlag && $(element).attr("showflag") == 1)) {
|
|
|
+ if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
if ($(element).text() == "暂无参考答案") {
|
|
|
$(element).css("color", "#989898").attr("shcode", 1).attr("showflag", "1");
|
|
|
}
|
|
|
@@ -323,37 +322,42 @@ var dealAnswerFunc = function (NodeHandle, OCFlag, ThProFlag) {
|
|
|
}
|
|
|
// 处理高亮
|
|
|
if ($(element).attr("hitstyle") == "wordStyle") {
|
|
|
- var showflagS = $(element).attr("showflag");
|
|
|
- if (styleWPSContrl.wordFlag && showflagS == "1") {
|
|
|
- $(element).css("color", "#db5d00").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ if (styleWPSContrl.wordFlag) {
|
|
|
+ if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
+ $(element).css("color", "#db5d00").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ }
|
|
|
}
|
|
|
- else if (showflagS == "1") {
|
|
|
- var ulflag = $(element).attr("ulflag");
|
|
|
- if (ulflag == "1") {
|
|
|
- if (!ThProFlag || (ThProFlag && $(element).attr("showflag") == 1)) {
|
|
|
- $(element).css("color", "#92D050").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 {
|
|
|
- $(element).css("color", "#000000").attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else if ($(element).attr("hitstyle") == "phraseStyle") {
|
|
|
- var showflagS = $(element).attr("showflag");
|
|
|
- if (styleWPSContrl.phraseFlag && showflagS == "1") {
|
|
|
- $(element).css("background-color", "#f2db8b").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ if (styleWPSContrl.phraseFlag) {
|
|
|
+ if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
+ $(element).css("background-color", "#f2db8b").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ }
|
|
|
}
|
|
|
- else if (showflagS == "1") {
|
|
|
+ else{
|
|
|
$(element).css("background-color", "#ffffff").attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
else if ($(element).attr("hitstyle") == "sentenceStyle") {
|
|
|
- var showflagS = $(element).attr("showflag");
|
|
|
- if (styleWPSContrl.sentenceFlag && showflagS == "1") {
|
|
|
- $(element).css("border-bottom", "2px solid #78ae43").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ if (styleWPSContrl.sentenceFlag) {
|
|
|
+ if (!ThProFlag || (ThProFlag && showflagS == 1)) {
|
|
|
+ $(element).css("border-bottom", "2px solid #78ae43").attr("shcode", 1).attr("showflag", "1");
|
|
|
+ }
|
|
|
}
|
|
|
- else if (showflagS == "1") {
|
|
|
+ else{
|
|
|
$(element).css("border-bottom", "2px solid #ffffff").attr("shcode", 0).attr("showflag", "1");
|
|
|
}
|
|
|
}
|
|
|
@@ -1543,11 +1547,8 @@ function showGLWorld(wordFlag, phraseFlag, sentenceFlag) {
|
|
|
styleWPSContrl.wordFlag = wordFlag;
|
|
|
styleWPSContrl.phraseFlag = phraseFlag;
|
|
|
styleWPSContrl.sentenceFlag = sentenceFlag;
|
|
|
- $.each($(document.body).find(".wordStyle[hitstyle='wordStyle'],.phraseStyle[hitstyle='phraseStyle'],.sentenceStyle[hitstyle='sentenceStyle']"), function (index,element) {
|
|
|
+ $.each($(document.body).find("u[hitstyle='wordStyle'],span[hitstyle='wordStyle'],p[hitstyle='wordStyle'],u[hitstyle='phraseStyle'],span[hitstyle='phraseStyle'],p[hitstyle='phraseStyle'],u[hitstyle='sentenceStyle'],span[hitstyle='sentenceStyle'],p[hitstyle='sentenceStyle']"), function (index, element) {
|
|
|
dealAnswerFunc(element, true, true);
|
|
|
- $.each($(element).find("u,span,p"), function (oindex,oelement) {
|
|
|
- dealAnswerFunc(oelement, true, true);
|
|
|
- });
|
|
|
});
|
|
|
}
|
|
|
function playVisiableAudioCallBack(type, url) {
|