display a 'commit' button which locks your column

This commit is contained in:
ansuz
2016-08-18 17:54:17 +02:00
parent e7aafd2beb
commit f8f66800d1
3 changed files with 36 additions and 6 deletions

View File

@@ -199,10 +199,27 @@ define([
.attr('disabled', !bool);
if (bool) {
var $target = $('tfoot td')
.eq(module.rt.proxy.table.colsOrder.indexOf(id) + 1);
if ($target.length) {
var $save = $('<span>', {
'class': 'save action',
'for': id,
})
.text('COMMIT') // TODO translate
.click(function () {
makeUserEditable(id, false);
});
$target.append($save);
}
module.activeColumn = id;
module.rt.proxy.table.colsOrder.forEach(function (coluid) {
if (coluid !== id) { makeUserEditable(coluid, false); }
});
} else {
$('.save[for="' + id + '"]').remove();
}
return $sel;