Merge branch 'stable'

# Conflicts:
#	src/public/javascripts/dialogs/add_link.js
This commit is contained in:
zadam 2019-05-13 21:42:52 +02:00
commit 93c0469aa0
2 changed files with 4 additions and 7 deletions

View file

@ -93,15 +93,16 @@ $form.submit(() => {
$dialog.modal('hide');
const linkHref = '#' + notePath;
const editor = noteDetailService.getActiveComponent().getEditor();
if (hasSelection()) {
const editor = noteDetailService.getActiveComponent().getEditor();
editor.execute('link', linkHref);
}
else {
linkService.addLinkToEditor(linkTitle, linkHref);
}
editor.editing.view.focus();
}
else if (linkType === 'selected-to-active') {
const prefix = $clonePrefix.val();
@ -144,10 +145,6 @@ function linkTypeChanged() {
$linkTypes.change(linkTypeChanged);
// return back focus to note text detail after quitting add link
// the problem is that cursor position is reset
$dialog.on("hidden.bs.modal", () => noteDetailService.getActiveComponent().focus());
export default {
showDialog,
showDialogForClone

View file

@ -92,7 +92,7 @@ async function getManyRows(query, params) {
let results = [];
while (params.length > 0) {
const curParams = params.slice(0, Math.max(params.length, PARAM_LIMIT));
const curParams = params.slice(0, Math.min(params.length, PARAM_LIMIT));
params = params.slice(curParams.length);
let i = 1;