make table edit keys more robust against multiple activations by accident

pull/40/head
Kai Labusch 5 years ago
parent 4ae032ea87
commit 10d9526606

@ -444,32 +444,53 @@ function setupInterface(data, file, urls) {
let row_listener = new window.keypress.Listener(row, listener_defaults);
row_listener.sequence_combo('0',
row_listener.register_many(
[
{
keys: 's t',
on_keydown:
function() {
data.data[row.data('tableInfo').nRow]['No.'] = 0;
row.children('.editable').first().html('0');
notifyChange();
});
row_listener.sequence_combo('s t', function() {
tableEditAction(row.data('tableInfo').nRow, 'sentence');
});
},
is_sequence: true,
is_solitary: true,
is_exclusive: true
},
row_listener.sequence_combo('s p', function() {
{
keys: 's p',
on_keydown:
function() {
tableEditAction(row.data('tableInfo').nRow, 'split');
});
},
is_sequence: true,
is_solitary: true,
is_exclusive: true
},
row_listener.sequence_combo('m e', function() {
{
keys: 'm e',
on_keydown:
function() {
tableEditAction(row.data('tableInfo').nRow, 'merge');
});
},
is_sequence: true,
is_solitary: true,
is_exclusive: true
},
row_listener.sequence_combo('d l', function() {
{
keys: 'd l',
on_keydown:
function() {
tableEditAction(row.data('tableInfo').nRow, 'delete');
});
},
is_sequence: true,
is_solitary: true,
is_exclusive: true
}
]
);
$.each(el,
function(column, content) {

Loading…
Cancel
Save