From b75a5717a084c9e5a727c2e960f2b910abcb5ace Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 25 Jan 2022 09:37:34 +0100 Subject: add a repo querying HTML interface --- html/text_entry_list.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'html/text_entry_list.js') diff --git a/html/text_entry_list.js b/html/text_entry_list.js index 8cef08f..0ea2862 100644 --- a/html/text_entry_list.js +++ b/html/text_entry_list.js @@ -162,11 +162,11 @@ function Entry(text, list, entry_idx) { [this.cancel_but, this.make_noneditable], [this.noneditable_view, this.make_editable], ]) - node.addEventListener("click", dialog.when_hidden(list.dialog_ctx, cb)); + node.addEventListener("click", list.dialog_ctx.when_hidden(cb)); const enter_cb = e => (e.key === 'Enter') && enter_hit(); this.input.addEventListener("keypress", - dialog.when_hidden(list.dialog_ctx, enter_cb)); + list.dialog_ctx.when_hidden(enter_cb)); if (entry_idx > 0) { const prev_text = list.shown_texts[entry_idx - 1]; @@ -227,8 +227,7 @@ function TextEntryList(dialog_ctx, destroy_cb, const add_new = () => new Entry(null, this, 0); - this.new_but.addEventListener("click", - dialog.when_hidden(dialog_ctx, add_new)); + this.new_but.addEventListener("click", dialog_ctx.when_hidden(add_new)); } async function repo_list(dialog_ctx) { -- cgit v1.2.3