mirror of
https://github.com/qurator-spk/neat.git
synced 2025-06-12 21:29:54 +02:00
make table edit keys more robust against multiple activations by accident
This commit is contained in:
parent
4ae032ea87
commit
10d9526606
1 changed files with 44 additions and 23 deletions
67
neath.js
67
neath.js
|
@ -444,32 +444,53 @@ function setupInterface(data, file, urls) {
|
||||||
|
|
||||||
let row_listener = new window.keypress.Listener(row, listener_defaults);
|
let row_listener = new window.keypress.Listener(row, listener_defaults);
|
||||||
|
|
||||||
row_listener.sequence_combo('0',
|
row_listener.register_many(
|
||||||
function() {
|
[
|
||||||
|
{
|
||||||
|
keys: 's t',
|
||||||
|
on_keydown:
|
||||||
|
function() {
|
||||||
|
tableEditAction(row.data('tableInfo').nRow, 'sentence');
|
||||||
|
},
|
||||||
|
is_sequence: true,
|
||||||
|
is_solitary: true,
|
||||||
|
is_exclusive: true
|
||||||
|
},
|
||||||
|
|
||||||
data.data[row.data('tableInfo').nRow]['No.'] = 0;
|
{
|
||||||
|
keys: 's p',
|
||||||
|
on_keydown:
|
||||||
|
function() {
|
||||||
|
tableEditAction(row.data('tableInfo').nRow, 'split');
|
||||||
|
},
|
||||||
|
is_sequence: true,
|
||||||
|
is_solitary: true,
|
||||||
|
is_exclusive: true
|
||||||
|
},
|
||||||
|
|
||||||
row.children('.editable').first().html('0');
|
{
|
||||||
|
keys: 'm e',
|
||||||
notifyChange();
|
on_keydown:
|
||||||
});
|
function() {
|
||||||
|
tableEditAction(row.data('tableInfo').nRow, 'merge');
|
||||||
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() {
|
},
|
||||||
tableEditAction(row.data('tableInfo').nRow, 'split');
|
|
||||||
});
|
|
||||||
|
|
||||||
row_listener.sequence_combo('m e', function() {
|
|
||||||
tableEditAction(row.data('tableInfo').nRow, 'merge');
|
|
||||||
});
|
|
||||||
|
|
||||||
row_listener.sequence_combo('d l', function() {
|
|
||||||
tableEditAction(row.data('tableInfo').nRow, 'delete');
|
|
||||||
});
|
|
||||||
|
|
||||||
|
{
|
||||||
|
keys: 'd l',
|
||||||
|
on_keydown:
|
||||||
|
function() {
|
||||||
|
tableEditAction(row.data('tableInfo').nRow, 'delete');
|
||||||
|
},
|
||||||
|
is_sequence: true,
|
||||||
|
is_solitary: true,
|
||||||
|
is_exclusive: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
$.each(el,
|
$.each(el,
|
||||||
function(column, content) {
|
function(column, content) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue