|
|
@@ -1,5 +1,5 @@
|
|
|
//播放音频图片地址
|
|
|
-var PicInfo = {
|
|
|
+var PicInfo1 = {
|
|
|
answerPointImgUrl: "file:///android_asset/js/update-answer.png",
|
|
|
yaoshiShowImgUrl: "file:///android_asset/js/yaoshi-show.png",
|
|
|
yaoshiHideImgUrl: "file:///android_asset/js/yaoshi-hide.png",
|
|
|
@@ -10,7 +10,7 @@ var PicInfo = {
|
|
|
}
|
|
|
|
|
|
//本地调用用的资源
|
|
|
-var PicInfo1 = {
|
|
|
+var PicInfo = {
|
|
|
answerPointImgUrl: "../Images/update-answer.png",
|
|
|
yaoshiShowImgUrl: "../Images/yaoshi-show.png",
|
|
|
yaoshiHideImgUrl: "../Images/yaoshi-hide.png",
|
|
|
@@ -383,32 +383,33 @@ function bindEventTeaOrignalYS() {
|
|
|
});
|
|
|
$("td").attr("style", "");
|
|
|
//处理表格样式
|
|
|
- $(".container-table").each(function (index, item) {
|
|
|
- var TableWidth = isNaN(parseFloat($(item).find("table").css("width"))) ? 0 : parseFloat($(item).find("table").css("width"));
|
|
|
- var ScrollLeft = isNaN(parseFloat($(item).scrollLeft())) ? 0 : parseFloat($(item).scrollLeft());
|
|
|
- var HWidth = parseFloat(TableWidth) -parseFloat(bodyWidth);
|
|
|
- var HRate = parseFloat(bodyWidth) / parseFloat(TableWidth);
|
|
|
- var SSWidth = bodyWidth - HWidth * HRate; // 显示滚动条宽度
|
|
|
- if (TableWidth > bodyWidth) {
|
|
|
- var HtmlStr = "<div class='ShowSBar' style='width:" + bodyWidth + "px;height:5px;background-color:#eee;position:relative;left:0px;bottom:3px;z-index:2;border-radius:2px;'><div class='ShowSBarC' style='width:" +SSWidth + "px;height:5px;background-color:#ccc;position:absolute;left:" +ScrollLeft + "px;bottom:0px;z-index:3;border-radius:2px;'></div></div>";
|
|
|
- $(item).after(HtmlStr);
|
|
|
- }
|
|
|
- });
|
|
|
- $(".container-table").on("touchstart", function () {
|
|
|
- var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0: parseFloat($(this).find("table").css("width"));
|
|
|
- if (TableWidth > bodyWidth) {
|
|
|
- pressTableFlag = true;
|
|
|
- }
|
|
|
- }).on("touchmove", function () {
|
|
|
- var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0: parseFloat($(this).find("table").css("width"));
|
|
|
- var ScrollLeft = isNaN(parseFloat($(this).scrollLeft())) ? 0: parseFloat($(this).scrollLeft());
|
|
|
- var HRate = parseFloat(bodyWidth) / parseFloat(TableWidth);
|
|
|
- var ShowSBarName = $(this).next().attr("class");
|
|
|
- if (ScrollLeft >= 0 && ShowSBarName == "ShowSBar" && $(this).next().find(".ShowSBarC").length > 0) {
|
|
|
- // 有滚动条的进行移动
|
|
|
- $(this).next().find(".ShowSBarC").css("left", (ScrollLeft*HRate) + "px");
|
|
|
- }
|
|
|
- });
|
|
|
+ //$(".container-table").each(function (index, item) {
|
|
|
+ // var TableWidth = isNaN(parseFloat($(item).find("table").css("width"))) ? 0 : parseFloat($(item).find("table").css("width"));
|
|
|
+ // var ScrollLeft = isNaN(parseFloat($(item).scrollLeft())) ? 0 : parseFloat($(item).scrollLeft());
|
|
|
+ // var HWidth = parseFloat(TableWidth) -parseFloat(bodyWidth);
|
|
|
+ // var HRate = parseFloat(bodyWidth) / parseFloat(TableWidth);
|
|
|
+ // var SSWidth = bodyWidth - HWidth * HRate; // 显示滚动条宽度
|
|
|
+ // if (TableWidth > bodyWidth) {
|
|
|
+ // var HtmlStr = "<div class='ShowSBar' style='width:" + bodyWidth + "px;height:5px;background-color:#eee;position:relative;left:0px;bottom:3px;z-index:2;border-radius:2px;'><div class='ShowSBarC' style='width:" +SSWidth + "px;height:5px;background-color:#ccc;position:absolute;left:" +ScrollLeft + "px;bottom:0px;z-index:3;border-radius:2px;'></div></div>";
|
|
|
+ // $(item).after(HtmlStr);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ //$(".container-table").on("touchstart", function () {
|
|
|
+ // var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0: parseFloat($(this).find("table").css("width"));
|
|
|
+ // if (TableWidth > bodyWidth) {
|
|
|
+ // pressTableFlag = true;
|
|
|
+ // }
|
|
|
+ // }).on("touchmove", function () {
|
|
|
+ // var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0: parseFloat($(this).find("table").css("width"));
|
|
|
+ // var ScrollLeft = isNaN(parseFloat($(this).scrollLeft())) ? 0: parseFloat($(this).scrollLeft());
|
|
|
+ // var HRate = parseFloat(bodyWidth) / parseFloat(TableWidth);
|
|
|
+ // var ShowSBarName = $(this).next().attr("class");
|
|
|
+ // if (ScrollLeft >= 0 && ShowSBarName == "ShowSBar" && $(this).next().find(".ShowSBarC").length > 0) {
|
|
|
+ // // 有滚动条的进行移动
|
|
|
+ // $(this).next().find(".ShowSBarC").css("left", (ScrollLeft * HRate) + "px");
|
|
|
+ // }
|
|
|
+ //});
|
|
|
+ AdjustTableFunc();
|
|
|
}
|
|
|
|
|
|
//页面加载完,课件 绑定事件
|
|
|
@@ -638,32 +639,33 @@ function bindEventYS() {
|
|
|
});
|
|
|
$("td").attr("style", "");
|
|
|
//处理表格样式
|
|
|
- $(".container-table").each(function (index, item) {
|
|
|
- var TableWidth = isNaN(parseFloat($(item).find("table").css("width"))) ? 0 : parseFloat($(item).find("table").css("width"));
|
|
|
- var ScrollLeft = isNaN(parseFloat($(item).scrollLeft())) ? 0 : parseFloat($(item).scrollLeft());
|
|
|
- var HWidth = parseFloat(TableWidth) - parseFloat(bodyWidth);
|
|
|
- var HRate = parseFloat(bodyWidth) / parseFloat(TableWidth);
|
|
|
- var SSWidth = bodyWidth - HWidth * HRate; // 显示滚动条宽度
|
|
|
- if (TableWidth > bodyWidth) {
|
|
|
- var HtmlStr = "<div class='ShowSBar' style='width:" + bodyWidth + "px;height:5px;background-color:#eee;position:relative;left:0px;bottom:3px;z-index:2;border-radius:2px;'><div class='ShowSBarC' style='width:" + SSWidth + "px;height:5px;background-color:#ccc;position:absolute;left:" + ScrollLeft + "px;bottom:0px;z-index:3;border-radius:2px;'></div></div>";
|
|
|
- $(item).after(HtmlStr);
|
|
|
- }
|
|
|
- });
|
|
|
- $(".container-table").on("touchstart", function () {
|
|
|
- var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0 : parseFloat($(this).find("table").css("width"));
|
|
|
- if (TableWidth > bodyWidth) {
|
|
|
- pressTableFlag = true;
|
|
|
- }
|
|
|
- }).on("touchmove", function () {
|
|
|
- var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0 : parseFloat($(this).find("table").css("width"));
|
|
|
- var ScrollLeft = isNaN(parseFloat($(this).scrollLeft())) ? 0 : parseFloat($(this).scrollLeft());
|
|
|
- var HRate = parseFloat(bodyWidth) / parseFloat(TableWidth);
|
|
|
- var ShowSBarName = $(this).next().attr("class");
|
|
|
- if (ScrollLeft >= 0 && ShowSBarName == "ShowSBar" && $(this).next().find(".ShowSBarC").length > 0) {
|
|
|
- // 有滚动条的进行移动
|
|
|
- $(this).next().find(".ShowSBarC").css("left", (ScrollLeft*HRate) + "px");
|
|
|
- }
|
|
|
- });
|
|
|
+ //$(".container-table").each(function (index, item) {
|
|
|
+ // var TableWidth = isNaN(parseFloat($(item).find("table").css("width"))) ? 0 : parseFloat($(item).find("table").css("width"));
|
|
|
+ // var ScrollLeft = isNaN(parseFloat($(item).scrollLeft())) ? 0 : parseFloat($(item).scrollLeft());
|
|
|
+ // var HWidth = parseFloat(TableWidth) - parseFloat(bodyWidth);
|
|
|
+ // var HRate = parseFloat(bodyWidth) / parseFloat(TableWidth);
|
|
|
+ // var SSWidth = bodyWidth - HWidth * HRate; // 显示滚动条宽度
|
|
|
+ // if (TableWidth > bodyWidth) {
|
|
|
+ // var HtmlStr = "<div class='ShowSBar' style='width:" + bodyWidth + "px;height:5px;background-color:#eee;position:relative;left:0px;bottom:3px;z-index:2;border-radius:2px;'><div class='ShowSBarC' style='width:" + SSWidth + "px;height:5px;background-color:#ccc;position:absolute;left:" + ScrollLeft + "px;bottom:0px;z-index:3;border-radius:2px;'></div></div>";
|
|
|
+ // $(item).after(HtmlStr);
|
|
|
+ // }
|
|
|
+ //});
|
|
|
+ //$(".container-table").on("touchstart", function () {
|
|
|
+ // var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0 : parseFloat($(this).find("table").css("width"));
|
|
|
+ // if (TableWidth > bodyWidth) {
|
|
|
+ // pressTableFlag = true;
|
|
|
+ // }
|
|
|
+ //}).on("touchmove", function () {
|
|
|
+ // var TableWidth = isNaN(parseFloat($(this).find("table").css("width"))) ? 0 : parseFloat($(this).find("table").css("width"));
|
|
|
+ // var ScrollLeft = isNaN(parseFloat($(this).scrollLeft())) ? 0 : parseFloat($(this).scrollLeft());
|
|
|
+ // var HRate = parseFloat(bodyWidth) / parseFloat(TableWidth);
|
|
|
+ // var ShowSBarName = $(this).next().attr("class");
|
|
|
+ // if (ScrollLeft >= 0 && ShowSBarName == "ShowSBar" && $(this).next().find(".ShowSBarC").length > 0) {
|
|
|
+ // // 有滚动条的进行移动
|
|
|
+ // $(this).next().find(".ShowSBarC").css("left", (ScrollLeft*HRate) + "px");
|
|
|
+ // }
|
|
|
+ //});
|
|
|
+ AdjustTableFunc();
|
|
|
}
|
|
|
var pressTableFlag = false;
|
|
|
// 移动端使用,true:表示点击表格且正在移动,需阻止模块切换
|
|
|
@@ -1503,7 +1505,7 @@ var answerData = new Array();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function getSelectedText(title) {
|
|
|
+function getSelectedText(title) {
|
|
|
var txt;
|
|
|
if (window.getSelection) {
|
|
|
txt = window.getSelection().toString();
|