silk-road's picture
Upload 53 files
3b8d454 verified
$(function(){
tabFlagMap["suitAttr"] = false;
tabFuncMap.suitAttr = function(){
var index = 0;
$.each(equipsettable,function(key,map){
var tr = $("<tr align='center'></tr>");
$("#suitAttrTable tbody").append(tr);
var suitAttrName = $("<td><span style='color:brown;font-size:2rem;'>"+map.NAME+"</span></td>");
var attrTd = $("<td align='left'></td>").append("<div style='margin-left:40%;'>"+findSuitAttr(map)+"</div>");
var includeEquipArr = map["组件"].split(";");
var equipArr = $("<td></td>");
$.each(includeEquipArr,function(index,equipId){
equipArr.append($("<div></div>").append(findEquipTips(equipId)));
});
tr.append($("<td>"+map.INDEX+"</td>"));
tr.append(suitAttrName);
tr.append(attrTd);
tr.append(equipArr);
suitAttrName.append("<span style='display:none;'>"+map["PY"]+"</span>");
index++;
});
/*equipTable*/
$('#suitAttrTable').dataTable( {
"pagingType": "full_numbers",
"language": {
"lengthMenu": "每页 _MENU_ 条记录",
"zeroRecords": "没有找到套装属性,一定是你没充值VIP!",
"info": "第 _PAGE_ 页 ( 总共 _PAGES_ 页 )",
"infoEmpty": "没有套装属性",
"infoFiltered": "(从 _MAX_ 条套装属性过滤)",
"search": "搜索(可用<font color='red'>套装名称</font>首字母):",
"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
},
]
});
$('#suitAttrTable th').css("text-align","center");
}
});