https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41324

--- Comment #6 from Jonathan Druart <[email protected]> ---
To achieve this, one child bug report has been created per module.

Here is the test plan for all of them.

1. Variable serialization
In most of the scripts we need to use Template::Toolkit variable (Perl) for
JavaScript logic. We are simply going to serialize them.
eg.
  my js_var = [% my_tt_var | html %];

That might generate
  my js_var = ;
if the TT variable is not defined. To prevent invalid JS code we are going to
surround it with quotes:
  my js_var = "[% my_tt_var | html %]";

This might be a problem when we compare strings and integer (keep in mind when
testing).

When we want to generate a boolean we will use:
  const js_var = [% tt_var ? 1 : 0 | html %];
No need to quote.

2. Use of permissions and sysprefs
See 41562. For permissions and sysprefs we are going to use a global variable
that will be shared between the different script tags. That will avoid
situations where a JS variable is erased later in a separate script tag.

3. "table_settings" variable
There may be a problem with the "table_settings" variable. In some scripts we
have several variables named "table_settings", that causes problem in DT init.
To prevent that we are simply going to rename the variable to make it more
specific.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to