Files
iTop/js
Pierre Goiffon f0d1c3ac60 Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts:
#	application/utils.inc.php
#	core/htmlsanitizer.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/Twig/AppExtension.php
#	pages/UI.php
#	test/OQL/DataLocalizerTest.php
#	test/OQL/OQLToSQLAllClassesTest.php
#	test/OQL/OQLToSQLGroupByTest.php
#	test/OQL/OQLToSQLNestedSelectTest.php
#	test/OQL/OQLToSQLTest.php
#	test/application/UtilsTest.php
2022-05-24 11:13:28 +02:00
..
2019-10-30 10:11:33 +01:00
2021-03-15 09:29:45 +01:00
2021-03-01 11:44:37 +01:00
2021-03-15 09:29:45 +01:00
2021-08-16 11:24:58 +02:00
2021-03-15 09:29:45 +01:00
2014-11-07 13:25:37 +00:00
2021-03-15 09:29:45 +01:00
2022-03-11 15:41:12 +01:00

JS for iTop

File location

In order to better separate our developments from the embedded third-party libs, files should be moved in either the /components or /lib folders.

IMPORTANT: Before moving a file, we should first consider if:

  • The file is used in an iTop extension that should be compatible with the iTop version currently under developments
  • The file is still used in iTop itself (or if we can consider removing it for clean up)

Leading semicolon

When concataining 2 files with code execution, we might have a prb.

For example :

// file A
(A)()
// file B
(B)()

Having (A)()(B)() is different than (A)();(B)(); !

To avoid those problems simply add a leading semicolon on all JS files.

See : https://stackoverflow.com/a/23056287 3959ed505b