...{
// 如果已经点击了确定
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 +"|";
}
if(!css.elementHasClass(tr.cells[h],''editbtn'')&&!css.elementHasClass(tr.cells[h],''delbtn'')
&&!css.elementHasClass(tr.cells[h],''updownbtn'') &&!css.elementHasClass(tr.cells[h],''noedit'')) ...{
tr.cells[h].innerHTML = tr.cells[h].firstChild.value;
}
}
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;
for(var o=0;o<tr.cells.length-1;o++) ...{
// 如果该列含有修改样式、删除样式或其他类似样式,则忽略该列
if(!css.elementHasClass(tr.cells[o],''editbtn'')&&!css.elementHasClass(tr.cells[o],''delbtn'')
&&!css.elementHasClass(tr.cells[o],''updownbtn'') &&!css.elementHasClass(tr.cells[o],''noedit'')) ...{
tr.cells[o].innerHTML = tr.cells[o].firstChild.getAttribute(''oldValue'');
tr.setAttribute(''editing'',0);
target.innerText = target.getAttribute(''oldValue'');
中.国.站长站
}
}
var linkEl = createElement(''a'');
linkEl.href = ''#'';
linkEl.onclick = that.editRow;
&nb
