From 1a5cf7f731f1a94f9244bf38ae3c0642184e13ba Mon Sep 17 00:00:00 2001 From: kirsty-hames Date: Thu, 1 Dec 2022 15:44:55 +0000 Subject: [PATCH 1/2] Update adapt-definitions.js - remove reference to missing file (no longer in Core) - add keypress --- js/adapt-definitions.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/adapt-definitions.js b/js/adapt-definitions.js index 321d46a..aa31249 100644 --- a/js/adapt-definitions.js +++ b/js/adapt-definitions.js @@ -1,7 +1,6 @@ define([ 'core/js/adapt', - 'handlebars', - 'core/js/accessibility' + 'handlebars' ],function(Adapt, Handlebars) { function escapeRegExp(text) { @@ -27,6 +26,10 @@ define([ this.listenTo(Adapt, "app:dataLoaded", this.loadData); $('body').on('click', "[definition]", this.onAbbrClick); + $('body').on('keypress', "[definition]", e => { + if (e.which !== 13 ) return; + this.onAbbrClick(e); + }); }, loadData: function() { @@ -143,7 +146,7 @@ define([ var title = Handlebars.compile(this.model.get("title"))(json); var body = Handlebars.compile(this.model.get("body"))(json); - Adapt.trigger("notify:prompt", { + Adapt.notify.popup({ "title": title, "body": "
"+body+"
", "_prompts": [ From bf3d3650c5288064006f3fe2a205005368105263 Mon Sep 17 00:00:00 2001 From: kirsty-hames Date: Thu, 1 Dec 2022 15:49:09 +0000 Subject: [PATCH 2/2] Update README.md role='button' and tabindex='0' added to single instance definition --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb4bf52..8b32f6d 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ### any json - single instance definition ```json { - "body": "This next word" + "body": "This next word" } ```