选中表格的的一行元素
function dblGetBody(){//双击查看详细内容 var e=WT.e.fix(e),_e=e.t; while(_e.tagName != 'TABLE'){ if(_e.attr('opt')){ break; } if(_e.tagName == 'TR' && _e.attr('idx')){ createTips('查看'); newsQuery({id:_e.attr('idx')},function(data){ inputDisable(); dataView(data[0]); }); } _e = _e.pn(); } }
选中表格中某一个元素
function newsOpt(){ var e=WT.e.fix(e),_e=e.t; switch(_e.attr('opt')){ case 'newsPpl_edit': createTips('修改'); newsQuery({id:_e.pn(2).attr('idx')},function(data){ dataView(data[0]); $('newsPpl_edit_btns').dc('dn'); $('newsPpl_editRecovery_btn').evt('click',function(){ dataView(JSON.parse(WT.ls.get('newsPplInputDate')),true); }); $('newsPpl_edit_btn').evt('click',function(){ var param = getInputVal(); param.id = _e.pn(2).attr('idx') newsEdit(param); }); $('newsPpl_edit_close_btn').evt('click',function(){ var param = getInputVal(); param.id = _e.pn(2).attr('idx') newsEdit(param); settingTips.r(); newsBody = null; newsBrief = null; $('tips_mask').hide(); }); $('clear_edit_btn').evt('click',function(){ clearInputVal(); }); }); break; case 'newsPpl_del': $('newsPpl_del').dc('dn'); $('mask').style.display = 'block'; $('newsPpl_delTitle').ht(_e.attr('tips')); $('newsPpl_del_no').evt('click',function(){ $('newsPpl_del').ac('dn'); $('mask').style.display = 'none'; }); $('newsPpl_del_yes').evt('click',function(){ newsDel({id:_e.pn(2).attr('idx')}); }); break; } }

 

posted on 2016-07-05 10:21  lvsally  阅读(192)  评论(0编辑  收藏  举报