Commit Graph

28 Commits (8b4d49cf506d202c4b7ab58f453cdc84a30bca38)

Author SHA1 Message Date
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>
1 year ago
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>
1 year ago
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>
1 year ago
Côme Chilliet f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Julius Härtl 4bcaeb6c2c
Drop 3rdparty root since it is unused and adjust tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 year ago
Julius Härtl 3e5838198c
Use single resource locator instance
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 year ago
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>
2 years ago
Côme Chilliet 6be7aa112f
Migrate from ILogger to LoggerInterface in lib/private
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
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>
2 years ago
Louis Chemineau 6f62c17a95
Detect app's script higher up as some scripts were shadowed
Signed-off-by: Louis Chemineau <louis@chmn.me>
2 years ago
Louis Chemineau f8f09bff04
Restore some line in JSResourceLocator.php
Signed-off-by: Louis Chemineau <louis@chmn.me>
2 years ago
John Molakvoæ (skjnldsv) b664aad7ab
Move bundles to /dist
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2 years ago
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
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>
6 years ago
Morris Jobke ab0a3fbbbc
Merge pull request #7061 from kyrofa/bugfix/6028/app_path_realpath
{J,CS}SResourceLocator: account for symlinks in app path
7 years ago
Kyle Fazzari d2a2793073
JSResourceLocator: re-use $app_path
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
7 years ago
Kyle Fazzari 06ba1a8a02
JSResourceLocator: account for symlinks in app path
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
7 years ago
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
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>
7 years ago
Roeland Jago Douma b5299b1403
Add return
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Roeland Jago Douma 90910290d1
Add debug mode
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Roeland Jago Douma 8e89ad21a2
[PoC] JS Combiner
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Joas Schilling ba87db3fcc
Fix others 8 years ago
Roeland Jago Douma 05cc0dd478
Move \OC\Template to PSR-4 8 years ago