mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	added relation name autocomplete to relation map connection creation
This commit is contained in:
		| @@ -4,19 +4,28 @@ const $answer = $("#prompt-dialog-answer"); | ||||
| const $form = $("#prompt-dialog-form"); | ||||
|  | ||||
| let resolve; | ||||
| let shownCb; | ||||
|  | ||||
| function ask(message, defaultValue = '') { | ||||
| function ask({ message, defaultValue, shown }) { | ||||
|     glob.activeDialog = $dialog; | ||||
|  | ||||
|     shownCb = shown; | ||||
|  | ||||
|     $question.text(message); | ||||
|     $answer.val(defaultValue); | ||||
|     $answer.val(defaultValue || ""); | ||||
|  | ||||
|     $dialog.modal(); | ||||
|  | ||||
|     return new Promise((res, rej) => { resolve = res; }); | ||||
| } | ||||
|  | ||||
| $dialog.on('shown.bs.modal', () => $answer.focus().select()); | ||||
| $dialog.on('shown.bs.modal', () => { | ||||
|     if (shownCb) { | ||||
|         shownCb({ $dialog, $question, $answer, $form }); | ||||
|     } | ||||
|  | ||||
|     $answer.focus().select(); | ||||
| }); | ||||
|  | ||||
| $dialog.on("hidden.bs.modal", () => { | ||||
|     if (resolve) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user