|
|
@@ -257,58 +257,53 @@ var isGCFunc = function (NodeHandle) {
|
|
|
|
|
|
// 处理高亮
|
|
|
var dealGLShowFunc = function (NodeHandle) {
|
|
|
- if (styleWPSContrl.wordFlag) {
|
|
|
- $(NodeHandle).find(".wordStyle").css("color", "#db5d00");
|
|
|
- }
|
|
|
- else {
|
|
|
- $.each($(NodeHandle).find(".wordStyle"), function (index, element) {
|
|
|
- if (isGCFunc(element)) {
|
|
|
+ $.each($(NodeHandle).find(".wordStyle"), function (index,element) {
|
|
|
+ var showFlagS = $(element).attr("showFlag");
|
|
|
+ if (styleWPSContrl.wordFlag && showFlagS == "1") {
|
|
|
+ $(element).css("color", "#db5d00");
|
|
|
+ }
|
|
|
+ else if (showFlagS == "1") {
|
|
|
+ var shcode = $(element).attr("shcode");
|
|
|
+ if (shcode == "1") {
|
|
|
$(element).css("color", "#92D050");
|
|
|
}
|
|
|
else {
|
|
|
$(element).css("color", "#000000");
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
- if (styleWPSContrl.phraseFlag) {
|
|
|
- $(NodeHandle).find(".phraseStyle").css("background-color", "#f2db8b");
|
|
|
- }
|
|
|
- else {
|
|
|
- $(NodeHandle).find(".phraseStyle").css("background-color", "#fff");
|
|
|
- }
|
|
|
- if (styleWPSContrl.sentenceFlag) {
|
|
|
- $(NodeHandle).find(".sentenceStyle").css("border-bottom", "2px solid #78ae43");
|
|
|
- }
|
|
|
- else {
|
|
|
- $(NodeHandle).find(".sentenceStyle").css("border-bottom", "2px solid #fff");
|
|
|
- }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $.each($(NodeHandle).find(".phraseStyle"), function (index, element) {
|
|
|
+ var showFlagS = $(element).attr("showFlag");
|
|
|
+ if (styleWPSContrl.phraseFlag && showFlagS == "1") {
|
|
|
+ $(element).css("background-color", "#f2db8b");
|
|
|
+ }
|
|
|
+ else if (showFlagS == "1") {
|
|
|
+ $(element).css("background-color", "#ffffff");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $.each($(NodeHandle).find(".sentenceStyle"), function (index, element) {
|
|
|
+ var showFlagS = $(element).attr("showFlag");
|
|
|
+ if (styleWPSContrl.sentenceFlag && showFlagS == "1") {
|
|
|
+ $(element).css("border-bottom", "2px solid #78ae43");
|
|
|
+ }
|
|
|
+ else if (showFlagS == "1") {
|
|
|
+ $(element).css("border-bottom", "2px solid #ffffff");
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
-// 处理显示或隐藏答案
|
|
|
+// 处理显示或隐藏答案(shcode判断是否存在横线内,showFlag是否显示)
|
|
|
var dealAnswerFunc = function (NodeHandle, OCFlag) {
|
|
|
if (OCFlag) {
|
|
|
- $(NodeHandle).css("color", "#92D050").css("border-bottom", "1px solid #979797").css("background-color", "transparent").attr("shcode","0");
|
|
|
- $(NodeHandle).find("u,span").css("color", "#92D050").css("border-bottom", "1px solid #979797").css("background-color", "transparent").attr("shcode", "0");
|
|
|
+ $(NodeHandle).css("color", "#92D050").css("border-bottom", "1px solid #979797").css("background-color", "transparent").attr("showFlag","1");
|
|
|
+ $(NodeHandle).find(".wordStyle,.phraseStyle,.phraseStyle,u,span").css("color", "#92D050").css("border-bottom", "1px solid #979797").css("background-color", "transparent").attr("showFlag", "1");
|
|
|
// 处理高亮
|
|
|
dealGLShowFunc(NodeHandle);
|
|
|
}
|
|
|
else {
|
|
|
- if (isGCFunc(NodeHandle)) {
|
|
|
- $(NodeHandle).css("color", "#fff").css("border-bottom", "1px solid #979797").css("background-color", "#fff").attr("shcode", "1");
|
|
|
- $(NodeHandle).find(".wordStyle,.phraseStyle,.phraseStyle,u,span").css("color", "#fff").css("border-bottom", "1px solid #979797").css("background-color", "#fff").attr("shcode", "1");
|
|
|
- }
|
|
|
- else {
|
|
|
- $.each($(NodeHandle).children(), function (index, element) {
|
|
|
- if (isGCFunc(element)) {
|
|
|
- $(NodeHandle).css("color", "#fff").css("border-bottom", "1px solid #979797").css("background-color", "#fff").attr("shcode", "1");
|
|
|
- $(NodeHandle).find(".wordStyle,.phraseStyle,.phraseStyle,u,span").css("color", "#fff").css("border-bottom", "1px solid #979797").css("background-color", "#fff").attr("shcode", "1");
|
|
|
- }
|
|
|
- else {
|
|
|
- $(NodeHandle).css("color", "#fff").css("border-bottom", "1px solid #979797").css("background-color", "#fff").attr("shcode", "0");
|
|
|
- $(NodeHandle).find(".wordStyle,.phraseStyle,.phraseStyle,u,span").css("color", "#fff").css("border-bottom", "1px solid #979797").css("background-color", "#fff").attr("shcode", "0");
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+
|
|
|
+ $(NodeHandle).css("color", "#ffffff").css("border-bottom", "1px solid #979797").css("background-color", "#ffffff").attr("showFlag", "0");
|
|
|
+ $(NodeHandle).find(".wordStyle,.phraseStyle,.phraseStyle,u,span").css("color", "#ffffff").css("border-bottom", "1px solid #979797").css("background-color", "#ffffff").attr("showFlag", "0");
|
|
|
}
|
|
|
var underlineContentText = $(NodeHandle).text(); // 获取文本内容
|
|
|
if (underlineContentText.indexOf("√") > -1) {
|
|
|
@@ -496,6 +491,9 @@ function bindEventTeaOrignalYS() {
|
|
|
var curAlt = $(this).attr("alt");//播放视频地址
|
|
|
playVisiableAudioCallBack(2, $(this).attr("alt"));
|
|
|
});
|
|
|
+ // 绑定横线内处理
|
|
|
+ $(document).find(".wordStyle,.phraseStyle,.phraseStyle,u,span").attr("shcode", "0").attr("showFlag", "1");
|
|
|
+ $(document).find(".underlineContent").find(".wordStyle,.phraseStyle,.phraseStyle,u,span").attr("shcode", "1").attr("showFlag", "1");
|
|
|
}
|
|
|
|
|
|
//页面加载完,课件 绑定事件
|
|
|
@@ -630,6 +628,9 @@ function bindEventYS() {
|
|
|
var curAlt = $(this).attr("alt");//播放视频地址
|
|
|
playVisiableAudioCallBack(2, $(this).attr("alt"));
|
|
|
});
|
|
|
+ // 绑定横线内处理
|
|
|
+ $(document).find(".wordStyle,.phraseStyle,.phraseStyle,u,span").attr("shcode", "0").attr("showFlag", "1");
|
|
|
+ $(document).find(".underlineContent").find(".wordStyle,.phraseStyle,.phraseStyle,u,span").attr("shcode", "1").attr("showFlag", "1");
|
|
|
}
|
|
|
|
|
|
// 移动端使用,true:表示点击表格且正在移动,需阻止模块切换
|
|
|
@@ -1468,6 +1469,7 @@ function showGLWorld(wordFlag, phraseFlag, sentenceFlag) {
|
|
|
styleWPSContrl.wordFlag = wordFlag;
|
|
|
styleWPSContrl.phraseFlag = phraseFlag;
|
|
|
styleWPSContrl.sentenceFlag = sentenceFlag;
|
|
|
+ // 卡控调用隐藏状态下不处理
|
|
|
dealGLShowFunc(document);
|
|
|
}
|
|
|
|