else ...{ // 如果已经点击了确定 var pars = "pars="; if(tr.getattribute('editing')!=0) ...{ td.childnodes[0].removenode(true); td.childnodes[0].removenode(true); td.childnodes[0].removenode(true); var linkel2 = createelement('a'); linkel2.href="#"; linkel2.onclick = that.editrow; linkel2.innertext = "修改"; td.appendchild(linkel2);
for(h=0;h<tr.cells.length;h++) ...{ if(!css.elementhasclass(tr.cells[h],'editbtn')&&!css.elementhasclass(tr.cells[h],'delbtn') &&!css.elementhasclass(tr.cells[h],'updownbtn')) ...{ var colid = tr.cells[h].getattribute('columnid'); if(tr.cells[h].firstchild.value!=null) pars += h +"^"+ tr.cells[h].firstchild.value +"|"; else pars += h +"^"+ tr.cells[h].innertext +"|"; }
} } pars = pars.substr(0,pars.length-1); tr.setattribute('editing',0); pars += "&command=editrow&callback=afterupdate&table="+table.id; new ajax.updater('result','dispatcher.ajax?'+pars,...{evalscripts: true}); }
}
}, /**//** * 取消修改 **/ cancelrow : function(e) ...{ var that = crudbtn.that; var target = geteventtarget(e); var td = target.parentnode; var tr = td.parentnode; var thead = tr.parentnode; var table = thead.parentnode;
var column = target.getattribute('columnid') || td.cellindex;