what i have

This commit is contained in:
Pierre Bondoerffer
2017-04-13 15:27:37 +02:00
parent f11cf8e6ac
commit 7434dbcb0f

View File

@@ -333,6 +333,11 @@ define([
} else if (isEdit) { } else if (isEdit) {
unlockRow(id, function () { unlockRow(id, function () {
change(); change();
setTimeout(function() {
var $newest = $('input[data-rt-id="' + id + '"]');
$newest.focus();
});
}); });
} }
} else if (type === 'col') { } else if (type === 'col') {
@@ -346,6 +351,11 @@ define([
} else if (isEdit) { } else if (isEdit) {
unlockColumn(id, function () { unlockColumn(id, function () {
change(); change();
setTimeout(function() {
var $newest = $('[data-rt-id="' + id + '"]');
$newest.focus();
});
}); });
} }
} else if (type === 'cell') { } else if (type === 'cell') {
@@ -547,14 +557,14 @@ define([
var $table = APP.$table = $(Render.asHTML(displayedObj, null, colsOrder, readOnly)); var $table = APP.$table = $(Render.asHTML(displayedObj, null, colsOrder, readOnly));
var $createRow = APP.$createRow = $('#create-option').click(function () { var $createRow = APP.$createRow = $('#create-option').click(function () {
//console.error("BUTTON CLICKED! LOL"); //console.error("BUTTON CLICKED! LOL");
Render.createRow(proxy, function () { Render.createRow(proxy, function (empty, id) {
unlockRow(id, function () {
change(); change();
var order = APP.proxy.table.rowsOrder;
var last = order[order.length - 1]; setTimeout(function() {
var $newest = $('[data-rt-id="' + last + '"]'); $('.edit[data-rt-id="' + id + '"]').click();
$newest.val(''); });
window.setTimeout(change); });
}); });
}); });