From f0fa87a05152402e835e8327f18238f3e582dc40 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Sat, 6 Mar 2021 15:37:48 +0000 Subject: [PATCH] Bug 27890: Select new macro after creation There was an error here, we were capturing the status of the request (i.e. success) instead of the returned data. To test: 1 - Go to Cataloguing -> Advanced editor 2 - Click 'Macros' 3 - 'New macro..' 4 - Assing a name and click 'Ok' 5 - New macro is in list on left, but not selected 6 - Type into editor, no save feedback after typing 7 - Apply patch 8 - Reload the editor 9 - Repeat 3-4 10 - New macro is selected 11 - Type into editor, save notification appears --- koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc index 39f03f75b5..352e9a0c53 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc @@ -902,7 +902,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr }) }; $.ajax(options) - .then(function(undef, result) { + .then(function(result) { showSavedMacros(); loadMacro( result.name, result.macro_id ); }) -- 2.11.0