mirror of
https://github.com/qurator-spk/neat.git
synced 2025-06-13 21:59:54 +02:00
#44; disable all the key combinations while editing
This commit is contained in:
parent
5219e55bfb
commit
2729bb35ba
1 changed files with 15 additions and 3 deletions
18
neath.js
18
neath.js
|
@ -450,6 +450,8 @@ function setupInterface(data, file, urls) {
|
||||||
keys: 's t',
|
keys: 's t',
|
||||||
on_keydown:
|
on_keydown:
|
||||||
function() {
|
function() {
|
||||||
|
if (editingTd != null) return true;
|
||||||
|
|
||||||
tableEditAction(row.data('tableInfo').nRow, 'sentence');
|
tableEditAction(row.data('tableInfo').nRow, 'sentence');
|
||||||
},
|
},
|
||||||
is_sequence: true,
|
is_sequence: true,
|
||||||
|
@ -461,6 +463,8 @@ function setupInterface(data, file, urls) {
|
||||||
keys: 's p',
|
keys: 's p',
|
||||||
on_keydown:
|
on_keydown:
|
||||||
function() {
|
function() {
|
||||||
|
if (editingTd != null) return true;
|
||||||
|
|
||||||
tableEditAction(row.data('tableInfo').nRow, 'split');
|
tableEditAction(row.data('tableInfo').nRow, 'split');
|
||||||
},
|
},
|
||||||
is_sequence: true,
|
is_sequence: true,
|
||||||
|
@ -472,6 +476,8 @@ function setupInterface(data, file, urls) {
|
||||||
keys: 'm e',
|
keys: 'm e',
|
||||||
on_keydown:
|
on_keydown:
|
||||||
function() {
|
function() {
|
||||||
|
if (editingTd != null) return true;
|
||||||
|
|
||||||
tableEditAction(row.data('tableInfo').nRow, 'merge');
|
tableEditAction(row.data('tableInfo').nRow, 'merge');
|
||||||
},
|
},
|
||||||
is_sequence: true,
|
is_sequence: true,
|
||||||
|
@ -483,6 +489,8 @@ function setupInterface(data, file, urls) {
|
||||||
keys: 'd l',
|
keys: 'd l',
|
||||||
on_keydown:
|
on_keydown:
|
||||||
function() {
|
function() {
|
||||||
|
if (editingTd != null) return true;
|
||||||
|
|
||||||
tableEditAction(row.data('tableInfo').nRow, 'delete');
|
tableEditAction(row.data('tableInfo').nRow, 'delete');
|
||||||
},
|
},
|
||||||
is_sequence: true,
|
is_sequence: true,
|
||||||
|
@ -821,7 +829,7 @@ function setupInterface(data, file, urls) {
|
||||||
$('#tableregion')[0].addEventListener("wheel",
|
$('#tableregion')[0].addEventListener("wheel",
|
||||||
function(event) {
|
function(event) {
|
||||||
|
|
||||||
if (editingTd != null) return;
|
if (editingTd != null) return true;
|
||||||
|
|
||||||
if (event.deltaY < 0) stepsBackward(1);
|
if (event.deltaY < 0) stepsBackward(1);
|
||||||
else stepsForward(1);
|
else stepsForward(1);
|
||||||
|
@ -836,14 +844,14 @@ function setupInterface(data, file, urls) {
|
||||||
|
|
||||||
wnd_listener.simple_combo('pageup',
|
wnd_listener.simple_combo('pageup',
|
||||||
function() {
|
function() {
|
||||||
if (editingTd != null) return;
|
if (editingTd != null) return true;
|
||||||
|
|
||||||
$('#back').click();
|
$('#back').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
wnd_listener.simple_combo('pagedown',
|
wnd_listener.simple_combo('pagedown',
|
||||||
function() {
|
function() {
|
||||||
if (editingTd != null) return;
|
if (editingTd != null) return true;
|
||||||
|
|
||||||
$('#next').click();
|
$('#next').click();
|
||||||
});
|
});
|
||||||
|
@ -949,6 +957,8 @@ function setupInterface(data, file, urls) {
|
||||||
wnd_listener.sequence_combo('l a',
|
wnd_listener.sequence_combo('l a',
|
||||||
function() {
|
function() {
|
||||||
|
|
||||||
|
if (editingTd != null) return true;
|
||||||
|
|
||||||
displayRows++;
|
displayRows++;
|
||||||
|
|
||||||
endIndex = startIndex + displayRows;
|
endIndex = startIndex + displayRows;
|
||||||
|
@ -967,6 +977,8 @@ function setupInterface(data, file, urls) {
|
||||||
wnd_listener.sequence_combo('l r',
|
wnd_listener.sequence_combo('l r',
|
||||||
function() {
|
function() {
|
||||||
|
|
||||||
|
if (editingTd != null) return true;
|
||||||
|
|
||||||
if (displayRows > 5) displayRows--;
|
if (displayRows > 5) displayRows--;
|
||||||
|
|
||||||
endIndex = startIndex + displayRows;
|
endIndex = startIndex + displayRows;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue