From bc2e2304255aa38ea5ef881dcfba7d140190f463 Mon Sep 17 00:00:00 2001 From: azivner Date: Fri, 9 Nov 2018 14:49:08 +0100 Subject: [PATCH] fix frontend API to work with JAM icons --- .../javascripts/services/frontend_script_api.js | 16 +++++++++------- src/public/stylesheets/style.css | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/public/javascripts/services/frontend_script_api.js b/src/public/javascripts/services/frontend_script_api.js index e57f963fd..229afa98d 100644 --- a/src/public/javascripts/services/frontend_script_api.js +++ b/src/public/javascripts/services/frontend_script_api.js @@ -47,7 +47,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) { /** * @typedef {Object} ToolbarButtonOptions * @property {string} title - * @property {string} [icon] - name of the jQuery UI icon to be used (e.g. "clock" for "ui-icon-clock" icon) + * @property {string} [icon] - name of the JAM icon to be used (e.g. "clock" for "jam-clock" icon) * @property {function} action - callback handling the click on the button * @property {string} [shortcut] - keyboard shortcut for the button, e.g. "alt+t" */ @@ -60,14 +60,16 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) { this.addButtonToToolbar = opts => { const buttonId = "toolbar-button-" + opts.title.replace(/[^a-zA-Z0-9]/g, "-"); - const icon = $("") - .addClass("ui-icon ui-icon-" + opts.icon); - const button = $('