treegrid中添加信息提示

treegrid中添加信息提示

博客分类:  jquery easyui
jQuery 
项目中需要在treegrid中显示的内容上,鼠标移到这个内容处,用一个提示信息的方式显示,如图所示,实现此功能,只需要在jquery.easyui.min.js文件中在方法 
function _546(row,_547,_548,_549)中添加一句 
Java代码   收藏代码
  1. _54a.push("title=\""+row[_54b]+"\"");/*add title tips*/  
。 
以下代码是此treegrid。 
row中存放的是返回到前台的所有信息,,_54的值是columns中的field。 
Java代码   收藏代码
  1. $('#taskInfo').treegrid({  
  2.         title:'任务列表',  
  3.         width:allWidth,  
  4.         height:450,  
  5.         nowrap: true,  
  6.         rownumbers: true,  
  7.         animate:false,  
  8.         fitColumns:true,  
  9.         collapsible:true,  
  10.         loadMsg:'正在加载数据,请稍后...',  
  11.         url:encodeURI('../getTaskInfo.htm?chargeHumanName='+chargeHumanName+'&taskDate='+date),  
  12.         idField:'taskID',  
  13.         treeField:'taskName',  
  14.         frozenColumns:[[  
  15.             {title:'任务',field:'taskName',width: parseInt(0.15*allWidth),editor:'text'}  
  16.         ]],  
  17.         columns:[[  
  18.             {field:'taskDescription',title:'描述',width: parseInt(0.18*allWidth)},  
  19.             {field:'chargeHumanName',title:'负责人',width: parseInt(0.06*allWidth)},  
  20.             {field:'startDate',title:'起始时间',width: parseInt(0.08*allWidth)},  
  21.             {field:'endDate',title:'结束时间',width: parseInt(0.08*allWidth)},  
  22.             {field:'dayNum',title:'天数',width: parseInt(0.04*allWidth)},  
  23.             {field:'priority',title:'优先级',width: parseInt(0.05*allWidth)},  
  24.             {field:'finishDegree',title:'完成度(%)',width: parseInt(0.06*allWidth)},  
  25.             {field:'remark',title:'备注',width: parseInt(0.26*allWidth)}  
  26.         ]],  
  27.         toolbar:[{  
  28.             text:'增加',  
  29.             iconCls:'icon-add',  
  30.             handler:function(){  
  31.                 addTask();  
  32.             }  
  33.         },'-',{  
  34.             text:'编辑',  
  35.             iconCls:'icon-edit',  
  36.             handler:function(){  
  37.                 editor();  
  38.             }  
  39.         },'-',{  
  40.             text:'删除',  
  41.             iconCls:'icon-remove',  
  42.             handler:function(){  
  43.                 remove();  
  44.             }  
  45.         },'-',{  
  46.             text:'取消',  
  47.             iconCls:'icon-undo',  
  48.             handler:function(){  
  49.                 cancelSelected();  
  50.             }  
  51.         }],    
  52.         onBeforeLoad:function(row,param){  
  53.             $(this).treegrid('options').url = encodeURI('../getTaskInfo.htm?chargeHumanName='+chargeHumanName+'&taskDate='+date);  
  54.         },  
  55.         onContextMenu: function(e,row){  
  56.             e.preventDefault();  
  57.             $(this).treegrid('unselectAll');  
  58.             $(this).treegrid('select', row.taskID);  
  59.             $('#menu').menu('show', {  
  60.                 left: e.pageX,  
  61.                 top: e.pageY  
  62.             });  
  63.         }  
  64.     });  
  65. }  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值