Spaces:
Runtime error
Runtime error
$(function(){ | |
tabFlagMap["treasure"] = false; | |
tabFuncMap.treasure = function(){ | |
var index = Object.keys(equipskillconfig).length ; | |
$.each(equipskillconfig,function(key,map){ | |
var tr = $("<tr align='center'></tr>"); | |
$("#treasureTable tbody").append(tr); | |
var className = $("<td><span style='color:brown;font-size:2rem;'>"+map.ID+"</span></td>"); | |
tr.append($("<td>"+map.INDEX+"</td>")); | |
tr.append("<td>"+index+"</td>"); | |
tr.append(className); | |
for(var i=1;i<=5;i++){ | |
var treasureSkillNameTd = $("<td></td>"); | |
var treasureSkill = equipskilldata[map["技能"+i]]; | |
if(treasureSkill){ | |
var mtpis = ""; | |
mtpis += "<div>法宝技能:"+treasureSkill.NAME+"</div>"; | |
mtpis += "<div>技能描述:"+findTreasureDescript(map["技能"+i])+"</div>"; | |
mtpis += "<div>实际效果:<font color=yellow>"+findSkillRewardInfo(treasureSkill)+"</font></div>"; | |
var buffMap = buffdatatable[treasureSkill["效果1-类型"]]; | |
if(buffMap && buffMap.ID != "0"){ | |
mtpis += "<div>技能特效: <font color=yellow>"+buffMap.NAME+"</font></div>"; | |
} | |
var treasureSkillDataSpan = $("<span style='color:green'>"+treasureSkill.NAME+"</span>"); | |
mtpisListener(treasureSkillDataSpan,mtpis); | |
treasureSkillNameTd.append(treasureSkillDataSpan); | |
} | |
tr.append(treasureSkillNameTd); | |
} | |
index--; | |
}); | |
/*treasureTable*/ | |
$('#treasureTable').dataTable( { | |
"pagingType": "full_numbers", | |
"language": { | |
"lengthMenu": "每页 _MENU_ 条记录", | |
"zeroRecords": "没有找到法宝技能,难道我遗漏了?!", | |
"info": "第 _PAGE_ 页 ( 总共 _PAGES_ 页 )", | |
"infoEmpty": "没有法宝技能", | |
"infoFiltered": "(从 _MAX_ 条法宝过滤)", | |
"search": "搜索:", | |
"paginate": { | |
"first": "首页<font color=red>(W)</font>", | |
"last": "末页<font color=red>(S)</font>", | |
"next": "下一页<font color=red>(D)</font>", | |
"previous": "上一页<font color=red>(A)</font>" | |
}, | |
}, | |
// 默认按照索引排序,且隐藏索引列 | |
"order": [[ 0, "asc" ]], | |
"columnDefs": [ | |
{ | |
"targets": [ 0 ], | |
"visible": false, | |
"searchable": false | |
}, | |
] | |
}); | |
$('#treasureTable th').css("text-align","center"); | |
} | |
}); |