提交 0f0b1384 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Extract duplicate code to editFinish() in table.js

上级 c31e1b7b
......@@ -104,25 +104,23 @@ function deleteRow(row, session, write, undo) {
}
}
function editCancel(row) {
function editFinish(row, res) {
var editing = document.getElementById('editing');
editing.row.value = row;
editing.op.value='3';
editing.op.value = res;
editing.submit();
}
function editCancel(row) {
editFinish(row, '3');
}
function editOk(row) {
var editing = document.getElementById('editing');
editing.row.value = row;
editing.op.value='1';
editing.submit();
editFinish(row, '1');
}
function deleteOk(row) {
var editing = document.getElementById('editing');
editing.row.value = row;
editing.op.value='2';
editing.submit();
editFinish(row, '2');
}
function editKeyDown(row, object, event) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论