Project

General

Profile

« Previous | Next » 

Revision 7218849a

Added by koszko over 1 year ago

add a mapping/resources installation dialog

View differences:

html/item_list.js
200 200

  
201 201
async function remove_single_item(item_type, identifier)
202 202
{
203
    const store = ({resource: "resources", mapping: "mappings"})[item_type];
204 203
    const transaction_ctx =
205
	  await haketilodb.start_items_transaction([store], {});
204
	  await haketilodb.start_items_transaction([item_type], {});
206 205
    await haketilodb[`remove_${item_type}`](identifier, transaction_ctx);
207 206
    await haketilodb.finalize_transaction(transaction_ctx);
208 207
}
209 208

  
210 209
function resource_list()
211 210
{
212
      return item_list(resource_preview, haketilodb.track.resources,
211
      return item_list(resource_preview, haketilodb.track.resource,
213 212
		       id => remove_single_item("resource", id));
214 213
}
215 214
#EXPORT resource_list
216 215

  
217 216
function mapping_list()
218 217
{
219
      return item_list(mapping_preview, haketilodb.track.mappings,
218
      return item_list(mapping_preview, haketilodb.track.mapping,
220 219
		       id => remove_single_item("mapping", id));
221 220
}
222 221
#EXPORT mapping_list

Also available in: Unified diff