Project

General

Profile

« Previous | Next » 

Revision 7218849a

Added by koszko over 1 year ago

add a mapping/resources installation dialog

View differences:

html/text_entry_list.js
162 162
	[this.cancel_but,       this.make_noneditable],
163 163
	[this.noneditable_view, this.make_editable],
164 164
    ])
165
	dialog.onevent(list.dialog_ctx, node, "click", cb);
165
	node.addEventListener("click", dialog.when_hidden(list.dialog_ctx, cb));
166 166

  
167
    dialog.onevent(list.dialog_ctx, this.input, "keypress",
168
		   e => (e.key === 'Enter') && enter_hit());
167
    const enter_cb = e => (e.key === 'Enter') && enter_hit();
168
    this.input.addEventListener("keypress",
169
				dialog.when_hidden(list.dialog_ctx, enter_cb));
169 170

  
170 171
    if (entry_idx > 0) {
171 172
	const prev_text = list.shown_texts[entry_idx - 1];
......
226 227

  
227 228
    const add_new = () => new Entry(null, this, 0);
228 229

  
229
    dialog.onevent(dialog_ctx, this.new_but, "click", add_new);
230
    this.new_but.addEventListener("click",
231
				  dialog.when_hidden(dialog_ctx, add_new));
230 232
}
231 233

  
232 234
async function repo_list(dialog_ctx) {

Also available in: Unified diff