|
|
@@ -446,16 +446,18 @@ var AddListenDiv = function (NodeHandle, NIndex, sWidthVal) {
|
|
|
ListenDivWidth = (ListenDivWidth > 414 ? 414 : ListenDivWidth);
|
|
|
if (UrlStr != null && UrlStr.indexOf("|") > -1) {
|
|
|
var UrlArr = UrlStr.split("|");
|
|
|
+ var UrlArrLen = UrlArr.length;
|
|
|
var htmlStr = '<div class="ListenDiv" data-status="1" style="width:' + ListenDivWidth + 'px;"><div class="LDivTop">';
|
|
|
+ var MaxLeftVal = (ListenDivWidth - 295) / 2; // 自动调整宽度
|
|
|
var selectIndex = 0;
|
|
|
for (var i = 0; i < UrlArr.length; i++) {
|
|
|
var SelectedN = (i == 0 ? 1 : 0);
|
|
|
if (SelectedN) {
|
|
|
selectIndex = i;
|
|
|
}
|
|
|
- htmlStr += '<div class="LDivTItem LDivTItem_' + NIndex + ' LDivTItem_' + NIndex + '_' + i + '" data-selected="' + SelectedN + '" onclick="cLSourceFunc(' + NIndex + ',' + i + ')" data-auduourl="' + UrlArr[i] + '">听力材料' + (i + 1) + '</div>';
|
|
|
+ htmlStr += '<div class="LDivTItem LDivTItem_' + NIndex + ' LDivTItem_' + NIndex + '_' + i + '" data-selected="' + SelectedN + '" onclick="cLSourceFunc(' + NIndex + ',' + i + ')" data-auduourl="' + UrlArr[i] + '" style="margin-left:' + MaxLeftVal + 'px;">听力材料' + (i + 1) + '</div>';
|
|
|
}
|
|
|
- htmlStr += '</div><div class="LDivFooter"><div class="LDFPlayS LDFPlayS_' + NIndex + '" data-playstatus="0" onclick="playMusicFunc(' + NIndex + ')"></div><div class="LDFPauseS LDFPauseS_' + NIndex + '" onclick="pauseMusicFunc(' + NIndex + ')"></div><div class="LDFProcS"><div class="LDFPWhite LDFPWhite_' + NIndex + '"></div><div class="LDFProcImg LDFProcImg_' + NIndex + '"></div></div><div class="LDFTimerS" data-mtype="' + cTTypeFunc + '" data-fsFlag="100"><span class="RunTime RunTime_' + NIndex + '">00:00</span><span>/</span><span class="RunAllTime RunAllTime_' + NIndex + '">00:00</span></div></div><div class="SImg SImg_' + NIndex + '"></div></div>';
|
|
|
+ htmlStr += '</div><div class="LDivFooter"><div class="LDFPlayS LDFPlayS_' + NIndex + '" data-playstatus="0" onclick="playMusicFunc(' + NIndex + ')"></div><div class="LDFPauseS LDFPauseS_' + NIndex + '" onclick="pauseMusicFunc(' + NIndex + ')"></div><div class="LDFProcS"><div class="LDFPWhite LDFPWhite_' + NIndex + '"></div><div class="LDFProcImg LDFProcImg_' + NIndex + '"></div></div><div class="LDFTimerS" data-mtype="' + cTTypeFunc + '" data-fsFlag="100"><span class="RunTime RunTime_' + NIndex + '">00:00</span><span>/</span><span class="RunAllTime RunAllTime_' + NIndex + '">00:00</span></div></div><div class="SImg SImg_' + NIndex + '" data-urlindex="' + selectIndex + '" data-urllen="' + UrlArrLen + '" data-mlval="' + MaxLeftVal + '"></div></div>';
|
|
|
}
|
|
|
else if (UrlStr != null) {
|
|
|
var htmlStr = '<div class="ListenDiv" data-status="0" style="width:' + ListenDivWidth + 'px;"><div class="LDivTop" style="width:1px;height:0px;overflow:hidden;"><div class="LDivTItem LDivTItem_' + NIndex + ' LDivTItem_' + NIndex + '_0" data-selected="1" onclick="cLSourceFunc(' + NIndex + ',0)" data-selected="1" data-auduourl="' + UrlStr + '"></div></div><div class="LDivFooter"><div class="LDFPlayS LDFPlayS_' + NIndex + '" data-playstatus="0" onclick="playMusicFunc(' + NIndex + ')"></div><div class="LDFPauseS LDFPauseS_' + NIndex + '" onclick="pauseMusicFunc(' + NIndex + ')"></div><div class="LDFProcS"><div class="LDFPWhite LDFPWhite_' + NIndex + '"></div><div class="LDFProcImg LDFProcImg_' + NIndex + '"></div></div><div class="LDFTimerS" data-mtype="' + cTTypeFunc + '" data-fsFlag="100"><span class="RunTime RunTime_' + NIndex + '">00:00</span><span>/</span><span class="RunAllTime RunAllTime_' + NIndex + '">00:00</span></div></div></div>';
|
|
|
@@ -474,7 +476,10 @@ var cLSourceFunc = function (iIndex, oIndex) {
|
|
|
$(jQIStr).attr("data-selected", 0);
|
|
|
$(jQIOStr).attr("data-selected", 1);
|
|
|
jQIStr = ".SImg_" + iIndex;
|
|
|
- var LeftPx = 48 + oIndex * 138;
|
|
|
+ //var dataUrlLen = $(jQIStr).attr("data-urllen");
|
|
|
+ var LeftPx = 0;
|
|
|
+ var MLValStr = $(jQIStr).attr("data-mlval");
|
|
|
+ LeftPx = 48 + oIndex * (85 + parseInt(MLValStr));
|
|
|
$(jQIStr).css("left", LeftPx + "px");
|
|
|
}
|
|
|
// 暂停播放处理
|