Commit Graph

162 Commits

Author SHA1 Message Date
Kamil Tekiela
6264f6f1ea
Various refactorings 2 (#17965)
* Remove extra blank lines
* Remove useless param annotations
* Refactor Index::singleton
* Refactor Config.php
* Refactor Header::addRecentTable()
* Collapse return statement into a single line
* Refactor Message.php
* Convert $getUniqueCondition into a scalar
* Code style
* Fix invalid return phpdoc
* Remove unused variable
* Remove redundant empty array checks
* Refactor Export::closeFile()
* Simplify else statement
* Remove redundant else
* Refactor TablePartitionDefinition::getDetails
* Simpler returns
* Add types for getCellContent()
* Remove useless method mngInsideStructComm

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-12-24 12:54:23 -03:00
Maurício Meneghini Fauth
ab96edf359
Extract Navigation object dependency from CommonParams
This removes a circular dependency.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-12-14 20:08:58 -03:00
Maurício Meneghini Fauth
9546a45e98
Revert "Move menuResizer related functions to menu-resizer.js"
That commit broke the onload and teardown calls.
Reverting fixes the tests.

This reverts commit 5e6541e08a.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-12-04 15:15:44 -03:00
Maurício Meneghini Fauth
5e6541e08a
Move menuResizer related functions to menu-resizer.js
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-12-01 23:17:33 -03:00
Maurício Meneghini Fauth
83e8ed59cc
Remove Config object from the Window global object
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-30 22:00:29 -03:00
Maurício Meneghini Fauth
49865fe647
Remove Indexes object from the Window global object
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-29 14:39:16 -03:00
Maurício Meneghini Fauth
b7a710e83f
Remove common.js from Header::addDefaultScripts()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-29 14:17:04 -03:00
Maurício Meneghini Fauth
caf19897ac
Remove crossFramingProtection from the Window global
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-28 23:43:35 -03:00
Maurício Meneghini Fauth
332e27ad39
Remove KeyHandlerEvents from the Window global object
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-28 23:11:13 -03:00
Maurício Meneghini Fauth
479f10289f
Remove the Navigation object from the Window global
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-28 22:29:13 -03:00
Maurício Meneghini Fauth
2e001c186a
Remove PageSettings from the window object
Imports PageSettings in the main.js file instead of relying on the
global window object.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-24 22:00:56 -03:00
Maurício Meneghini Fauth
b2971d618f
Import the AJAX object where possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-24 15:21:18 -03:00
Maurício Meneghini Fauth
3ce84326f2
Import the Functions object where possible
Instead of using from the Window global object.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-24 14:43:25 -03:00
Maurício Meneghini Fauth
6f54621b41
Create a shared.js file for common JS dependencies
Instead of using the Webpack's dependOn setting, uses the splitChunks
setting to automatically generate the shared.js file.

As the contents of these shared dependencies are being moved to the
shared.js file, the generated file for each dependency is now empty.

Is probably safe to not generate them, but some adjustments are needed
for that first. For example, the AJAX's onload and teardown functions
expects that some of these files exists.

For now, only dependencies that are loaded for all pages should be added
in this shared.js file.

This will facilitate the refactoring of the JS files, but the trade off,
at least for now, is that will be a single large file instead of a few
medium ones.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-24 14:43:24 -03:00
Maurício Meneghini Fauth
df23516145
Reorder JS scripts loading in Header class
First load vendor scripts, then load the Messages, then the other
scripts.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-23 15:57:06 -03:00
Liviu-Mihail Concioiu
b343e16814 Fix filename
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com>
2022-10-30 08:44:30 +01:00
William Desportes
ea5a541f7b
Merge branch 'QA_5_2'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-10-29 17:26:44 +02:00
William Desportes
12b76bb46f
Fix #17842 - Use jquery.validate.min.js (24 KB) instead of jquery.validate.js (50 KB)
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-10-29 14:59:05 +02:00
William Desportes
29c54c250e
Use jquery-migrate.min.js (14kB) instead of jquery-migrate.min.js (31kB)
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-10-26 17:28:09 +02:00
Kamil Tekiela
270ad693eb Replace uses of escapeJsString with json_encode
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-10-17 21:28:56 +01:00
Maurício Meneghini Fauth
d7e1dd7206
Extract Console dependencies from constructor
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-08-20 15:52:06 -03:00
Maurício Meneghini Fauth
87d695f2c8
Extract js/messages.php entry point into a route
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-08-06 22:25:32 -03:00
Maurício Meneghini Fauth
431b594ec3
Change doclinks.js to use JS modules
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-07-05 15:47:12 -03:00
Maurício Meneghini Fauth
4e19a88a1e
Extract Webpack runtime to the runtime.js file
This is needed since it has multiple entry points per page.

https://bundlers.tooling.report/code-splitting/multi-entry/

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-07-02 14:50:52 -03:00
Maurício Meneghini Fauth
ef299ea809
Extract side effects from page_settings.js file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-30 02:01:21 -03:00
Maurício Meneghini Fauth
f7379a6a2b
Extract side effects from common.js file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-30 01:33:05 -03:00
Maurício Meneghini Fauth
76e72d7ad5
Extract side effects from indexes.js file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-30 01:24:04 -03:00
Maurício Meneghini Fauth
ac55dab1eb
Extract side effects from navigation.js file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-30 00:51:13 -03:00
Maurício Meneghini Fauth
9c09feb78d
Extract side effects from the functions.js file
And some minor code style changes.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-29 23:30:52 -03:00
Maurício Meneghini Fauth
3feb1f73f1
Extract side effects from config.js file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-28 01:46:24 -03:00
Maurício Meneghini Fauth
3560dcfdd4
Extract cross_framing_protection.js side effect into main.js
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-28 01:39:52 -03:00
Maurício Meneghini Fauth
4a30c8ccbd
Extract keyhandler.js side effects into main.js file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-28 01:39:51 -03:00
Maurício Meneghini Fauth
bdbf82b11f
Extract ajax.js side effects into main.js file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-28 01:39:51 -03:00
Maurício Meneghini Fauth
78b2c1f4eb
Extract function from cross_framing_protection.js
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-26 13:31:49 -03:00
Maurício Meneghini Fauth
7403cffab4
Assign CommonParams and CommonActions to the window object
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-22 15:04:03 -03:00
Maurício Meneghini Fauth
d668e331b5
Remove jquery-debounce-throttle JS dependency
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-05-11 16:21:53 -03:00
Maurício Meneghini Fauth
6dc859cbc2
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-04-28 15:56:18 -03:00
Maurício Meneghini Fauth
49e2b081ba
Merge branch 'QA_5_1' into QA_5_2
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-04-28 15:26:35 -03:00
Maurício Meneghini Fauth
0312396a75 Remove jQuery Mousewheel JS dependency
This dependency was removed by
https://github.com/phpmyadmin/phpmyadmin/pull/17032.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-04-27 21:21:25 -03:00
Maurício Meneghini Fauth
5950693fb3
Fix possible undefined globals
Related to https://github.com/phpmyadmin/phpmyadmin/pull/17427.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-10 18:05:21 -03:00
Maurício Meneghini Fauth
e16682d57a
Remove IS_TRANSFORMATION_WRAPPER constant
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-09 21:59:06 -03:00
Maurício Meneghini Fauth
1438cb211e
Replace global keyword with $GLOBALS
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-07 17:31:11 -03:00
Maurício Meneghini Fauth
a8ca6894a7
Create the validator-messages.js file
- Extracts the validator messages from the javascript/variables template
  into a new file.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-15 15:13:59 -03:00
Maurício Meneghini Fauth
e514bda5b1
Create datetimepicker.js file
Extracts the datepicker and timepicker translations logic from
the javascript/variables template into the new datetimepicker.js file.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-15 14:04:46 -03:00
Maurício Meneghini Fauth
c482cd47ef
Remove gridEditingConfig JS global
- Uses data attribute instead.
- Uses Bootstrap's tooltip instead of the jQuery plugin.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-14 23:19:29 -03:00
Maurício Meneghini Fauth
a0337bf220
Refactor JavaScriptMessagesController controller
- Removes the dependency of the cfg and theme PHP globals.
- Handles the errors when encoding the messages to JSON.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-14 18:09:57 -03:00
Maurício Meneghini Fauth
c50f795e0e
Remove missing rte.js file
Fixes #17354.
Related to 89dba07132.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-07 20:17:06 -03:00
William Desportes
65c9f49c1e
Merge branch 'QA_5_1' into QA_5_2
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-02-06 15:45:57 +01:00
William Desportes
29ff729981
Fix #17288 - "First day of calendar" has no effect
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-02-04 18:28:01 +01:00
William Desportes
1262c30084
Ref #17288 - fix importing settings that are saved in the browser
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-02-04 16:46:24 +01:00