treegrid中添加信息提示

项目中需要在treegrid中显示的内容上,鼠标移到这个内容处,用一个提示信息的方式显示,如图所示,实现此功能,只需要在jquery.easyui.min.js文件中在方法
function _546(row,_547,_548,_549)中添加一句
_54a.push("title=\""+row[_54b]+"\"");/*add title tips*/

以下代码是此treegrid。
row中存放的是返回到前台的所有信息,,_54的值是columns中的field。
$('#taskInfo').treegrid({
title:'任务列表',
width:allWidth,
height:450,
nowrap: true,
rownumbers: true,
animate:false,
fitColumns:true,
collapsible:true,
loadMsg:'正在加载数据,请稍后...',
url:encodeURI('../getTaskInfo.htm?chargeHumanName='+chargeHumanName+'&taskDate='+date),
idField:'taskID',
treeField:'taskName',
frozenColumns:[[
{title:'任务',field:'taskName',width: parseInt(0.15*allWidth),editor:'text'}
]],
columns:[[
{field:'taskDescription',title:'描述',width: parseInt(0.18*allWidth)},
{field:'chargeHumanName',title:'负责人',width: parseInt(0.06*allWidth)},
{field:'startDate',title:'起始时间',width: parseInt(0.08*allWidth)},
{field:'endDate',title:'结束时间',width: parseInt(0.08*allWidth)},
{field:'dayNum',title:'天数',width: parseInt(0.04*allWidth)},
{field:'priority',title:'优先级',width: parseInt(0.05*allWidth)},
{field:'finishDegree',title:'完成度(%)',width: parseInt(0.06*allWidth)},
{field:'remark',title:'备注',width: parseInt(0.26*allWidth)}
]],
toolbar:[{
text:'增加',
iconCls:'icon-add',
handler:function(){
addTask();
}
},'-',{
text:'编辑',
iconCls:'icon-edit',
handler:function(){
editor();
}
},'-',{
text:'删除',
iconCls:'icon-remove',
handler:function(){
remove();
}
},'-',{
text:'取消',
iconCls:'icon-undo',
handler:function(){
cancelSelected();
}
}],
onBeforeLoad:function(row,param){
$(this).treegrid('options').url = encodeURI('../getTaskInfo.htm?chargeHumanName='+chargeHumanName+'&taskDate='+date);
},
onContextMenu: function(e,row){
e.preventDefault();
$(this).treegrid('unselectAll');
$(this).treegrid('select', row.taskID);
$('#menu').menu('show', {
left: e.pageX,
top: e.pageY
});
}
});
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值