Spaces:
Runtime error
Runtime error
File size: 1,863 Bytes
3b8d454 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
$(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");
}
});
|