0 Votes

Changes for page Icon Picker Macro

Last modified by Cyril Boillat on 12/05/2024

From version 2.1
edited by Cyril Boillat
on 30/10/2022
Change comment: Migrated property [priority] from class [XWiki.WikiMacroClass]
To version 4.1
edited by Cyril Boillat
on 11/05/2024
Change comment: Migrated property [type] from class [XWiki.WikiMacroParameterClass]

Summary

Details

XWiki.WikiMacroClass[0]
Macro code
... ... @@ -19,13 +19,13 @@
19 19   require(['jquery', 'xwiki-icon-picker'], function($) {
20 20   var options = {};
21 21   #if($xcontext.macro.params.parameterNames.contains('prefix'))
22 - options['prefix'] = '$escapetool.javascript($xcontext.macro.params.prefix)';
22 + options['prefix'] = $jsontool.serialize($xcontext.macro.params.prefix);
23 23   #end
24 24   #if("$!xcontext.macro.params.id" != '')
25 - $('#${xcontext.macro.params.id}').xwikiIconPicker(options);
25 + $($jsontool.serialize("#$escapetool.css($xcontext.macro.params.id)")).xwikiIconPicker(options);
26 26   #end
27 27   #if("$!xcontext.macro.params.get('class')" != '')
28 - $('.${xcontext.macro.params.get('class')}').xwikiIconPicker(options);
28 + $($jsontool.serialize(".$escapetool.css($xcontext.macro.params.get('class'))")).xwikiIconPicker(options);
29 29   #end
30 30   });
31 31  </script>