comparison doc/admin_guide.txt @ 7981:eae83a32f564

docs: add section on loading classhelper.js script. Also provide some info about precompressing and minimizing the file. Add a reference for the compression config info.
author John Rouillard <rouilj@ieee.org>
date Tue, 21 May 2024 23:49:19 -0400
parents ecb09e5d0bfa
children 72fb18809559
comparison
equal deleted inserted replaced
7980:372517700dad 7981:eae83a32f564
241 existing config.ini. Running this in a tracker home directory will 241 existing config.ini. Running this in a tracker home directory will
242 move the exsiting config.ini to config.bak and replace it with the 242 move the exsiting config.ini to config.bak and replace it with the
243 roundup-server's config.ini. This will make the tracker in the 243 roundup-server's config.ini. This will make the tracker in the
244 directory fail to start util the original config.ini is restored. 244 directory fail to start util the original config.ini is restored.
245 245
246 .. _configuring-compression:
247
246 Configuring Compression 248 Configuring Compression
247 ======================= 249 =======================
248 250
249 Roundup will compress HTTP responses to clients on the fly. Dynamic, 251 Roundup will compress HTTP responses to clients on the fly. Dynamic,
250 on the fly, compression is enabled by default, to disable it set:: 252 on the fly, compression is enabled by default, to disable it set::
619 </td> 621 </td>
620 622
621 The ``','.join(search.split(',')[:-1])`` removes the last element of 623 The ``','.join(search.split(',')[:-1])`` removes the last element of
622 the search string (``roles[]``) if the user does not have the Admin 624 the search string (``roles[]``) if the user does not have the Admin
623 role. 625 role.
626
627 Loading the <roundup-classhelper> Script
628 ----------------------------------------
629
630 To make the ``<roundup-classhelper>`` wrappers work, you
631 have to load the classhelper.js script. Add the following
632 html script tag in the head section of page.html::
633
634 <script type="text/javascript" src="@@file/classhelper.js">
635 </script>
636
637 You can place it anywhere before ``</head>``. This will make
638 it available on all pages.
639
640 The script will also work if it is loaded at the end of the
641 body. It can also be added to the ``more-javascript`` slot
642 in one of the templates (see ``user.item.html`` for an
643 example) if you don't want the overhead of loading the script
644 on every page.
645
646 You may want to minimize and precompress the file. Using
647 dynamic compression, the file is 10k when compressed with
648 gzip (8k with brotli). If you minimize the file first with
649 `rjsmin <https://pypi.org/project/rjsmin/>`_ and then
650 compress it, it's about 6k. See the information about using
651 precompressed files in the :ref:`section on compression
652 <configuring-compression>`.
624 653
625 <roundup-classhelper> configuration 654 <roundup-classhelper> configuration
626 ----------------------------------- 655 -----------------------------------
627 656
628 There are two attributes used to configure the classhelper. 657 There are two attributes used to configure the classhelper.

Roundup Issue Tracker: http://roundup-tracker.org/