-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for files_external customjs from apps #27683
Conversation
Tested as follows:
diff --git a/js/test.js b/js/test.js
new file mode 100644
index 0000000..3c1510b
--- /dev/null
+++ b/js/test.js
@@ -0,0 +1 @@
+console.log('loaded!');
diff --git a/lib/Backend/FTP.php b/lib/Backend/FTP.php
index 2b5b112..ffa7835 100644
--- a/lib/Backend/FTP.php
+++ b/lib/Backend/FTP.php
@@ -34,6 +34,7 @@ class FTP extends Backend {
->addIdentifierAlias('\OC\Files\Storage\FTP') // legacy compat
->setStorageClass('\OCA\Files_external_ftp\Storage\FTP')
->setText($l->t('FTP (Fly)'))
+ ->setCustomJS(['files_external_ftp', 'test'])
->addParameters([
(new DefinitionParameter('username', $l->t('Username'))),
(new DefinitionParameter('password', $l->t('Password')))
With this PR the console shows "loaded!" @davicente not sure why it didn't work in your case. @jvillafanez @DeepDiver1975 review ? |
@PVince81 if I remember well, it was because I didn't use the exact name "files_onedrive" for the app. Then it worked fine |
Can you retest with this PR ? Then we can merge it. |
I have tested with js/onedrive.js and js/test.js Working: With js/onedrive.js and Not working: With js/test.js and |
This PR is only about actually loading the JS file. If it's loaded then it fits its purpose. If the JS file code itself has problems for whatever reason, it is not related to this PR which only opens the door. |
Then it works |
3ee16af
to
3947df7
Compare
Thanks for the feedback. Rebased for CI |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Related Issue
Fixes #27682
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
@davicente please test