[DE] Caption Dialog
This commit is contained in:
parent
fcc65c820a
commit
ab44158ee6
|
@ -387,7 +387,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onPrimary: function() {
|
onPrimary: function() {
|
||||||
this._handleInput('insert');
|
this._handleInput('ok');
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -412,6 +412,16 @@ define([
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
event.target.selectionStart = me.positionCaption;
|
event.target.selectionStart = me.positionCaption;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
} else if (event.target.selectionStart !== event.target.selectionEnd && key === 'ArrowRight') {
|
||||||
|
if (event.target.selectionEnd > me.positionCaption) {
|
||||||
|
setTimeout(function () {
|
||||||
|
event.target.selectionStart = event.target.selectionEnd;
|
||||||
|
}, 0);
|
||||||
|
} else {
|
||||||
|
setTimeout(function () {
|
||||||
|
event.target.selectionStart = me.positionCaption;
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
} else if (key === 'Backspace') {
|
} else if (key === 'Backspace') {
|
||||||
if ((event.target.selectionStart === event.target.selectionEnd && event.target.selectionStart < me.positionCaption + 1) || event.target.selectionStart < me.positionCaption - 1) {
|
if ((event.target.selectionStart === event.target.selectionEnd && event.target.selectionStart < me.positionCaption + 1) || event.target.selectionStart < me.positionCaption - 1) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -420,7 +430,7 @@ define([
|
||||||
if (event.target.selectionStart < me.positionCaption - 1) {
|
if (event.target.selectionStart < me.positionCaption - 1) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
} else {
|
} else if (key !== 'End') {
|
||||||
if (event.target.selectionStart !== event.target.selectionEnd && event.target.selectionStart === 0) {
|
if (event.target.selectionStart !== event.target.selectionEnd && event.target.selectionStart === 0) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
@ -449,7 +459,7 @@ define([
|
||||||
textFigure: 'Figure',
|
textFigure: 'Figure',
|
||||||
textTable: 'Table',
|
textTable: 'Table',
|
||||||
textExclude: 'Exclude label from caption',
|
textExclude: 'Exclude label from caption',
|
||||||
textLabelError: 'The entered value is incorrect.'
|
textLabelError: 'Label must not be empty.'
|
||||||
|
|
||||||
}, DE.Views.CaptionDialog || {}))
|
}, DE.Views.CaptionDialog || {}))
|
||||||
});
|
});
|
Loading…
Reference in a new issue