Côme Chilliet
b58b3750a7
chore: Cleanup typing and deprecated method calls in resource locators
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-29 12:10:56 +07:00
Robert Zenz
f428e6786b
fix(JSResourceLocator) fix incorrect parameter being used.
2025-04-26 15:19:55 +07:00
provokateurin
9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
Andy Scherzinger
dae7c159f7
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Côme Chilliet
ec5133b739
fix: Apply new coding standard to all files
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Ferdinand Thiessen
03dbbc90be
fix(JSRecourceLocator): Add missing slash after server root
...
The `OC::$SERVERROOT` is always returned without a trailing slash, so we need to add a slash between server root and apps directory.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-03-22 14:51:27 +07:00
Ferdinand Thiessen
51ea3de8a7
fix(JSResourceLocator): Consider configured app roots for files
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-02-29 17:27:20 +07:00
Akhil
5e20c3e7b9
Add custom apps translation scripts and image path for consistency
...
Signed-off-by: Akhil <akhil@e.email>
2023-10-19 14:39:29 +07:00
Robin Appelman
9f1d497a0b
Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_private
...
Refactors "strpos" calls in lib/private to improve code readability.
2023-06-01 23:10:00 +07:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Julius Härtl
0ebb00d01d
fix: Do not attempt to use l10n files as sources for combined js files
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-05-15 08:29:05 +07:00
Ferdinand Thiessen
31c01fa3da
fix(JSResourceLocator): Handle missing translations silently
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-05-11 18:22:24 +07:00
Ferdinand Thiessen
a3595f73ac
fix(OC/Template): Allow `.mjs` files within custom app paths
...
If apps are installed in non standard app paths, we need
to check `$app_path/$script` instead of only doing so for translations.
Without this it would fallback to `.js` extension even if a `.mjs` file exists.
Also tried make the code more selfe explaining.
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-02-22 21:19:37 +07:00
Ferdinand Thiessen
00e041b907
feat(template): Allow `JSResourceLocator` to find ES6 scripts
...
Enable module js (ES6) support on the `JSResourceLocator`.
This changes `JSResourceLocator` to look for `.mjs` files first
to allow applications to provide a fallback `.js` for older Nextcloud versions.
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-02-22 21:19:37 +07:00
Ferdinand Thiessen
dbb1fa1273
fix(OC/Template): Remove usage of deprecated functions in `JSResourceLocator`
...
Move from `\OC_App::getAppPath` to `IAppManager::getAppPath`.
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-02-22 21:19:37 +07:00
Côme Chilliet
f5c361cf44
composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Julius Härtl
4bcaeb6c2c
Drop 3rdparty root since it is unused and adjust tests
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-07 23:55:32 +07:00
Julius Härtl
3e5838198c
Use single resource locator instance
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-07 22:32:05 +07:00
Carl Schwan
de168b38e9
Make it possible to load theme/<themename>/dist
...
This fix a regression with the theming api following the change in
webpack bundling introduced in 24
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-26 13:46:29 +07:00
Côme Chilliet
6be7aa112f
Migrate from ILogger to LoggerInterface in lib/private
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +07:00
Julius Härtl
e8cf1a8759
Avoid double-loading dist/core-main.js when apps have scripts named main
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-03-08 15:37:53 +07:00
Louis Chemineau
6f62c17a95
Detect app's script higher up as some scripts were shadowed
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-08 10:15:48 +07:00
Louis Chemineau
f8f09bff04
Restore some line in JSResourceLocator.php
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-08 10:11:58 +07:00
John Molakvoæ (skjnldsv)
b664aad7ab
Move bundles to /dist
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2022-01-08 10:11:58 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Morris Jobke
2a17281cb6
Load apps/APP/l10n/*.js and themes/THEME/apps/APP/l10n/*.js
...
Before it quit right after finding the theme version of the l10n file which results in a not translated part of the UI.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-10-22 11:02:25 +07:00
Morris Jobke
ab0a3fbbbc
Merge pull request #7061 from kyrofa/bugfix/6028/app_path_realpath
...
{J,CS}SResourceLocator: account for symlinks in app path
2017-11-14 13:58:02 +07:00
Kyle Fazzari
d2a2793073
JSResourceLocator: re-use $app_path
...
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
2017-11-12 08:08:38 +07:00
Kyle Fazzari
06ba1a8a02
JSResourceLocator: account for symlinks in app path
...
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
2017-11-07 14:54:21 +07:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Joas Schilling
4792867357
Stop infinit loop on invalid settings css/js file
...
Don't try to find dirname of false...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-19 11:41:08 +07:00
Roeland Jago Douma
b5299b1403
Add return
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-24 10:58:11 +07:00
Roeland Jago Douma
90910290d1
Add debug mode
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-24 10:58:11 +07:00
Roeland Jago Douma
8e89ad21a2
[PoC] JS Combiner
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-24 10:58:10 +07:00
Joas Schilling
ba87db3fcc
Fix others
2016-07-21 18:13:57 +07:00
Roeland Jago Douma
05cc0dd478
Move \OC\Template to PSR-4
2016-05-13 08:54:07 +07:00