From c45d7f40ec000d00bca761b440e8ac0e3023dda3 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Tue, 25 Apr 2023 15:05:47 +0200 Subject: [PATCH] cosmetic --- js/backend.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/js/backend.js b/js/backend.js index afc97b8..3cfff43 100644 --- a/js/backend.js +++ b/js/backend.js @@ -2,17 +2,19 @@ 'use strict'; $(() => { - $('#post-wtext-form h4').toggleWithLegend( - $('#post-wtext-form').children().not('h4'), - { - user_pref:'dcx_pwt_form', - legend_click:true - } - ); - if ($.isFunction(jsToolBar)) { - $('#post_wtext').each(function() { - var tbWidgetText = new jsToolBar(this); - tbWidgetText.draw('xhtml'); - }); - } + $('#post-wtext-form h4').toggleWithLegend( + $('#post-wtext-form').children().not('h4'), + { + user_pref:'dcx_pwt_form', + legend_click:true + } + ); + + $('#post_wtext').each(function () { + if (typeof jsToolBar === 'function') { + const tbWidgetText = new jsToolBar(this); + tbWidgetText.context = 'pwt'; + tbWidgetText.draw('xhtml'); + } + }); });